Patch "i40e: Fix VF's MAC Address change on VM" has been added to the 5.18-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    i40e: Fix VF's MAC Address change on VM

to the 5.18-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     i40e-fix-vf-s-mac-address-change-on-vm.patch
and it can be found in the queue-5.18 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit ce75a9779926662312364ea773665f6669a0f11e
Author: Norbert Zulinski <norbertx.zulinski@xxxxxxxxx>
Date:   Wed Jun 8 11:10:56 2022 +0200

    i40e: Fix VF's MAC Address change on VM
    
    [ Upstream commit fed0d9f13266a22ce1fc9a97521ef9cdc6271a23 ]
    
    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: 155f0ac2c96b ("iavf: allow permanent MAC address to change")
    Signed-off-by: Norbert Zulinski <norbertx.zulinski@xxxxxxxxx>
    Signed-off-by: Jan Sokolowski <jan.sokolowski@xxxxxxxxx>
    Tested-by: Konrad Jankowski <konrad0.jankowski@xxxxxxxxx>
    Signed-off-by: Tony Nguyen <anthony.l.nguyen@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
index 033ea71763e3..86b0f21287dc 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
@@ -2147,6 +2147,10 @@ static int i40e_vc_get_vf_resources_msg(struct i40e_vf *vf, u8 *msg)
 		/* VFs only use TC 0 */
 		vfres->vsi_res[0].qset_handle
 					  = le16_to_cpu(vsi->info.qs_handle[0]);
+		if (!(vf->driver_caps & VIRTCHNL_VF_OFFLOAD_USO) && !vf->pf_set_mac) {
+			i40e_del_mac_filter(vsi, vf->default_lan_addr.addr);
+			eth_zero_addr(vf->default_lan_addr.addr);
+		}
 		ether_addr_copy(vfres->vsi_res[0].default_mac_addr,
 				vf->default_lan_addr.addr);
 	}



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux