mptcp.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 mptcp-net] selftests: mptcp: enable syncookie only in absence of reorders
@ 2021-06-03 15:09 Paolo Abeni
  2021-06-04  0:07 ` Mat Martineau
  2021-06-04 20:31 ` Matthieu Baerts
  0 siblings, 2 replies; 3+ messages in thread
From: Paolo Abeni @ 2021-06-03 15:09 UTC (permalink / raw)
  To: mptcp; +Cc: fwestpha

Syncookie validation may fail for OoO packets, causing spurious
resets and self-tests failures, so let's force syncookie only
for tests iteration with no OoO.

Fixes: fed61c4b584c ("selftests: mptcp: make 2nd net namespace use tcp syn cookies unconditionally")
Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/198
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
---
 tools/testing/selftests/net/mptcp/mptcp_connect.sh | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.sh b/tools/testing/selftests/net/mptcp/mptcp_connect.sh
index 69351c3eb68c..2484fb6a9a8d 100755
--- a/tools/testing/selftests/net/mptcp/mptcp_connect.sh
+++ b/tools/testing/selftests/net/mptcp/mptcp_connect.sh
@@ -202,9 +202,6 @@ ip -net "$ns4" link set ns4eth3 up
 ip -net "$ns4" route add default via 10.0.3.2
 ip -net "$ns4" route add default via dead:beef:3::2
 
-# use TCP syn cookies, even if no flooding was detected.
-ip netns exec "$ns2" sysctl -q net.ipv4.tcp_syncookies=2
-
 if $checksum; then
 	for i in "$ns1" "$ns2" "$ns3" "$ns4";do
 		ip netns exec $i sysctl -q net.mptcp.checksum_enabled=1
@@ -748,6 +745,14 @@ for sender in $ns1 $ns2 $ns3 $ns4;do
 		exit $ret
 	fi
 
+	# ns1<->ns2 is not subject to reordering/tc delays. Use it to test
+	# mptcp syncookie support.
+	if [ $sender = $ns1 ]; then
+		ip netns exec "$ns2" sysctl -q net.ipv4.tcp_syncookies=2
+	else
+		ip netns exec "$ns2" sysctl -q net.ipv4.tcp_syncookies=1
+	fi
+
 	run_tests "$ns2" $sender 10.0.1.2
 	run_tests "$ns2" $sender dead:beef:1::2
 	run_tests "$ns2" $sender 10.0.2.1
-- 
2.26.3


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

* Re: [PATCH v2 mptcp-net] selftests: mptcp: enable syncookie only in absence of reorders
  2021-06-03 15:09 [PATCH v2 mptcp-net] selftests: mptcp: enable syncookie only in absence of reorders Paolo Abeni
@ 2021-06-04  0:07 ` Mat Martineau
  2021-06-04 20:31 ` Matthieu Baerts
  1 sibling, 0 replies; 3+ messages in thread
From: Mat Martineau @ 2021-06-04  0:07 UTC (permalink / raw)
  To: Paolo Abeni; +Cc: mptcp, fwestpha

On Thu, 3 Jun 2021, Paolo Abeni wrote:

> Syncookie validation may fail for OoO packets, causing spurious
> resets and self-tests failures, so let's force syncookie only
> for tests iteration with no OoO.
>
> Fixes: fed61c4b584c ("selftests: mptcp: make 2nd net namespace use tcp syn cookies unconditionally")
> Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/198
> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
> ---
> tools/testing/selftests/net/mptcp/mptcp_connect.sh | 11 ++++++++---
> 1 file changed, 8 insertions(+), 3 deletions(-)
>

Looks good to me.

Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>


> diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.sh b/tools/testing/selftests/net/mptcp/mptcp_connect.sh
> index 69351c3eb68c..2484fb6a9a8d 100755
> --- a/tools/testing/selftests/net/mptcp/mptcp_connect.sh
> +++ b/tools/testing/selftests/net/mptcp/mptcp_connect.sh
> @@ -202,9 +202,6 @@ ip -net "$ns4" link set ns4eth3 up
> ip -net "$ns4" route add default via 10.0.3.2
> ip -net "$ns4" route add default via dead:beef:3::2
>
> -# use TCP syn cookies, even if no flooding was detected.
> -ip netns exec "$ns2" sysctl -q net.ipv4.tcp_syncookies=2
> -
> if $checksum; then
> 	for i in "$ns1" "$ns2" "$ns3" "$ns4";do
> 		ip netns exec $i sysctl -q net.mptcp.checksum_enabled=1
> @@ -748,6 +745,14 @@ for sender in $ns1 $ns2 $ns3 $ns4;do
> 		exit $ret
> 	fi
>
> +	# ns1<->ns2 is not subject to reordering/tc delays. Use it to test
> +	# mptcp syncookie support.
> +	if [ $sender = $ns1 ]; then
> +		ip netns exec "$ns2" sysctl -q net.ipv4.tcp_syncookies=2
> +	else
> +		ip netns exec "$ns2" sysctl -q net.ipv4.tcp_syncookies=1
> +	fi
> +
> 	run_tests "$ns2" $sender 10.0.1.2
> 	run_tests "$ns2" $sender dead:beef:1::2
> 	run_tests "$ns2" $sender 10.0.2.1
> -- 
> 2.26.3
>
>
>

--
Mat Martineau
Intel

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

* Re: [PATCH v2 mptcp-net] selftests: mptcp: enable syncookie only in absence of reorders
  2021-06-03 15:09 [PATCH v2 mptcp-net] selftests: mptcp: enable syncookie only in absence of reorders Paolo Abeni
  2021-06-04  0:07 ` Mat Martineau
@ 2021-06-04 20:31 ` Matthieu Baerts
  1 sibling, 0 replies; 3+ messages in thread
From: Matthieu Baerts @ 2021-06-04 20:31 UTC (permalink / raw)
  To: Paolo Abeni, Mat Martineau; +Cc: fwestpha, mptcp

Hi Paolo, Mat,

On 03/06/2021 17:09, Paolo Abeni wrote:
> Syncookie validation may fail for OoO packets, causing spurious
> resets and self-tests failures, so let's force syncookie only
> for tests iteration with no OoO.
> 
> Fixes: fed61c4b584c ("selftests: mptcp: make 2nd net namespace use tcp syn cookies unconditionally")
> Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/198
> Signed-off-by: Paolo Abeni <pabeni@redhat.com>

Thank you for the patch and the review!

- 48490d1c2717: selftests: mptcp: enable syncookie only in absence of
reorders
- ba645dc88491: conflict in
t/selftests-mptcp-enable-checksum-in-mptcp_connect.sh
- Results: 102ad1154235..ff4906881c2f

Builds and tests are now in progress:

https://cirrus-ci.com/github/multipath-tcp/mptcp_net-next/export/20210604T203059
https://github.com/multipath-tcp/mptcp_net-next/actions/workflows/build-validation.yml?query=branch:export/20210604T203059

Cheers,
Matt
-- 
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net

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

end of thread, other threads:[~2021-06-04 20:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-03 15:09 [PATCH v2 mptcp-net] selftests: mptcp: enable syncookie only in absence of reorders Paolo Abeni
2021-06-04  0:07 ` Mat Martineau
2021-06-04 20:31 ` Matthieu Baerts

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