From: Robin Zhang Date: Wed, 28 Apr 2021 08:04:52 +0000 (+0000) Subject: net/i40e: fix primary MAC type when starting port X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=2e468c03b0a4095988ec788a62669abf8e6f4908;p=dpdk.git net/i40e: fix primary MAC type when starting port 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: 3f604ddf33cf ("net/i40e: fix lack of MAC type when set MAC address") Cc: stable@dpdk.org Signed-off-by: Robin Zhang Acked-by: Qi Zhang --- diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c index 156ad9ab96..ad80aa1e29 100644 --- a/drivers/net/i40e/i40e_ethdev_vf.c +++ b/drivers/net/i40e/i40e_ethdev_vf.c @@ -2128,7 +2128,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],