Re: [PATCH net 0/2] Fix issues when PF sets MAC address for VF
From: Jakub Kicinski <kuba@kernel.org>
Date: 2024-11-03 20:50:36
Also in:
imx, lkml
From: Jakub Kicinski <kuba@kernel.org>
Date: 2024-11-03 20:50:36
Also in:
imx, lkml
On Thu, 31 Oct 2024 14:02:45 +0800 Wei Fang wrote:
net: enetc: allocate vf_state during PF probes net: enetc: prevent PF from configuring MAC address for an enabled VF
This combination of changes would imply that nobody sets the MAC address on VFs via this driver, correct? Patch 1 fixes a crash if address is set before VFs are enabled, patch 2 forces setting the MAC before VFs are enabled (which would previously crash). Which leads me to believe this will cause regressions to all users, if such users exist. The fact that the MAC address is not picked up by a running VM is normal, I'd say even maybe expected. IIUC hypervisor will enable SRIOV at the start of day, then allocate, configure and assign VFs to VMs. It will FLR the VF after configuration. Your change will make it impossible to reconfigure VF with a MAC of a new VM, if any other VF is in use. Long story short, I don't believe the patch 2 is necessary at all, maybe you can print a warning to the logs, if you really want.