]> git.hungrycats.org Git - linux/commitdiff
selftests: net: Lower threshold with csum offload off in big_tcp_tunnels.sh
authorAlice Mikityanska <alice@isovalent.com>
Sat, 22 Aug 2026 12:03:07 +0000 (15:03 +0300)
committerJakub Kicinski <kuba@kernel.org>
Thu, 27 Aug 2026 15:42:28 +0000 (08:42 -0700)
With checksum offload disabled, much fewer BIG TCP packets are generated
due to overall loss of throughput. Use a separate threshold in these
tests, which is 1/10 of the threshold set for the rest of tests.

Fixes: 5cb53743e1ff ("selftests: net: Add a test for BIG TCP in UDP tunnels")
Signed-off-by: Alice Mikityanska <alice@isovalent.com>
Acked-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20260822120308.1165200-4-alice.kernel@fastmail.im
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/big_tcp_tunnels.sh

index e0b41f394ebb5c75e63b2aae030980b1b919e57e..003878df7415facbfa49885f5386d04da83976b6 100755 (executable)
@@ -107,6 +107,8 @@ cleanup() {
 }
 
 do_test() {
+       local packets_threshold="$PACKETS_THRESHOLD"
+
        # When tx csum offload is off, software GSO is performed before passing the
        # packet to veth. Check BIG TCP packets inside the VXLAN tunnel to verify
        # the software checksum path: if the checksum code is broken, these packets
@@ -125,6 +127,7 @@ do_test() {
                else
                        IPTABLES=ip6tables
                fi
+               packets_threshold=$(( PACKETS_THRESHOLD / 10 ))
        fi
        if [ "$2" = 4 ]; then
                IPTABLES_SACK=iptables
@@ -157,8 +160,8 @@ do_test() {
        echo "Captured BIG TCP RX packets: $PACKETS_SERVER"
        echo "Captured BIG TCP TX packets: $PACKETS_CLIENT"
        echo "Captured TCP SACK packets: $PACKETS_SACK"
-       [ "$PACKETS_SERVER" -gt "$PACKETS_THRESHOLD" ] || return 1
-       [ "$PACKETS_CLIENT" -gt "$PACKETS_THRESHOLD" ] || return 1
+       [ "$PACKETS_SERVER" -gt "$packets_threshold" ] || return 1
+       [ "$PACKETS_CLIENT" -gt "$packets_threshold" ] || return 1
        [ "$PACKETS_SACK" -lt "$(( PACKETS_CLIENT / 2 ))" ] || return 1
 }