From: Steve Yang Date: Fri, 4 Sep 2020 07:29:05 +0000 (+0000) Subject: net/iavf: fix setting of MAC address X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=dd52fa0bade3d9e8bbb2229309c9f020cbe6872f;p=dpdk.git net/iavf: fix setting of MAC address When setting the MAC address, the ethdev layer copies the new mac address in dev->data->mac_addrs[0] before calling the dev_ops. Therefore, is_same_ether_addr(mac_addr, dev->data->mac_addrs) was always true, and the MAC was never set. Remove this test to fix the issue. Fixes: 538da7a1cad2 ("net: add rte prefix to ether functions") Cc: stable@dpdk.org Signed-off-by: Steve Yang Acked-by: Beilei Xing --- diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c index 5f3aea8a04..8e1d8a8d3e 100644 --- a/drivers/net/iavf/iavf_ethdev.c +++ b/drivers/net/iavf/iavf_ethdev.c @@ -1020,9 +1020,6 @@ iavf_dev_set_default_mac_addr(struct rte_eth_dev *dev, old_addr = (struct rte_ether_addr *)hw->mac.addr; perm_addr = (struct rte_ether_addr *)hw->mac.perm_addr; - if (rte_is_same_ether_addr(mac_addr, old_addr)) - return 0; - /* If the MAC address is configured by host, skip the setting */ if (rte_is_valid_assigned_ether_addr(perm_addr)) return -EPERM;