Re: [PATCH net-next v2 6/6] selftests: net: big_tcp_tunnels: Cover IP tunnels
From: Hangbin Liu
Date: Thu Nov 26 2026 - 21:31:01 EST
On Wed, Nov 25, 2026 at 06:50:15PM -0800, Haishuang Yan wrote:
> Now that ipip, gre, gretap, sit, ip6tnl, ip6gre and ip6gretap allow BIG
> TCP too, run the same checks over them as for vxlan, geneve and
> bareudp, without encapsulation and with FOU and GUE. With FOU and GUE,
> turn on the outer UDP checksum, which is off by default on an IPv4
> underlay, so that it is checked too.
>
> sit only carries IPv6, and is only run with veth tx checksum offload
> enabled: unlike the other tunnels it does not use gro_cells on receive,
> so with software GSO on the sender the receiver does not see any BIG
> TCP packet.
>
> fou is not loaded on demand when it is built as a module, so load fou
> and fou6 first, and skip the FOU and GUE cases if that fails.
>
> Signed-off-by: Haishuang Yan <yanhaishuang@xxxxxxxxxxxxxxxxxxxx>
> ---
> .../testing/selftests/net/big_tcp_tunnels.sh | 139 +++++++++++++++++-
> 1 file changed, 136 insertions(+), 3 deletions(-)
>
> diff --git a/tools/testing/selftests/net/big_tcp_tunnels.sh b/tools/testing/selftests/net/big_tcp_tunnels.sh
> index 9c1482b842b..1e8387fce99 100755
> --- a/tools/testing/selftests/net/big_tcp_tunnels.sh
> +++ b/tools/testing/selftests/net/big_tcp_tunnels.sh
> @@ -1,7 +1,9 @@
[...]
>
> +# For IP tunnels: $1: tunnel family, $2: encapsulation
> cleanup_tunnel() {
> + local fou_args=()
> + local ns
> +
> ip -netns "$CLIENT_NS" link del tun0
> ip -netns "$SERVER_NS" link del tun1
> + if [ "${2:-none}" = none ]; then
> + return 0
> + fi
nit: maybe just [ -z $2 ] ? No need to change if no new version.
> + if [ "$1" = 6 ]; then
> + fou_args=(-6)
> + fi
> + for ns in "$CLIENT_NS" "$SERVER_NS"; do
> + ip -netns "$ns" fou del port "$FOU_PORT" "${fou_args[@]}"
> + done
> }
>
> cleanup() {
> @@ -240,6 +336,30 @@ if ! ip link help 2>&1 | grep gso_ipv4_max_size &> /dev/null; then
> exit "$ksft_skip"
> fi
>
> +# $1: tunnel type, $2: tunnel family, $3: traffic family, $4: encapsulation
> +run_ip_tunnel() {
> + local csum_offload
> +
> + for csum_offload in on off; do
> + # sit does not use gro_cells on receive, so with software GSO
> + # on the sender there is nothing big to receive.
> + if [ "$1" = sit ] && [ "$csum_offload" = off ]; then
> + continue
> + fi
> + setup_tunnel "$1" "$2" "$csum_offload" "$3" "$4" || exit "$?"
> + do_test "$2" "$3" "$csum_offload" || exit "$?"
> + cleanup_tunnel "$2" "$4"
> + done
> +}
> +
> +# fou is not loaded on demand when built as a module
> +ENCAPS=(none)
> +if modprobe -q fou && modprobe -q fou6; then
> + ENCAPS+=(fou gue)
> +else
> + echo "SKIP: FOU and GUE tests, could not load fou and fou6"
> +fi
> +
> WORKDIR=$(mktemp -d)
> trap cleanup EXIT
> setup
> @@ -254,3 +374,16 @@ for tunnel in vxlan geneve bareudp; do
> done
> done
> done
> +for encap in "${ENCAPS[@]}"; do
> + run_ip_tunnel ipip 4 4 "$encap"
> + for traffic_family in 4 6; do
> + run_ip_tunnel gre 4 "$traffic_family" "$encap"
> + run_ip_tunnel gretap 4 "$traffic_family" "$encap"
> + done
> + run_ip_tunnel sit 4 6 "$encap"
> + for traffic_family in 4 6; do
> + run_ip_tunnel ip6tnl 6 "$traffic_family" "$encap"
> + run_ip_tunnel ip6gre 6 "$traffic_family" "$encap"
> + run_ip_tunnel ip6gretap 6 "$traffic_family" "$encap"
> + done
> +done
> --
> 2.43.0
>
>
Tested-by: Hangbin Liu <liuhangbin@xxxxxxxxxx>
Reviewed-by: Hangbin Liu <liuhangbin@xxxxxxxxxx>