[Intel-wired-lan] [PATCH net v1] iavf: Fix change VF's mac address

Jankowski, Konrad0 konrad0.jankowski at intel.com
Tue Sep 6 12:12:10 UTC 2022



> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces at osuosl.org> On Behalf Of
> Mateusz Palczewski
> Sent: Wednesday, August 31, 2022 3:53 PM
> To: intel-wired-lan at lists.osuosl.org
> Cc: Dziedziuch, SylwesterX <sylwesterx.dziedziuch at intel.com>; Zulinski,
> NorbertX <norbertx.zulinski at intel.com>
> Subject: [Intel-wired-lan] [PATCH net v1] iavf: Fix change VF's mac address
> 
> From: Sylwester Dziedziuch <sylwesterx.dziedziuch at intel.com>
> 
> Previously changing mac address gives false negative because ip link set
> <interface> address <MAC> return with
> RTNLINK: Permission denied.
> In iavf_set_mac check, if mac was handled by PF, was on start of
> iavf_set_mac even before mac was added to adapter's list of mac.
> Because this check returns always true and it never waits for PF's response.
> 
> Move iavf_is_mac_handled to wait_event_interruptible_timeout instead of
> false. Now it will wait for PF's response and then check if address was added
> or rejected.
> 
> Fixes: 35a2443d0910 ("iavf: Add waiting for response from PF in set mac")
> Signed-off-by: Sylwester Dziedziuch <sylwesterx.dziedziuch at intel.com>
> Co-developed-by: Norbert Zulinski <norbertx.zulinski at intel.com>
> Signed-off-by: Mateusz Palczewski <mateusz.palczewski at intel.com>
> ---
>  drivers/net/ethernet/intel/iavf/iavf_main.c | 10 ++++------
>  1 file changed, 4 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/iavf/iavf_main.c
> b/drivers/net/ethernet/intel/iavf/iavf_main.c
> index f39440ad5c50..94e4cc4011f3 100644
> --- a/drivers/net/ethernet/intel/iavf/iavf_main.c
> +++ b/drivers/net/ethernet/intel/iavf/iavf_main.c
> @@ -1077,7 +1077,6 @@ static int iavf_set_mac(struct net_device *netdev,

Tested-by: Konrad Jankowski <konrad0.jankowski at intel.com>


More information about the Intel-wired-lan mailing list