[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <39898c5f9a1d6172aa346ad96a831a899a58ec54.1750633468.git.jamie.bainbridge@gmail.com>
Date: Mon, 23 Jun 2025 09:04:41 +1000
From: Jamie Bainbridge <jamie.bainbridge@...il.com>
To: Tony Nguyen <anthony.l.nguyen@...el.com>,
Przemek Kitszel <przemyslaw.kitszel@...el.com>,
Andrew Lunn <andrew+netdev@...n.ch>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Brett Creeley <brett.creeley@....com>,
Ivan Vecera <ivecera@...hat.com>,
Michal Schmidt <mschmidt@...hat.com>
Cc: Jamie Bainbridge <jamie.bainbridge@...il.com>,
intel-wired-lan@...ts.osuosl.org,
netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH net] i40e: Match VF MAC deletion behaviour with OOT driver
When the PF is processing an AQ message to delete a VF's MACs from the
MAC filter, the Linux kernel driver checks if the PF set the MAC and if
the VF is trusted. However, the out-of-tree driver has intentionally
removed the check for VF trust with OOT driver version 2.26.8.
This results in an undesirable behaviour difference between the OOT
driver and the Linux driver, where if a trusted VF with a PF-set MAC
sets itself down (which sends an AQ message to delete the VF's MAC
filters) then the VF MAC is erased from the interface with the Linux
kernel driver but not with the OOT driver.
This results in the VF losing its PF-set MAC which should not happen.
Change the Linux kernel driver and comment to match the OOT behaviour.
Fixes: ea2a1cfc3b201 ("i40e: Fix VF MAC filter removal")
Signed-off-by: Jamie Bainbridge <jamie.bainbridge@...il.com>
---
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
index 88e6bef69342c2e65d8d5b2d7df5ac2cc32ee3d9..45ccbb1cdda0a33527852096ee9759fc19db3a5d 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
@@ -3137,10 +3137,10 @@ static int i40e_vc_del_mac_addr_msg(struct i40e_vf *vf, u8 *msg)
const u8 *addr = al->list[i].addr;
/* Allow to delete VF primary MAC only if it was not set
- * administratively by PF or if VF is trusted.
+ * administratively by PF.
*/
if (ether_addr_equal(addr, vf->default_lan_addr.addr)) {
- if (i40e_can_vf_change_mac(vf))
+ if (!vf->pf_set_mac)
was_unimac_deleted = true;
else
continue;
--
2.39.5
Powered by blists - more mailing lists