Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit fed0d9f

Browse files
norbertx-zulinskianguy11
authored andcommitted
i40e: Fix VF's MAC Address change on VM
Clear VF MAC from parent PF and remove VF filter from VSI when both conditions are true: -VIRTCHNL_VF_OFFLOAD_USO is not used -VM MAC was not set from PF level It affects older version of IAVF and it allow them to change MAC Address on VM, newer IAVF won't change their behaviour. Previously it wasn't possible to change VF's MAC Address on VM because there is flag on IAVF driver that won't allow to change MAC Address if this address is given from PF driver. Fixes: 155f0ac ("iavf: allow permanent MAC address to change") Signed-off-by: Norbert Zulinski <[email protected]> Signed-off-by: Jan Sokolowski <[email protected]> Tested-by: Konrad Jankowski <[email protected]> Signed-off-by: Tony Nguyen <[email protected]>
1 parent 1adb156 commit fed0d9f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2147,6 +2147,10 @@ static int i40e_vc_get_vf_resources_msg(struct i40e_vf *vf, u8 *msg)
21472147
/* VFs only use TC 0 */
21482148
vfres->vsi_res[0].qset_handle
21492149
= le16_to_cpu(vsi->info.qs_handle[0]);
2150+
if (!(vf->driver_caps & VIRTCHNL_VF_OFFLOAD_USO) && !vf->pf_set_mac) {
2151+
i40e_del_mac_filter(vsi, vf->default_lan_addr.addr);
2152+
eth_zero_addr(vf->default_lan_addr.addr);
2153+
}
21502154
ether_addr_copy(vfres->vsi_res[0].default_mac_addr,
21512155
vf->default_lan_addr.addr);
21522156
}

0 commit comments

Comments
 (0)