* [PATCH v3] hv_netvsc: Set VF priv_flags to IFF_NO_ADDRCONF before open to prevent IPv6 addrconf
@ 2025-07-16 0:26 Li Tian
2025-07-16 9:29 ` Simon Horman
2025-07-17 14:50 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 6+ messages in thread
From: Li Tian @ 2025-07-16 0:26 UTC (permalink / raw)
To: netdev, linux-hyperv
Cc: linux-kernel, Haiyang Zhang, Dexuan Cui, Stephen Hemminger,
Long Li
Set an additional flag IFF_NO_ADDRCONF to prevent ipv6 addrconf.
Commit under Fixes added a new flag change that was not made
to hv_netvsc resulting in the VF being assinged an IPv6.
Fixes: 8a321cf7becc ("net: add IFF_NO_ADDRCONF and use it in bonding to prevent ipv6 addrconf")
Suggested-by: Cathy Avery <cavery@redhat.com>
Signed-off-by: Li Tian <litian@redhat.com>
---
v3:
- only fixes commit message.
v2: https://lore.kernel.org/netdev/20250710024603.10162-1-litian@redhat.com/
- instead of replacing flag, add it.
v1: https://lore.kernel.org/netdev/20250710024603.10162-1-litian@redhat.com/
---
drivers/net/hyperv/netvsc_drv.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c
index c41a025c66f0..8be9bce66a4e 100644
--- a/drivers/net/hyperv/netvsc_drv.c
+++ b/drivers/net/hyperv/netvsc_drv.c
@@ -2317,8 +2317,11 @@ static int netvsc_prepare_bonding(struct net_device *vf_netdev)
if (!ndev)
return NOTIFY_DONE;
- /* set slave flag before open to prevent IPv6 addrconf */
+ /* Set slave flag and no addrconf flag before open
+ * to prevent IPv6 addrconf.
+ */
vf_netdev->flags |= IFF_SLAVE;
+ vf_netdev->priv_flags |= IFF_NO_ADDRCONF;
return NOTIFY_DONE;
}
--
2.50.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v3] hv_netvsc: Set VF priv_flags to IFF_NO_ADDRCONF before open to prevent IPv6 addrconf
2025-07-16 0:26 [PATCH v3] hv_netvsc: Set VF priv_flags to IFF_NO_ADDRCONF before open to prevent IPv6 addrconf Li Tian
@ 2025-07-16 9:29 ` Simon Horman
2025-07-16 15:14 ` Xin Long
2025-07-17 14:50 ` patchwork-bot+netdevbpf
1 sibling, 1 reply; 6+ messages in thread
From: Simon Horman @ 2025-07-16 9:29 UTC (permalink / raw)
To: Li Tian
Cc: netdev, linux-hyperv, linux-kernel, Haiyang Zhang, Dexuan Cui,
Stephen Hemminger, Long Li, Xin Long
+ Xin Long
On Wed, Jul 16, 2025 at 08:26:05AM +0800, Li Tian wrote:
> Set an additional flag IFF_NO_ADDRCONF to prevent ipv6 addrconf.
>
> Commit under Fixes added a new flag change that was not made
> to hv_netvsc resulting in the VF being assinged an IPv6.
>
> Fixes: 8a321cf7becc ("net: add IFF_NO_ADDRCONF and use it in bonding to prevent ipv6 addrconf")
> Suggested-by: Cathy Avery <cavery@redhat.com>
> Signed-off-by: Li Tian <litian@redhat.com>
> ---
> v3:
> - only fixes commit message.
> v2: https://lore.kernel.org/netdev/20250710024603.10162-1-litian@redhat.com/
> - instead of replacing flag, add it.
> v1: https://lore.kernel.org/netdev/20250710024603.10162-1-litian@redhat.com/
> ---
> drivers/net/hyperv/netvsc_drv.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
Hi Li Tian,
Thanks for addressing earlier feedback.
I don't think you need to repost because of this, but for future reference:
1. Because this is a fix for a commit that is present in net
it should be targeted at that tree.
Subject: [PATCH net vX] ...
2. Please use get_maintainers.pl this.patch to generate the CC list. In
this case Xin Long (now CCed) should be included as he is the author of the
patch cited in the Fixes tag.
b4 can help you with this and other aspects of patch management.
>
> diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c
> index c41a025c66f0..8be9bce66a4e 100644
> --- a/drivers/net/hyperv/netvsc_drv.c
> +++ b/drivers/net/hyperv/netvsc_drv.c
> @@ -2317,8 +2317,11 @@ static int netvsc_prepare_bonding(struct net_device *vf_netdev)
> if (!ndev)
> return NOTIFY_DONE;
>
> - /* set slave flag before open to prevent IPv6 addrconf */
> + /* Set slave flag and no addrconf flag before open
> + * to prevent IPv6 addrconf.
> + */
> vf_netdev->flags |= IFF_SLAVE;
> + vf_netdev->priv_flags |= IFF_NO_ADDRCONF;
> return NOTIFY_DONE;
> }
>
> --
> 2.50.0
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3] hv_netvsc: Set VF priv_flags to IFF_NO_ADDRCONF before open to prevent IPv6 addrconf
2025-07-16 9:29 ` Simon Horman
@ 2025-07-16 15:14 ` Xin Long
2025-07-16 16:15 ` [EXTERNAL] " Haiyang Zhang
0 siblings, 1 reply; 6+ messages in thread
From: Xin Long @ 2025-07-16 15:14 UTC (permalink / raw)
To: Simon Horman
Cc: Li Tian, netdev, linux-hyperv, linux-kernel, Haiyang Zhang,
Dexuan Cui, Stephen Hemminger, Long Li
On Wed, Jul 16, 2025 at 5:29 AM Simon Horman <horms@kernel.org> wrote:
>
> + Xin Long
>
Thanks for Ccing me.
> On Wed, Jul 16, 2025 at 08:26:05AM +0800, Li Tian wrote:
> > Set an additional flag IFF_NO_ADDRCONF to prevent ipv6 addrconf.
> >
> > Commit under Fixes added a new flag change that was not made
> > to hv_netvsc resulting in the VF being assinged an IPv6.
> >
> > Fixes: 8a321cf7becc ("net: add IFF_NO_ADDRCONF and use it in bonding to prevent ipv6 addrconf")
> > Suggested-by: Cathy Avery <cavery@redhat.com>
> > Signed-off-by: Li Tian <litian@redhat.com>
> > ---
> > v3:
> > - only fixes commit message.
> > v2: https://lore.kernel.org/netdev/20250710024603.10162-1-litian@redhat.com/
> > - instead of replacing flag, add it.
> > v1: https://lore.kernel.org/netdev/20250710024603.10162-1-litian@redhat.com/
> > ---
> > drivers/net/hyperv/netvsc_drv.c | 5 ++++-
> > 1 file changed, 4 insertions(+), 1 deletion(-)
>
> Hi Li Tian,
>
> Thanks for addressing earlier feedback.
>
> I don't think you need to repost because of this, but for future reference:
>
> 1. Because this is a fix for a commit that is present in net
> it should be targeted at that tree.
>
> Subject: [PATCH net vX] ...
>
> 2. Please use get_maintainers.pl this.patch to generate the CC list. In
> this case Xin Long (now CCed) should be included as he is the author of the
> patch cited in the Fixes tag.
>
> b4 can help you with this and other aspects of patch management.
>
> >
> > diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c
> > index c41a025c66f0..8be9bce66a4e 100644
> > --- a/drivers/net/hyperv/netvsc_drv.c
> > +++ b/drivers/net/hyperv/netvsc_drv.c
> > @@ -2317,8 +2317,11 @@ static int netvsc_prepare_bonding(struct net_device *vf_netdev)
> > if (!ndev)
> > return NOTIFY_DONE;
> >
> > - /* set slave flag before open to prevent IPv6 addrconf */
> > + /* Set slave flag and no addrconf flag before open
> > + * to prevent IPv6 addrconf.
> > + */
> > vf_netdev->flags |= IFF_SLAVE;
> > + vf_netdev->priv_flags |= IFF_NO_ADDRCONF;
If it is only to prevent IPv6 addrconf, I think you can replace IFF_SLAVE
with IFF_NO_ADDRCONF.
IFF_SLAVE normally comes with IFF_MASTER, like bonding and eql.
I don't see IFF_MASTER used in netvsc_drv.c, so IFF_SLAVE probably
should be dropped, including the one in __netvsc_vf_setup()?
> > return NOTIFY_DONE;
> > }
> >
> > --
> > 2.50.0
> >
> >
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [EXTERNAL] Re: [PATCH v3] hv_netvsc: Set VF priv_flags to IFF_NO_ADDRCONF before open to prevent IPv6 addrconf
2025-07-16 15:14 ` Xin Long
@ 2025-07-16 16:15 ` Haiyang Zhang
2025-07-16 21:58 ` Xin Long
0 siblings, 1 reply; 6+ messages in thread
From: Haiyang Zhang @ 2025-07-16 16:15 UTC (permalink / raw)
To: Xin Long, Simon Horman
Cc: Li Tian, netdev@vger.kernel.org, linux-hyperv@vger.kernel.org,
linux-kernel@vger.kernel.org, Dexuan Cui, Stephen Hemminger,
Long Li
> -----Original Message-----
> From: Xin Long <lucien.xin@gmail.com>
> Sent: Wednesday, July 16, 2025 11:14 AM
> To: Simon Horman <horms@kernel.org>
> Cc: Li Tian <litian@redhat.com>; netdev@vger.kernel.org; linux-
> hyperv@vger.kernel.org; linux-kernel@vger.kernel.org; Haiyang Zhang
> <haiyangz@microsoft.com>; Dexuan Cui <decui@microsoft.com>; Stephen
> Hemminger <stephen@networkplumber.org>; Long Li <longli@microsoft.com>
> Subject: [EXTERNAL] Re: [PATCH v3] hv_netvsc: Set VF priv_flags to
> IFF_NO_ADDRCONF before open to prevent IPv6 addrconf
>
> On Wed, Jul 16, 2025 at 5:29 AM Simon Horman <horms@kernel.org> wrote:
> >
> > + Xin Long
> >
> Thanks for Ccing me.
>
> > On Wed, Jul 16, 2025 at 08:26:05AM +0800, Li Tian wrote:
> > > Set an additional flag IFF_NO_ADDRCONF to prevent ipv6 addrconf.
> > >
> > > Commit under Fixes added a new flag change that was not made
> > > to hv_netvsc resulting in the VF being assinged an IPv6.
> > >
> > > Fixes: 8a321cf7becc ("net: add IFF_NO_ADDRCONF and use it in bonding
> to prevent ipv6 addrconf")
> > > Suggested-by: Cathy Avery <cavery@redhat.com>
> > > Signed-off-by: Li Tian <litian@redhat.com>
> > > ---
> > > v3:
> > > - only fixes commit message.
> > > v2:
> https://lore.ker/
> nel.org%2Fnetdev%2F20250710024603.10162-1-
> litian%40redhat.com%2F&data=05%7C02%7Chaiyangz%40microsoft.com%7C80485948c
> b344b12f2dd08ddc47b7c6e%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C63888
> 2756868249313%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAu
> MDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdat
> a=1ljWIFtnhAiGjdIEgNNlQZGK%2F%2FZHdgHVkvyCWY9%2BKxI%3D&reserved=0
> > > - instead of replacing flag, add it.
> > > v1:
> https://lore.ker/
> nel.org%2Fnetdev%2F20250710024603.10162-1-
> litian%40redhat.com%2F&data=05%7C02%7Chaiyangz%40microsoft.com%7C80485948c
> b344b12f2dd08ddc47b7c6e%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C63888
> 2756868272381%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAu
> MDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdat
> a=o%2B2BM9YEi3O2zcqQu9KfPae6PZerBWO%2FhL5KCIeJ9xI%3D&reserved=0
> > > ---
> > > drivers/net/hyperv/netvsc_drv.c | 5 ++++-
> > > 1 file changed, 4 insertions(+), 1 deletion(-)
> >
> > Hi Li Tian,
> >
> > Thanks for addressing earlier feedback.
> >
> > I don't think you need to repost because of this, but for future
> reference:
> >
> > 1. Because this is a fix for a commit that is present in net
> > it should be targeted at that tree.
> >
> > Subject: [PATCH net vX] ...
> >
> > 2. Please use get_maintainers.pl this.patch to generate the CC list. In
> > this case Xin Long (now CCed) should be included as he is the author
> of the
> > patch cited in the Fixes tag.
> >
> > b4 can help you with this and other aspects of patch management.
> >
> > >
> > > diff --git a/drivers/net/hyperv/netvsc_drv.c
> b/drivers/net/hyperv/netvsc_drv.c
> > > index c41a025c66f0..8be9bce66a4e 100644
> > > --- a/drivers/net/hyperv/netvsc_drv.c
> > > +++ b/drivers/net/hyperv/netvsc_drv.c
> > > @@ -2317,8 +2317,11 @@ static int netvsc_prepare_bonding(struct
> net_device *vf_netdev)
> > > if (!ndev)
> > > return NOTIFY_DONE;
> > >
> > > - /* set slave flag before open to prevent IPv6 addrconf */
> > > + /* Set slave flag and no addrconf flag before open
> > > + * to prevent IPv6 addrconf.
> > > + */
> > > vf_netdev->flags |= IFF_SLAVE;
> > > + vf_netdev->priv_flags |= IFF_NO_ADDRCONF;
> If it is only to prevent IPv6 addrconf, I think you can replace IFF_SLAVE
> with IFF_NO_ADDRCONF.
>
> IFF_SLAVE normally comes with IFF_MASTER, like bonding and eql.
> I don't see IFF_MASTER used in netvsc_drv.c, so IFF_SLAVE probably
> should be dropped, including the one in __netvsc_vf_setup()?
The IFF_SLAVE is not just for ipv6, the comment should be updated.
IFF_SLAVE is also used by udev and our other user mode daemons, so it needs
to stay.
- Haiyang
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [EXTERNAL] Re: [PATCH v3] hv_netvsc: Set VF priv_flags to IFF_NO_ADDRCONF before open to prevent IPv6 addrconf
2025-07-16 16:15 ` [EXTERNAL] " Haiyang Zhang
@ 2025-07-16 21:58 ` Xin Long
0 siblings, 0 replies; 6+ messages in thread
From: Xin Long @ 2025-07-16 21:58 UTC (permalink / raw)
To: Haiyang Zhang
Cc: Simon Horman, Li Tian, netdev@vger.kernel.org,
linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org,
Dexuan Cui, Stephen Hemminger, Long Li
On Wed, Jul 16, 2025 at 12:15 PM Haiyang Zhang <haiyangz@microsoft.com> wrote:
>
>
>
> > -----Original Message-----
> > From: Xin Long <lucien.xin@gmail.com>
> > Sent: Wednesday, July 16, 2025 11:14 AM
> > To: Simon Horman <horms@kernel.org>
> > Cc: Li Tian <litian@redhat.com>; netdev@vger.kernel.org; linux-
> > hyperv@vger.kernel.org; linux-kernel@vger.kernel.org; Haiyang Zhang
> > <haiyangz@microsoft.com>; Dexuan Cui <decui@microsoft.com>; Stephen
> > Hemminger <stephen@networkplumber.org>; Long Li <longli@microsoft.com>
> > Subject: [EXTERNAL] Re: [PATCH v3] hv_netvsc: Set VF priv_flags to
> > IFF_NO_ADDRCONF before open to prevent IPv6 addrconf
> >
> > On Wed, Jul 16, 2025 at 5:29 AM Simon Horman <horms@kernel.org> wrote:
> > >
> > > + Xin Long
> > >
> > Thanks for Ccing me.
> >
> > > On Wed, Jul 16, 2025 at 08:26:05AM +0800, Li Tian wrote:
> > > > Set an additional flag IFF_NO_ADDRCONF to prevent ipv6 addrconf.
> > > >
> > > > Commit under Fixes added a new flag change that was not made
> > > > to hv_netvsc resulting in the VF being assinged an IPv6.
> > > >
> > > > Fixes: 8a321cf7becc ("net: add IFF_NO_ADDRCONF and use it in bonding
> > to prevent ipv6 addrconf")
> > > > Suggested-by: Cathy Avery <cavery@redhat.com>
> > > > Signed-off-by: Li Tian <litian@redhat.com>
> > > > ---
> > > > v3:
> > > > - only fixes commit message.
> > > > v2:
> > https://lore.ker/
> > nel.org%2Fnetdev%2F20250710024603.10162-1-
> > litian%40redhat.com%2F&data=05%7C02%7Chaiyangz%40microsoft.com%7C80485948c
> > b344b12f2dd08ddc47b7c6e%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C63888
> > 2756868249313%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAu
> > MDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdat
> > a=1ljWIFtnhAiGjdIEgNNlQZGK%2F%2FZHdgHVkvyCWY9%2BKxI%3D&reserved=0
> > > > - instead of replacing flag, add it.
> > > > v1:
> > https://lore.ker/
> > nel.org%2Fnetdev%2F20250710024603.10162-1-
> > litian%40redhat.com%2F&data=05%7C02%7Chaiyangz%40microsoft.com%7C80485948c
> > b344b12f2dd08ddc47b7c6e%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C63888
> > 2756868272381%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAu
> > MDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdat
> > a=o%2B2BM9YEi3O2zcqQu9KfPae6PZerBWO%2FhL5KCIeJ9xI%3D&reserved=0
> > > > ---
> > > > drivers/net/hyperv/netvsc_drv.c | 5 ++++-
> > > > 1 file changed, 4 insertions(+), 1 deletion(-)
> > >
> > > Hi Li Tian,
> > >
> > > Thanks for addressing earlier feedback.
> > >
> > > I don't think you need to repost because of this, but for future
> > reference:
> > >
> > > 1. Because this is a fix for a commit that is present in net
> > > it should be targeted at that tree.
> > >
> > > Subject: [PATCH net vX] ...
> > >
> > > 2. Please use get_maintainers.pl this.patch to generate the CC list. In
> > > this case Xin Long (now CCed) should be included as he is the author
> > of the
> > > patch cited in the Fixes tag.
> > >
> > > b4 can help you with this and other aspects of patch management.
> > >
> > > >
> > > > diff --git a/drivers/net/hyperv/netvsc_drv.c
> > b/drivers/net/hyperv/netvsc_drv.c
> > > > index c41a025c66f0..8be9bce66a4e 100644
> > > > --- a/drivers/net/hyperv/netvsc_drv.c
> > > > +++ b/drivers/net/hyperv/netvsc_drv.c
> > > > @@ -2317,8 +2317,11 @@ static int netvsc_prepare_bonding(struct
> > net_device *vf_netdev)
> > > > if (!ndev)
> > > > return NOTIFY_DONE;
> > > >
> > > > - /* set slave flag before open to prevent IPv6 addrconf */
> > > > + /* Set slave flag and no addrconf flag before open
> > > > + * to prevent IPv6 addrconf.
> > > > + */
> > > > vf_netdev->flags |= IFF_SLAVE;
> > > > + vf_netdev->priv_flags |= IFF_NO_ADDRCONF;
> > If it is only to prevent IPv6 addrconf, I think you can replace IFF_SLAVE
> > with IFF_NO_ADDRCONF.
> >
> > IFF_SLAVE normally comes with IFF_MASTER, like bonding and eql.
> > I don't see IFF_MASTER used in netvsc_drv.c, so IFF_SLAVE probably
> > should be dropped, including the one in __netvsc_vf_setup()?
>
> The IFF_SLAVE is not just for ipv6, the comment should be updated.
> IFF_SLAVE is also used by udev and our other user mode daemons, so it needs
> to stay.
>
Got it, then the patch looks good to me.
Reviewed-by: Xin Long <lucien.xin@gmail.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3] hv_netvsc: Set VF priv_flags to IFF_NO_ADDRCONF before open to prevent IPv6 addrconf
2025-07-16 0:26 [PATCH v3] hv_netvsc: Set VF priv_flags to IFF_NO_ADDRCONF before open to prevent IPv6 addrconf Li Tian
2025-07-16 9:29 ` Simon Horman
@ 2025-07-17 14:50 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 6+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-07-17 14:50 UTC (permalink / raw)
To: Li Tian
Cc: netdev, linux-hyperv, linux-kernel, haiyangz, decui, stephen,
longli
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Wed, 16 Jul 2025 08:26:05 +0800 you wrote:
> Set an additional flag IFF_NO_ADDRCONF to prevent ipv6 addrconf.
>
> Commit under Fixes added a new flag change that was not made
> to hv_netvsc resulting in the VF being assinged an IPv6.
>
> Fixes: 8a321cf7becc ("net: add IFF_NO_ADDRCONF and use it in bonding to prevent ipv6 addrconf")
> Suggested-by: Cathy Avery <cavery@redhat.com>
> Signed-off-by: Li Tian <litian@redhat.com>
>
> [...]
Here is the summary with links:
- [v3] hv_netvsc: Set VF priv_flags to IFF_NO_ADDRCONF before open to prevent IPv6 addrconf
https://git.kernel.org/netdev/net/c/d7501e076d85
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-07-17 14:50 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-16 0:26 [PATCH v3] hv_netvsc: Set VF priv_flags to IFF_NO_ADDRCONF before open to prevent IPv6 addrconf Li Tian
2025-07-16 9:29 ` Simon Horman
2025-07-16 15:14 ` Xin Long
2025-07-16 16:15 ` [EXTERNAL] " Haiyang Zhang
2025-07-16 21:58 ` Xin Long
2025-07-17 14:50 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).