summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/net/udpgro_bench.sh
diff options
context:
space:
mode:
authorPaolo Abeni <pabeni@redhat.com>2018-11-07 12:38:37 +0100
committerDavid S. Miller <davem@davemloft.net>2018-11-07 16:23:05 -0800
commit3327a9c46352f111697d93d6134e7bf37c6bffca (patch)
tree49e779a4dbf7f0641b0a983253bbc3aa342782a7 /tools/testing/selftests/net/udpgro_bench.sh
parente87f53b4fab72f95952c17f672088e082e8e79ab (diff)
selftests: add functionals test for UDP GRO
Extends the existing udp programs to allow checking for proper GRO aggregation/GSO size, and run the tests via a shell script, using a veth pair with XDP program attached to trigger the GRO code path. rfc v3 -> v1: - use ip route to attach the xdp helper to the veth rfc v2 -> rfc v3: - add missing test program options documentation - fix sporatic test failures (receiver faster than sender) Signed-off-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/testing/selftests/net/udpgro_bench.sh')
-rwxr-xr-xtools/testing/selftests/net/udpgro_bench.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/testing/selftests/net/udpgro_bench.sh b/tools/testing/selftests/net/udpgro_bench.sh
index 9ef4b1ee0f76..820bc50f6b68 100755
--- a/tools/testing/selftests/net/udpgro_bench.sh
+++ b/tools/testing/selftests/net/udpgro_bench.sh
@@ -18,7 +18,9 @@ run_one() {
# use 'rx' as separator between sender args and receiver args
local -r all="$@"
local -r tx_args=${all%rx*}
- local -r rx_args=${all#*rx}
+ local rx_args=${all#*rx}
+
+ [[ "${tx_args}" == *"-4"* ]] && rx_args="${rx_args} -4"
ip netns add "${PEER_NS}"
ip -netns "${PEER_NS}" link set lo up
@@ -51,10 +53,10 @@ run_udp() {
local -r args=$@
echo "udp gso - over veth touching data"
- run_in_netns ${args} -S rx
+ run_in_netns ${args} -S 0 rx
echo "udp gso and gro - over veth touching data"
- run_in_netns ${args} -S rx -G
+ run_in_netns ${args} -S 0 rx -G
}
run_tcp() {