Skip to content

Commit

Permalink
selftests: net: let big_tcp test cope with slow env
Browse files Browse the repository at this point in the history
[ Upstream commit a19747c ]

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: 6bb382b ("selftests: add a selftest for big tcp")
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Acked-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Paolo Abeni authored and gregkh committed Feb 16, 2024
1 parent 2fb1d2b commit c44e8d4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tools/testing/selftests/net/big_tcp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit c44e8d4

Please sign in to comment.