[Intel-wired-lan] [RFC PATCH net v2] iavf: Fix lost VF MAC when repeatedly set same MAC
Gardocki, PiotrX
piotrx.gardocki at intel.com
Tue Apr 25 16:42:43 UTC 2023
Hello Ding,
Thanks for the report. Intel is already aware of this issue and the fix
should be available in the next release. The way we fixed that is that
we're checking whether request from kernel is to change MAC address to
the same address that's already applied. This way we're limiting the
number of virtchnl calls.
I think your patch is also valid, but one minor problem with it is that
IAVF_FLAG_AQ_DEL_MAC_FILTER flag in aq_required is not being cleared.
I'm pasting below our solution. We also have a plan to send this code to
upstream, so the final solution might change if community will raise any
concerns.
diff --git a/iavf_main.c b/iavf_main.c
index 51267049..60e32746 100644
--- a/iavf_main.c
+++ b/iavf_main.c
@@ -1190,6 +1190,9 @@ int iavf_replace_primary_mac(struct iavf_adapter
*adapter,
struct iavf_hw *hw = &adapter->hw;
struct iavf_mac_filter *new_f;
+ if (ether_addr_equal(new_mac, hw->mac.addr))
+ return 0;
+
spin_lock_bh(&adapter->mac_vlan_list_lock);
new_f = iavf_add_filter(adapter, new_mac);
Regards,
Piotr
More information about the Intel-wired-lan
mailing list