* [Intel-wired-lan] [PATCH net v1] i40e: Fix VF's MAC Address change on VM
@ 2022-06-08 9:10 Jan Sokolowski
2022-06-21 8:29 ` Jankowski, Konrad0
0 siblings, 1 reply; 2+ messages in thread
From: Jan Sokolowski @ 2022-06-08 9:10 UTC (permalink / raw)
To: intel-wired-lan; +Cc: Norbert Zulinski
From: Norbert Zulinski <norbertx.zulinski@intel.com>
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@intel.com>
Signed-off-by: Jan Sokolowski <jan.sokolowski@intel.com>
---
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 4 ++++
1 file changed, 4 insertions(+)
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);
}
--
2.27.0
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Intel-wired-lan] [PATCH net v1] i40e: Fix VF's MAC Address change on VM
2022-06-08 9:10 [Intel-wired-lan] [PATCH net v1] i40e: Fix VF's MAC Address change on VM Jan Sokolowski
@ 2022-06-21 8:29 ` Jankowski, Konrad0
0 siblings, 0 replies; 2+ messages in thread
From: Jankowski, Konrad0 @ 2022-06-21 8:29 UTC (permalink / raw)
To: Sokolowski, Jan, intel-wired-lan@lists.osuosl.org; +Cc: Zulinski, NorbertX
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
> Jan Sokolowski
> Sent: Wednesday, June 8, 2022 11:11 AM
> To: intel-wired-lan@lists.osuosl.org
> Cc: Zulinski, NorbertX <norbertx.zulinski@intel.com>
> Subject: [Intel-wired-lan] [PATCH net v1] i40e: Fix VF's MAC Address change
> on VM
>
> From: Norbert Zulinski <norbertx.zulinski@intel.com>
>
> 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@intel.com>
> Signed-off-by: Jan Sokolowski <jan.sokolowski@intel.com>
> ---
> drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> 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
Tested-by: Konrad Jankowski <konrad0.jankowski@intel.com>
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-06-21 8:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-08 9:10 [Intel-wired-lan] [PATCH net v1] i40e: Fix VF's MAC Address change on VM Jan Sokolowski
2022-06-21 8:29 ` Jankowski, Konrad0
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox