All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net 1/2] selftests: pmtu: maximum MTU for vti4 is 2^16-1-20
@ 2018-08-30 14:01 Sabrina Dubroca
  2018-08-30 14:01 ` [PATCH net 2/2] selftests: pmtu: detect correct binary to ping ipv6 addresses Sabrina Dubroca
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Sabrina Dubroca @ 2018-08-30 14:01 UTC (permalink / raw)
  To: netdev; +Cc: Sabrina Dubroca, Stefano Brivio, Nicolas Dichtel

Since commit 82612de1c98e ("ip_tunnel: restore binding to ifaces with a
large mtu"), the maximum MTU for vti4 is based on IP_MAX_MTU instead of
the mysterious constant 0xFFF8.  This makes this selftest fail.

Fixes: 82612de1c98e ("ip_tunnel: restore binding to ifaces with a large mtu")
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Acked-by: Stefano Brivio <sbrivio@redhat.com>
---
 tools/testing/selftests/net/pmtu.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/net/pmtu.sh b/tools/testing/selftests/net/pmtu.sh
index f8cc38afffa2..0ecf2609b9a4 100755
--- a/tools/testing/selftests/net/pmtu.sh
+++ b/tools/testing/selftests/net/pmtu.sh
@@ -334,7 +334,7 @@ test_pmtu_vti4_link_add_mtu() {
 	fail=0
 
 	min=68
-	max=$((65528 - 20))
+	max=$((65535 - 20))
 	# Check invalid values first
 	for v in $((min - 1)) $((max + 1)); do
 		${ns_a} ip link add vti4_a mtu ${v} type vti local ${veth4_a_addr} remote ${veth4_b_addr} key 10 2>/dev/null
-- 
2.18.0

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

* [PATCH net 2/2] selftests: pmtu: detect correct binary to ping ipv6 addresses
  2018-08-30 14:01 [PATCH net 1/2] selftests: pmtu: maximum MTU for vti4 is 2^16-1-20 Sabrina Dubroca
@ 2018-08-30 14:01 ` Sabrina Dubroca
  2018-09-01  6:14   ` David Miller
  2018-08-30 15:41 ` [PATCH net 1/2] selftests: pmtu: maximum MTU for vti4 is 2^16-1-20 Nicolas Dichtel
  2018-09-01  6:14 ` David Miller
  2 siblings, 1 reply; 5+ messages in thread
From: Sabrina Dubroca @ 2018-08-30 14:01 UTC (permalink / raw)
  To: netdev; +Cc: Sabrina Dubroca, Stefano Brivio

Some systems don't have the ping6 binary anymore, and use ping for
everything. Detect the absence of ping6 and try to use ping instead.

Fixes: d1f1b9cbf34c ("selftests: net: Introduce first PMTU test")
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Acked-by: Stefano Brivio <sbrivio@redhat.com>
---
 tools/testing/selftests/net/pmtu.sh | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/net/pmtu.sh b/tools/testing/selftests/net/pmtu.sh
index 0ecf2609b9a4..cc2798a0a2d7 100755
--- a/tools/testing/selftests/net/pmtu.sh
+++ b/tools/testing/selftests/net/pmtu.sh
@@ -46,6 +46,9 @@
 # Kselftest framework requirement - SKIP code is 4.
 ksft_skip=4
 
+# Some systems don't have a ping6 binary anymore
+which ping6 > /dev/null 2>&1 && ping6=$(which ping6) || ping6=$(which ping)
+
 tests="
 	pmtu_vti6_exception		vti6: PMTU exceptions
 	pmtu_vti4_exception		vti4: PMTU exceptions
@@ -274,7 +277,7 @@ test_pmtu_vti6_exception() {
 	mtu "${ns_b}" veth_b 4000
 	mtu "${ns_a}" vti6_a 5000
 	mtu "${ns_b}" vti6_b 5000
-	${ns_a} ping6 -q -i 0.1 -w 2 -s 60000 ${vti6_b_addr} > /dev/null
+	${ns_a} ${ping6} -q -i 0.1 -w 2 -s 60000 ${vti6_b_addr} > /dev/null
 
 	# Check that exception was created
 	if [ "$(route_get_dst_pmtu_from_exception "${ns_a}" ${vti6_b_addr})" = "" ]; then
-- 
2.18.0

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

* Re: [PATCH net 1/2] selftests: pmtu: maximum MTU for vti4 is 2^16-1-20
  2018-08-30 14:01 [PATCH net 1/2] selftests: pmtu: maximum MTU for vti4 is 2^16-1-20 Sabrina Dubroca
  2018-08-30 14:01 ` [PATCH net 2/2] selftests: pmtu: detect correct binary to ping ipv6 addresses Sabrina Dubroca
@ 2018-08-30 15:41 ` Nicolas Dichtel
  2018-09-01  6:14 ` David Miller
  2 siblings, 0 replies; 5+ messages in thread
From: Nicolas Dichtel @ 2018-08-30 15:41 UTC (permalink / raw)
  To: Sabrina Dubroca, netdev; +Cc: Stefano Brivio

Le 30/08/2018 à 16:01, Sabrina Dubroca a écrit :
> Since commit 82612de1c98e ("ip_tunnel: restore binding to ifaces with a
> large mtu"), the maximum MTU for vti4 is based on IP_MAX_MTU instead of
> the mysterious constant 0xFFF8.  This makes this selftest fail.
> 
> Fixes: 82612de1c98e ("ip_tunnel: restore binding to ifaces with a large mtu")
> Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
> Acked-by: Stefano Brivio <sbrivio@redhat.com>

Thanks for fixing this.

Acked-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>

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

* Re: [PATCH net 1/2] selftests: pmtu: maximum MTU for vti4 is 2^16-1-20
  2018-08-30 14:01 [PATCH net 1/2] selftests: pmtu: maximum MTU for vti4 is 2^16-1-20 Sabrina Dubroca
  2018-08-30 14:01 ` [PATCH net 2/2] selftests: pmtu: detect correct binary to ping ipv6 addresses Sabrina Dubroca
  2018-08-30 15:41 ` [PATCH net 1/2] selftests: pmtu: maximum MTU for vti4 is 2^16-1-20 Nicolas Dichtel
@ 2018-09-01  6:14 ` David Miller
  2 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2018-09-01  6:14 UTC (permalink / raw)
  To: sd; +Cc: netdev, sbrivio, nicolas.dichtel

From: Sabrina Dubroca <sd@queasysnail.net>
Date: Thu, 30 Aug 2018 16:01:17 +0200

> Since commit 82612de1c98e ("ip_tunnel: restore binding to ifaces with a
> large mtu"), the maximum MTU for vti4 is based on IP_MAX_MTU instead of
> the mysterious constant 0xFFF8.  This makes this selftest fail.
> 
> Fixes: 82612de1c98e ("ip_tunnel: restore binding to ifaces with a large mtu")
> Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
> Acked-by: Stefano Brivio <sbrivio@redhat.com>

Applied.

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

* Re: [PATCH net 2/2] selftests: pmtu: detect correct binary to ping ipv6 addresses
  2018-08-30 14:01 ` [PATCH net 2/2] selftests: pmtu: detect correct binary to ping ipv6 addresses Sabrina Dubroca
@ 2018-09-01  6:14   ` David Miller
  0 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2018-09-01  6:14 UTC (permalink / raw)
  To: sd; +Cc: netdev, sbrivio

From: Sabrina Dubroca <sd@queasysnail.net>
Date: Thu, 30 Aug 2018 16:01:18 +0200

> Some systems don't have the ping6 binary anymore, and use ping for
> everything. Detect the absence of ping6 and try to use ping instead.
> 
> Fixes: d1f1b9cbf34c ("selftests: net: Introduce first PMTU test")
> Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
> Acked-by: Stefano Brivio <sbrivio@redhat.com>

Applied.

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

end of thread, other threads:[~2018-09-01 10:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-30 14:01 [PATCH net 1/2] selftests: pmtu: maximum MTU for vti4 is 2^16-1-20 Sabrina Dubroca
2018-08-30 14:01 ` [PATCH net 2/2] selftests: pmtu: detect correct binary to ping ipv6 addresses Sabrina Dubroca
2018-09-01  6:14   ` David Miller
2018-08-30 15:41 ` [PATCH net 1/2] selftests: pmtu: maximum MTU for vti4 is 2^16-1-20 Nicolas Dichtel
2018-09-01  6:14 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.