net/iavf: fix setting of MAC address
authorSteve Yang <stevex.yang@intel.com>
Fri, 4 Sep 2020 07:29:05 +0000 (07:29 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 18 Sep 2020 16:55:07 +0000 (18:55 +0200)
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 <stevex.yang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
drivers/net/iavf/iavf_ethdev.c

index 5f3aea8..8e1d8a8 100644 (file)
@@ -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;