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")

Signed-off-by: SteveX Yang <stevex.y...@intel.com>
---
 drivers/net/iavf/iavf_ethdev.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 349c82cae..f16aff531 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -978,9 +978,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;
-- 
2.17.1

Reply via email to