Skip to content

Commit ed36546

Browse files
committed
Merge: i40e: When removing VF MAC filters, only check PF-set MAC
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/7155 JIRA: https://issues.redhat.com/browse/RHEL-98540 commit 5a0df02 Author: Jamie Bainbridge <jamie.bainbridge@gmail.com> Date: Wed Jun 25 09:29:18 2025 +1000 i40e: When removing VF MAC filters, only check PF-set MAC When the PF is processing an Admin Queue message to delete a VF's MACs from the MAC filter, we currently check if the PF set the MAC and if the VF is trusted. This results in undesirable behaviour, 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. This results in the VF losing its PF-set MAC which should not happen. There is no need to check for trust at all, because an untrusted VF cannot change its own MAC. The only check needed is whether the PF set the MAC. If the PF set the MAC, then don't erase the MAC on link-down. Resolve this by changing the deletion check only for PF-set MAC. (the out-of-tree driver has also intentionally removed the check for VF trust here with OOT driver version 2.26.8, this changes the Linux kernel driver behaviour and comment to match the OOT driver behaviour) Fixes: ea2a1cf ("i40e: Fix VF MAC filter removal") Signed-off-by: Jamie Bainbridge <jamie.bainbridge@gmail.com> Reviewed-by: Simon Horman <horms@kernel.org> Tested-by: Rafal Romanowski <rafal.romanowski@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com> Signed-off-by: Jamie Bainbridge <jbainbri@redhat.com> Approved-by: Jay Shin <jaeshin@redhat.com> Approved-by: Corinna Vinschen <vinschen@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: Jarod Wilson <jarod@redhat.com>
2 parents 0d8f4a7 + d2d0421 commit ed36546

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3137,10 +3137,10 @@ static int i40e_vc_del_mac_addr_msg(struct i40e_vf *vf, u8 *msg)
31373137
const u8 *addr = al->list[i].addr;
31383138

31393139
/* Allow to delete VF primary MAC only if it was not set
3140-
* administratively by PF or if VF is trusted.
3140+
* administratively by PF.
31413141
*/
31423142
if (ether_addr_equal(addr, vf->default_lan_addr.addr)) {
3143-
if (i40e_can_vf_change_mac(vf))
3143+
if (!vf->pf_set_mac)
31443144
was_unimac_deleted = true;
31453145
else
31463146
continue;

0 commit comments

Comments
 (0)