From: Paolo Abeni Date: Fri, 2 Feb 2024 16:06:59 +0000 (+0100) Subject: selftests: net: let big_tcp test cope with slow env X-Git-Tag: v6.6.17~57 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=94cac7da5889c80c60a8e8e68c57a083b465f43b;p=platform%2Fkernel%2Flinux-starfive.git selftests: net: let big_tcp test cope with slow env [ Upstream commit a19747c3b9bf6476cc36d0a3a5ef0ff92999169e ] In very slow environments, most big TCP cases including segmentation and reassembly of big TCP packets have a good chance to fail: by default the TCP client uses write size well below 64K. If the host is low enough autocorking is unable to build real big TCP packets. Address the issue using much larger write operations. Note that is hard to observe the issue without an extremely slow and/or overloaded environment; reduce the TCP transfer time to allow for much easier/faster reproducibility. Fixes: 6bb382bcf742 ("selftests: add a selftest for big tcp") Signed-off-by: Paolo Abeni Reviewed-by: Eric Dumazet Acked-by: Xin Long Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- diff --git a/tools/testing/selftests/net/big_tcp.sh b/tools/testing/selftests/net/big_tcp.sh index cde9a91..2db9d15c 100755 --- a/tools/testing/selftests/net/big_tcp.sh +++ b/tools/testing/selftests/net/big_tcp.sh @@ -122,7 +122,9 @@ do_netperf() { local netns=$1 [ "$NF" = "6" ] && serip=$SERVER_IP6 - ip net exec $netns netperf -$NF -t TCP_STREAM -H $serip 2>&1 >/dev/null + + # use large write to be sure to generate big tcp packets + ip net exec $netns netperf -$NF -t TCP_STREAM -l 1 -H $serip -- -m 262144 2>&1 >/dev/null } do_test() {