From: Hangbin Liu <hangbin.liu@linux.dev>
To: Haishuang Yan <yanhaishuang@cmss.chinamobile.com>
Cc: netdev@vger.kernel.org, David Ahern <dsahern@kernel.org>,
Ido Schimmel <idosch@nvidia.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>, Shuah Khan <shuah@kernel.org>,
Alice Mikityanska <alice.kernel@fastmail.im>,
Lorenzo Bianconi <lorenzo.bianconi@oss.qualcomm.com>,
linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v2 6/6] selftests: net: big_tcp_tunnels: Cover IP tunnels
Date: Fri, 27 Nov 2026 10:30:36 +0800 [thread overview]
Message-ID: <awjrTKpsp0dO1qe4@fedora> (raw)
In-Reply-To: <20261126025015.10416-7-yanhaishuang@cmss.chinamobile.com>
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@cmss.chinamobile.com>
> ---
> .../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@kylinos.cn>
Reviewed-by: Hangbin Liu <liuhangbin@kylinos.cn>
prev parent reply other threads:[~2026-11-27 2:30 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-26 2:50 [PATCH net-next v2 0/6] ip tunnels: Enable BIG TCP packets Haishuang Yan
2026-11-26 2:50 ` [PATCH net-next v2 1/6] ipip: " Haishuang Yan
2026-11-26 8:06 ` Hangbin Liu
2026-11-26 2:50 ` [PATCH net-next v2 2/6] gre: " Haishuang Yan
2026-11-26 8:12 ` Hangbin Liu
2026-11-26 2:50 ` [PATCH net-next v2 3/6] sit: " Haishuang Yan
2026-11-26 8:12 ` Hangbin Liu
2026-11-26 2:50 ` [PATCH net-next v2 4/6] ip6_tunnel: " Haishuang Yan
2026-11-26 8:13 ` Hangbin Liu
2026-11-26 2:50 ` [PATCH net-next v2 5/6] ip6_gre: " Haishuang Yan
2026-11-26 8:13 ` Hangbin Liu
2026-11-26 2:50 ` [PATCH net-next v2 6/6] selftests: net: big_tcp_tunnels: Cover IP tunnels Haishuang Yan
2026-11-27 2:30 ` Hangbin Liu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=awjrTKpsp0dO1qe4@fedora \
--to=hangbin.liu@linux.dev \
--cc=alice.kernel@fastmail.im \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@kernel.org \
--cc=horms@kernel.org \
--cc=idosch@nvidia.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=lorenzo.bianconi@oss.qualcomm.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=shuah@kernel.org \
--cc=yanhaishuang@cmss.chinamobile.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox