Skip to content

Commit 1c7f0d2

Browse files
committed
ice: fix vf->num_mac count with port representors
JIRA: https://issues.redhat.com/browse/RHEL-83543 Upstream commit(s): commit bbd9516 Author: Jacob Keller <[email protected]> Date: Thu Apr 10 11:13:52 2025 -0700 ice: fix vf->num_mac count with port representors The ice_vc_repr_add_mac() function indicates that it does not store the MAC address filters in the firmware. However, it still increments vf->num_mac. This is incorrect, as vf->num_mac should represent the number of MAC filters currently programmed to firmware. Indeed, we only perform this increment if the requested filter is a unicast address that doesn't match the existing vf->hw_lan_addr. In addition, ice_vc_repr_del_mac() does not decrement the vf->num_mac counter. This results in the counter becoming out of sync with the actual count. As it turns out, vf->num_mac is currently only used in legacy made without port representors. The single place where the value is checked is for enforcing a filter limit on untrusted VFs. Upcoming patches to support VF Live Migration will use this value when determining the size of the TLV for MAC address filters. Fix the representor mode function to stop incrementing the counter incorrectly. Fixes: ac19e03 ("ice: allow process VF opcodes in different ways") Signed-off-by: Jacob Keller <[email protected]> Reviewed-by: Michal Swiatkowski <[email protected]> Reviewed-by: Simon Horman <[email protected]> Tested-by: Sujai Buvaneswaran <[email protected]> Signed-off-by: Tony Nguyen <[email protected]> Signed-off-by: Petr Oros <[email protected]>
1 parent 7789cf7 commit 1c7f0d2

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

drivers/net/ethernet/intel/ice/ice_virtchnl.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4275,7 +4275,6 @@ static int ice_vc_repr_add_mac(struct ice_vf *vf, u8 *msg)
42754275
}
42764276

42774277
ice_vfhw_mac_add(vf, &al->list[i]);
4278-
vf->num_mac++;
42794278
break;
42804279
}
42814280

0 commit comments

Comments
 (0)