Re: [PATCH net,v3] hv_netvsc: Fix VF namespace also in synthetic NIC NETDEV_REGISTER event
From: Simon Horman
Date: Sat Oct 19 2024 - 05:06:17 EST
On Fri, Oct 18, 2024 at 11:25:22AM -0700, Haiyang Zhang wrote:
> The existing code moves VF to the same namespace as the synthetic NIC
> during netvsc_register_vf(). But, if the synthetic device is moved to a
> new namespace after the VF registration, the VF won't be moved together.
>
> To make the behavior more consistent, add a namespace check for synthetic
> NIC's NETDEV_REGISTER event (generated during its move), and move the VF
> if it is not in the same namespace.
>
> Cc: stable@xxxxxxxxxxxxxxx
> Fixes: c0a41b887ce6 ("hv_netvsc: move VF to same namespace as netvsc device")
> Suggested-by: Stephen Hemminger <stephen@xxxxxxxxxxxxxxxxxx>
> Signed-off-by: Haiyang Zhang <haiyangz@xxxxxxxxxxxxx>
> Reviewed-by: Simon Horman <horms@xxxxxxxxxx>
> ---
> v3: Use RCT order as suggested by Simon.
> v2: Move my fix to synthetic NIC's NETDEV_REGISTER event as suggested by Stephen.
Thanks, this looks good to me.