Linux Kernel Selftest development
 help / color / mirror / Atom feed
* [PATCH net-next] selftests: bonding: disable DAD for IPv6 addresses
@ 2026-08-08 16:23 Jakub Kicinski
  2026-08-10  2:02 ` Hangbin Liu
  0 siblings, 1 reply; 3+ messages in thread
From: Jakub Kicinski @ 2026-08-08 16:23 UTC (permalink / raw)
  To: davem
  Cc: netdev, edumazet, pabeni, andrew+netdev, horms, Jakub Kicinski,
	liuhangbin, jv, shuah, linux-kselftest

bond_reset() waits up to 2 seconds for IPv6 connectivity.
With default settings DAD itself may take almost 2 seconds,
causing flakes on debug builds. It used to flake once or
twice a week, recently it started failing once a day.
Probably some downstream changes to scheduler, or our machines
go busier.

A lot of selftests already use nodad, let's use nodad in bonding, too.
I don't see an obvious reason why DAD would be important to the test.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
CC: liuhangbin@gmail.com
CC: jv@jvosburgh.net
CC: shuah@kernel.org
CC: linux-kselftest@vger.kernel.org
---
 .../selftests/drivers/net/bonding/bond_topo_2d1c.sh    | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/tools/testing/selftests/drivers/net/bonding/bond_topo_2d1c.sh b/tools/testing/selftests/drivers/net/bonding/bond_topo_2d1c.sh
index 167aa4a4a12a..903c7a6c7287 100644
--- a/tools/testing/selftests/drivers/net/bonding/bond_topo_2d1c.sh
+++ b/tools/testing/selftests/drivers/net/bonding/bond_topo_2d1c.sh
@@ -48,7 +48,7 @@ gateway_create()
 	ip -n ${g_ns} link add br0 type bridge
 	ip -n ${g_ns} link set br0 up
 	ip -n ${g_ns} addr add ${g_ip4}/24 dev br0
-	ip -n ${g_ns} addr add ${g_ip6}/24 dev br0
+	ip -n ${g_ns} addr add ${g_ip6}/24 dev br0 nodad
 }
 
 gateway_destroy()
@@ -75,7 +75,7 @@ server_create()
 
 	ip -n ${s_ns} link set bond0 up
 	ip -n ${s_ns} addr add ${s_ip4}/24 dev bond0
-	ip -n ${s_ns} addr add ${s_ip6}/24 dev bond0
+	ip -n ${s_ns} addr add ${s_ip6}/24 dev bond0 nodad
 }
 
 # Reset bond with new mode and options
@@ -97,9 +97,7 @@ bond_reset()
 
 	ip -n ${s_ns} link set bond0 up
 	ip -n ${s_ns} addr add ${s_ip4}/24 dev bond0
-	ip -n ${s_ns} addr add ${s_ip6}/24 dev bond0
-	# Wait for IPv6 address ready as it needs DAD
-	slowwait 2 ip netns exec ${s_ns} ping6 ${c_ip6} -c 1 -W 0.1 &> /dev/null
+	ip -n ${s_ns} addr add ${s_ip6}/24 dev bond0 nodad
 }
 
 server_destroy()
@@ -124,7 +122,7 @@ client_create()
 
 	ip -n ${c_ns} link set eth0 up
 	ip -n ${c_ns} addr add ${c_ip4}/24 dev eth0
-	ip -n ${c_ns} addr add ${c_ip6}/24 dev eth0
+	ip -n ${c_ns} addr add ${c_ip6}/24 dev eth0 nodad
 }
 
 client_destroy()
-- 
2.55.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] selftests: bonding: disable DAD for IPv6 addresses
  2026-08-08 16:23 [PATCH net-next] selftests: bonding: disable DAD for IPv6 addresses Jakub Kicinski
@ 2026-08-10  2:02 ` Hangbin Liu
  2026-08-10 18:14   ` Jakub Kicinski
  0 siblings, 1 reply; 3+ messages in thread
From: Hangbin Liu @ 2026-08-10  2:02 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: davem, netdev, edumazet, pabeni, andrew+netdev, horms, jv, shuah,
	linux-kselftest

On Sat, Aug 08, 2026 at 09:23:45AM -0700, Jakub Kicinski wrote:
> bond_reset() waits up to 2 seconds for IPv6 connectivity.
> With default settings DAD itself may take almost 2 seconds,
> causing flakes on debug builds. It used to flake once or
> twice a week, recently it started failing once a day.
> Probably some downstream changes to scheduler, or our machines
> go busier.
> 
> A lot of selftests already use nodad, let's use nodad in bonding, too.
> I don't see an obvious reason why DAD would be important to the test.

In this case, how about add nodad to all IPv6 address setting on bonding
tests, e.g. bond_options.sh, bond_macvlan_ipvlan.sh.

After that, we may event remove the sleep time in bond_macvlan_ipvlan.sh.
In my local testing all the macvlan/ipvlan test passed with nodad set.

Thanks
Hangbin
> 
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> ---
> CC: liuhangbin@gmail.com
> CC: jv@jvosburgh.net
> CC: shuah@kernel.org
> CC: linux-kselftest@vger.kernel.org
> ---
>  .../selftests/drivers/net/bonding/bond_topo_2d1c.sh    | 10 ++++------
>  1 file changed, 4 insertions(+), 6 deletions(-)
> 
> diff --git a/tools/testing/selftests/drivers/net/bonding/bond_topo_2d1c.sh b/tools/testing/selftests/drivers/net/bonding/bond_topo_2d1c.sh
> index 167aa4a4a12a..903c7a6c7287 100644
> --- a/tools/testing/selftests/drivers/net/bonding/bond_topo_2d1c.sh
> +++ b/tools/testing/selftests/drivers/net/bonding/bond_topo_2d1c.sh
> @@ -48,7 +48,7 @@ gateway_create()
>  	ip -n ${g_ns} link add br0 type bridge
>  	ip -n ${g_ns} link set br0 up
>  	ip -n ${g_ns} addr add ${g_ip4}/24 dev br0
> -	ip -n ${g_ns} addr add ${g_ip6}/24 dev br0
> +	ip -n ${g_ns} addr add ${g_ip6}/24 dev br0 nodad
>  }
>  
>  gateway_destroy()
> @@ -75,7 +75,7 @@ server_create()
>  
>  	ip -n ${s_ns} link set bond0 up
>  	ip -n ${s_ns} addr add ${s_ip4}/24 dev bond0
> -	ip -n ${s_ns} addr add ${s_ip6}/24 dev bond0
> +	ip -n ${s_ns} addr add ${s_ip6}/24 dev bond0 nodad
>  }
>  
>  # Reset bond with new mode and options
> @@ -97,9 +97,7 @@ bond_reset()
>  
>  	ip -n ${s_ns} link set bond0 up
>  	ip -n ${s_ns} addr add ${s_ip4}/24 dev bond0
> -	ip -n ${s_ns} addr add ${s_ip6}/24 dev bond0
> -	# Wait for IPv6 address ready as it needs DAD
> -	slowwait 2 ip netns exec ${s_ns} ping6 ${c_ip6} -c 1 -W 0.1 &> /dev/null
> +	ip -n ${s_ns} addr add ${s_ip6}/24 dev bond0 nodad
>  }
>  
>  server_destroy()
> @@ -124,7 +122,7 @@ client_create()
>  
>  	ip -n ${c_ns} link set eth0 up
>  	ip -n ${c_ns} addr add ${c_ip4}/24 dev eth0
> -	ip -n ${c_ns} addr add ${c_ip6}/24 dev eth0
> +	ip -n ${c_ns} addr add ${c_ip6}/24 dev eth0 nodad
>  }
>  
>  client_destroy()
> -- 
> 2.55.0
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] selftests: bonding: disable DAD for IPv6 addresses
  2026-08-10  2:02 ` Hangbin Liu
@ 2026-08-10 18:14   ` Jakub Kicinski
  0 siblings, 0 replies; 3+ messages in thread
From: Jakub Kicinski @ 2026-08-10 18:14 UTC (permalink / raw)
  To: Hangbin Liu
  Cc: davem, netdev, edumazet, pabeni, andrew+netdev, horms, jv, shuah,
	linux-kselftest

On Mon, 10 Aug 2026 10:02:10 +0800 Hangbin Liu wrote:
> On Sat, Aug 08, 2026 at 09:23:45AM -0700, Jakub Kicinski wrote:
> > bond_reset() waits up to 2 seconds for IPv6 connectivity.
> > With default settings DAD itself may take almost 2 seconds,
> > causing flakes on debug builds. It used to flake once or
> > twice a week, recently it started failing once a day.
> > Probably some downstream changes to scheduler, or our machines
> > go busier.
> > 
> > A lot of selftests already use nodad, let's use nodad in bonding, too.
> > I don't see an obvious reason why DAD would be important to the test.  
> 
> In this case, how about add nodad to all IPv6 address setting on bonding
> tests, e.g. bond_options.sh, bond_macvlan_ipvlan.sh.
> 
> After that, we may event remove the sleep time in bond_macvlan_ipvlan.sh.
> In my local testing all the macvlan/ipvlan test passed with nodad set.

Can you do that as a follow up, please?

bond_options.sh is the worst offender for flakiness right now.
I would like to squash these flakes ASAP.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-08-10 18:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-08 16:23 [PATCH net-next] selftests: bonding: disable DAD for IPv6 addresses Jakub Kicinski
2026-08-10  2:02 ` Hangbin Liu
2026-08-10 18:14   ` Jakub Kicinski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox