Skip to contentSkip to conversation

hv_netvsc: Set VF priv_flags to IFF_NO_ADDRCONF before open to prevent IPv6 addrconf

PATCH Applied Li Tian 5 participants 6 messages Jul 16, 2025 – Jul 17, 2025

Subsystems (4)
lore
Share & tools
lore

Li Tian

author
#0 lore raw

PATCH v3 1/1 hv_netvsc: Set VF priv_flags to IFF_NO_ADDRCONF before open to prevent IPv6 addrconf

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")

---
v3:
- only fixes commit message.
v2: https://lore.kernel.org/netdev/[email protected]/
- instead of replacing flag, add it.
v1: https://lore.kernel.org/netdev/[email protected]/

---
 drivers/net/hyperv/netvsc_drv.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/net/hyperv/netvsc_drv.c +4 -1
index c41a025c66f0..8be9bce66a4e 100644
@@ -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;
 }
 
Signature · 1 line
2.50.0
reviewer
#1 lore raw

+ Xin Long

Quoted 14 lines · Li Tian

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")

---
v3:
- only fixes commit message.
v2: https://lore.kernel.org/netdev/[email protected]/
- instead of replacing flag, add it.
v1: https://lore.kernel.org/netdev/[email protected]/

Quoted 3 lines
---
 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.

Quoted 22 lines
drivers/net/hyperv/netvsc_drv.c +4 -1
index c41a025c66f0..8be9bce66a4e 100644
@@ -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;
 }
 
Signature · 1 line
2.50.0
#2 lore raw
Quoted 3 lines · Simon Horman

+ Xin Long

Thanks for Ccing me.

Quoted 45 lines · Li Tian
Quoted 14 lines

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")

---
v3:
- only fixes commit message.
v2: https://lore.kernel.org/netdev/[email protected]/
- instead of replacing flag, add it.
v1: https://lore.kernel.org/netdev/[email protected]/

Quoted 3 lines
---
 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.

Quoted 9 lines
drivers/net/hyperv/netvsc_drv.c +0 -0
index c41a025c66f0..8be9bce66a4e 100644
@@ -2317,8 +2317,11 @@ static int netvsc_prepare_bonding(struct net_device *vf_netdev)
      if (!ndev)
              return NOTIFY_DONE;
 
Quoted 6 lines

drivers/net/hyperv/netvsc_drv.c static int netvsc_prepare_bonding(struct net_device *vf_netdev) · line 2324

Quoted 6 lines
drivers/net/hyperv/netvsc_drv.c +4 -1
-     /* 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()?

Quoted 7 lines
Quoted 7 lines
drivers/net/hyperv/netvsc_drv.c +0 -1
      return NOTIFY_DONE;
 }
 
--

2.50.0

maintainer
#3 lore raw
Quoted 89 lines

-----Original Message-----
From: Xin Long <[email protected]>
Sent: Wednesday, July 16, 2025 11:14 AM
To: Simon Horman <[email protected]>
Cc: Li Tian <[email protected]>; [email protected]; linux- [email protected]; [email protected]; Haiyang Zhang <[email protected]>; Dexuan Cui <[email protected]>; Stephen Hemminger <[email protected]>; Long Li <[email protected]>
Subject: [EXTERNAL] Re: [PATCH v3] hv_netvsc: Set VF priv_flags to IFF_NO_ADDRCONF before open to prevent IPv6 addrconf

Quoted 3 lines · Simon Horman

+ Xin Long

Thanks for Ccing me.

Quoted 7 lines · Li Tian
Quoted 6 lines

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")

Quoted 6 lines
Quoted 6 lines

---
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

Quoted 2 lines
Quoted 2 lines

- 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

Quoted 9 lines
Quoted 3 lines
---
 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:

Quoted 8 lines

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

Quoted 6 lines

patch cited in the Fixes tag.

b4 can help you with this and other aspects of patch management.

Review

Quoted 2 lines
(quoted diff) +0 -0

b/drivers/net/hyperv/netvsc_drv.c

Quoted 4 lines

drivers/net/hyperv/netvsc_drv.c static int netvsc_prepare_bonding(struct

Quoted 4 lines

index c41a025c66f0..8be9bce66a4e 100644

drivers/net/hyperv/netvsc_drv.c +0 -0
@@ -2317,8 +2317,11 @@ static int netvsc_prepare_bonding(struct

net_device *vf_netdev)

Quoted 9 lines

drivers/net/hyperv/netvsc_drv.c static int netvsc_prepare_bonding(struct net_device *vf_netdev) · line 2324

Quoted 9 lines
drivers/net/hyperv/netvsc_drv.c +4 -1
      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;
Quoted 6 lines

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

Reviewed-by
#4 lore raw
Quoted 93 lines · Haiyang Zhang
Quoted 93 lines

-----Original Message-----
From: Xin Long <[email protected]>
Sent: Wednesday, July 16, 2025 11:14 AM
To: Simon Horman <[email protected]>
Cc: Li Tian <[email protected]>; [email protected]; linux- [email protected]; [email protected]; Haiyang Zhang <[email protected]>; Dexuan Cui <[email protected]>; Stephen Hemminger <[email protected]>; Long Li <[email protected]>
Subject: [EXTERNAL] Re: [PATCH v3] hv_netvsc: Set VF priv_flags to IFF_NO_ADDRCONF before open to prevent IPv6 addrconf

Quoted 3 lines · Simon Horman

+ Xin Long

Thanks for Ccing me.

Quoted 7 lines · Li Tian
Quoted 6 lines

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")

Quoted 6 lines
Quoted 6 lines

---
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

Quoted 2 lines
Quoted 2 lines

- 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

Quoted 9 lines
Quoted 3 lines
---
 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:

Quoted 8 lines

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

Quoted 6 lines

patch cited in the Fixes tag.

b4 can help you with this and other aspects of patch management.

Review

Quoted 2 lines
(quoted diff) +0 -0

b/drivers/net/hyperv/netvsc_drv.c

Quoted 4 lines

drivers/net/hyperv/netvsc_drv.c static int netvsc_prepare_bonding(struct

Quoted 4 lines

index c41a025c66f0..8be9bce66a4e 100644

drivers/net/hyperv/netvsc_drv.c +0 -0
@@ -2317,8 +2317,11 @@ static int netvsc_prepare_bonding(struct

net_device *vf_netdev)

Quoted 9 lines

drivers/net/hyperv/netvsc_drv.c static int netvsc_prepare_bonding(struct net_device *vf_netdev) · line 2324

Quoted 9 lines
drivers/net/hyperv/netvsc_drv.c +4 -1
      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.

Quoted 8 lines
Quoted 3 lines

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.

#5 lore raw
In reply to Li Tian
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:

Quoted 10 lines · 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")

[...]

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!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html