Skip to content

Commit

Permalink
net/i40e: fix primary MAC type when starting port
Browse files Browse the repository at this point in the history
[ upstream commit 2e468c0 ]

When start port, all MAC addresses will be set. We should set the MAC
type of default MAC address as VIRTCHNL_ETHER_ADDR_PRIMARY.

Fixes: 3f604dd ("net/i40e: fix lack of MAC type when set MAC address")

Signed-off-by: Robin Zhang <robinx.zhang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
  • Loading branch information
RobinXZhang authored and steevenlee committed Jun 8, 2021
1 parent 38b01e7 commit 40c0464
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/net/i40e/i40e_ethdev_vf.c
Expand Up @@ -2081,7 +2081,9 @@ i40evf_add_del_all_mac_addr(struct rte_eth_dev *dev, bool add)
continue;
rte_memcpy(list->list[j].addr, addr->addr_bytes,
sizeof(addr->addr_bytes));
list->list[j].type = VIRTCHNL_ETHER_ADDR_EXTRA;
list->list[j].type = (j == 0 ?
VIRTCHNL_ETHER_ADDR_PRIMARY :
VIRTCHNL_ETHER_ADDR_EXTRA);
PMD_DRV_LOG(DEBUG, "add/rm mac:%x:%x:%x:%x:%x:%x",
addr->addr_bytes[0], addr->addr_bytes[1],
addr->addr_bytes[2], addr->addr_bytes[3],
Expand Down

0 comments on commit 40c0464

Please sign in to comment.