🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.netdev
10 messages
10 total messages Started by Haishuang Yan Thu, 26 Nov 2026 02:50
[PATCH net-next v2 0/6] ip tunnels: Enable BIG TCP packets
#22870
Author: Haishuang Yan
Date: Thu, 26 Nov 2026 02:50
52 lines
10872 bytes
Following vxlan and geneve, this series allows BIG TCP on ipip, gre,
gretap, sit, ip6tnl, ip6gre and ip6gretap, which also covers their FOU
and GUE encapsulation. The UDP length of FOU and GUE is already handled
since commit 47282504ad21 ("udp: Support BIG TCP GSO packets where they
can occur").

Each driver patch bumps tso_max_size to GSO_MAX_SIZE in the setup of
the device, like vxlan and geneve do. The default gso_max_size and
gso_ipv4_max_size stay at 64KB. vti, erspan and ip6erspan are left
alone.

Patch 6 extends big_tcp_tunnels.sh, which already covers vxlan, geneve
and bareudp, to check that BIG TCP packets go through all these devices,
without encapsulation and with FOU and GUE, with and without veth tx
checksum offload. sit is only checked with checksum offload, as it does
not use gro_cells on receive.

With iperf3 over veth in a KVM guest, raising gso_max_size from 64KB to
196608 gives +20% to +39% depending on the tunnel, see the commit
messages for the numbers.

This work was done with the help of an AI coding assistant.

Changes in v2:
- Patches 3-5: mention GUE in the changelog.
- Patch 6: test GUE over sit and over the IPv6 underlay too, skip FOU and
  GUE if the modules can't be loaded, fix the explanation for sit
  (Sashiko). Turn on the outer UDP checksum with FOU and GUE (Alice).
- Collect Reviewed-by from Alice on patches 1-5 (patch 6 changed).
v1: https://lore.kernel.org/netdev/20261124013124.3693-1-yanhaishuang@cmss.chinamobile.com/

Haishuang Yan (6):
  ipip: Enable BIG TCP packets
  gre: Enable BIG TCP packets
  sit: Enable BIG TCP packets
  ip6_tunnel: Enable BIG TCP packets
  ip6_gre: Enable BIG TCP packets
  selftests: net: big_tcp_tunnels: Cover IP tunnels

 net/ipv4/ip_gre.c                             |   2 +
 net/ipv4/ipip.c                               |   1 +
 net/ipv6/ip6_gre.c                            |   2 +
 net/ipv6/ip6_tunnel.c                         |   1 +
 net/ipv6/sit.c                                |   1 +
 .../testing/selftests/net/big_tcp_tunnels.sh  | 139 +++++++++++++++++-
 6 files changed, 143 insertions(+), 3 deletions(-)


base-commit: b7ba0f96da0a33d893f514f18cfea2ffdce3a5ed
-- 
2.43.0
[PATCH net-next v2 3/6] sit: Enable BIG TCP packets
#22873
Author: Haishuang Yan
Date: Thu, 26 Nov 2026 02:50
46 lines
10649 bytes
Commit f3d0f753f066 ("vxlan: Enable BIG TCP packets") and
commit 03ebe91b0f61 ("geneve: Enable BIG TCP packets") allowed BIG TCP
on UDP tunnels. sit can carry BIG TCP packets as well: the outer IPv4
header gets its total length from iph_set_totlen() on output, the GSO
path already handles BIG TCP, and FOU encapsulation sets the UDP length
with udp_set_len() since commit 47282504ad21 ("udp: Support BIG TCP GSO
packets where they can occur").

Bump tso_max_size up to GSO_MAX_SIZE so that the admin can use BIG TCP
with sit. The default gso_max_size and gso_ipv4_max_size stay at 64KB,
so nothing changes unless they are raised explicitly.

iperf3 TCP over sit between two netns connected by veth, without
encapsulation, 3 runs of 10 seconds each, in a KVM guest with 8 vCPUs
on an Intel Core i7-14700 host:

  gso_max_size 65536:   96.0,  95.4,  98.0 Gbit/s
  gso_max_size 196608: 136.9, 131.0, 129.8 Gbit/s (+37%)

On the receive side, GRO does not build sit packets larger than 64KB, so
the gain comes from the sender when the underlay offloads GSO.

A later patch in this series extends big_tcp_tunnels.sh to cover sit
without encapsulation and with FOU and GUE.

Reviewed-by: Alice Mikityanska <alice.kernel@fastmail.im>
Signed-off-by: Haishuang Yan <yanhaishuang@cmss.chinamobile.com>
---
 net/ipv6/sit.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
index a7ec800216a..97044b1cad2 100644
--- a/net/ipv6/sit.c
+++ b/net/ipv6/sit.c
@@ -1577,6 +1577,7 @@ static void ipip6_tunnel_setup(struct net_device *dev)
 	dev->max_mtu		= IP6_MAX_MTU - t_hlen;
 	dev->flags		= IFF_NOARP;
 	netif_keep_dst(dev);
+	netif_set_tso_max_size(dev, GSO_MAX_SIZE);
 	dev->addr_len		= 4;
 	dev->lltx		= true;
 	dev->features		|= SIT_FEATURES;
-- 
2.43.0
[PATCH net-next v2 4/6] ip6_tunnel: Enable BIG TCP packets
#22871
Author: Haishuang Yan
Date: Thu, 26 Nov 2026 02:50
43 lines
10557 bytes
Commit f3d0f753f066 ("vxlan: Enable BIG TCP packets") and
commit 03ebe91b0f61 ("geneve: Enable BIG TCP packets") allowed BIG TCP
on UDP tunnels. ip6tnl can carry BIG TCP packets as well: IPv6 BIG TCP
no longer needs a hop-by-hop jumbo header, the GSO and GRO paths already
handle it, and FOU encapsulation sets the UDP length with udp_set_len()
since commit 47282504ad21 ("udp: Support BIG TCP GSO packets where they
can occur").

Bump tso_max_size up to GSO_MAX_SIZE so that the admin can use BIG TCP
with ip6tnl. The default gso_max_size and gso_ipv4_max_size stay at
64KB, so nothing changes unless they are raised explicitly.

iperf3 TCP over ip6tnl, with IPv4 traffic between two netns connected by
veth, without encapsulation, 3 runs of 10 seconds each, in a KVM guest
with 8 vCPUs on an Intel Core i7-14700 host:

  gso_max_size/gso_ipv4_max_size 65536:   93.0,  90.8,  83.3 Gbit/s
  gso_max_size/gso_ipv4_max_size 196608: 134.8, 123.4, 112.8 Gbit/s (+39%)

A later patch in this series extends big_tcp_tunnels.sh to cover ip6tnl
with IPv4 and IPv6 traffic, without encapsulation and with FOU and GUE.

Reviewed-by: Alice Mikityanska <alice.kernel@fastmail.im>
Signed-off-by: Haishuang Yan <yanhaishuang@cmss.chinamobile.com>
---
 net/ipv6/ip6_tunnel.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
index 64a184bca46..040012cdf15 100644
--- a/net/ipv6/ip6_tunnel.c
+++ b/net/ipv6/ip6_tunnel.c
@@ -1919,6 +1919,7 @@ static void ip6_tnl_dev_setup(struct net_device *dev)
 	dev->lltx = true;
 	dev->pcpu_stat_type = NETDEV_PCPU_STAT_TSTATS;
 	netif_keep_dst(dev);
+	netif_set_tso_max_size(dev, GSO_MAX_SIZE);
 
 	dev->features		|= IPXIPX_FEATURES;
 	dev->hw_features	|= IPXIPX_FEATURES;
-- 
2.43.0
[PATCH net-next v2 5/6] ip6_gre: Enable BIG TCP packets
#22869
Author: Haishuang Yan
Date: Thu, 26 Nov 2026 02:50
56 lines
11010 bytes
Commit f3d0f753f066 ("vxlan: Enable BIG TCP packets") and
commit 03ebe91b0f61 ("geneve: Enable BIG TCP packets") allowed BIG TCP
on UDP tunnels. ip6gre and ip6gretap can carry BIG TCP packets as well:
IPv6 BIG TCP no longer needs a hop-by-hop jumbo header, the GRE header
has no length field, the GSO and GRO paths already handle it, and FOU
encapsulation sets the UDP length with udp_set_len() since
commit 47282504ad21 ("udp: Support BIG TCP GSO packets where they can
occur").

Bump tso_max_size up to GSO_MAX_SIZE so that the admin can use BIG TCP
with ip6gre and ip6gretap. ip6erspan is left alone. The default
gso_max_size and gso_ipv4_max_size stay at 64KB, so nothing changes
unless they are raised explicitly.

iperf3 TCP over ip6gre and ip6gretap, with IPv4 traffic between two
netns connected by veth, without encapsulation, 3 runs of 10 seconds
each, in a KVM guest with 8 vCPUs on an Intel Core i7-14700 host:

  ip6gre,    65536:   84.7,  84.4,  90.2 Gbit/s
  ip6gre,    196608: 117.7, 112.5, 128.4 Gbit/s (+38%)
  ip6gretap, 65536:  103.1,  97.9, 102.4 Gbit/s
  ip6gretap, 196608: 123.0, 125.7, 124.8 Gbit/s (+23%)

A later patch in this series extends big_tcp_tunnels.sh to cover ip6gre
and ip6gretap with IPv4 and IPv6 traffic, without encapsulation and with
FOU and GUE.

Reviewed-by: Alice Mikityanska <alice.kernel@fastmail.im>
Signed-off-by: Haishuang Yan <yanhaishuang@cmss.chinamobile.com>
---
 net/ipv6/ip6_gre.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c
index 26c0e1c4de1..0ace21db3b4 100644
--- a/net/ipv6/ip6_gre.c
+++ b/net/ipv6/ip6_gre.c
@@ -1462,6 +1462,7 @@ static void ip6gre_tunnel_setup(struct net_device *dev)
 	dev->flags |= IFF_NOARP;
 	dev->addr_len = sizeof(struct in6_addr);
 	netif_keep_dst(dev);
+	netif_set_tso_max_size(dev, GSO_MAX_SIZE);
 	/* This perm addr will be used as interface identifier by IPv6 */
 	dev->addr_assign_type = NET_ADDR_RANDOM;
 	eth_random_addr(dev->perm_addr);
@@ -1934,6 +1935,7 @@ static void ip6gre_tap_setup(struct net_device *dev)
 	dev->priv_flags &= ~IFF_TX_SKB_SHARING;
 	dev->priv_flags |= IFF_LIVE_ADDR_CHANGE;
 	netif_keep_dst(dev);
+	netif_set_tso_max_size(dev, GSO_MAX_SIZE);
 }
 
 static bool ip6gre_netlink_encap_parms(struct nlattr *data[],
-- 
2.43.0
[PATCH net-next v2 6/6] selftests: net: big_tcp_tunnels: Cover IP tunnels
#22872
Author: Haishuang Yan
Date: Thu, 26 Nov 2026 02:50
228 lines
15480 bytes
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 @@
 #!/usr/bin/env bash
 # SPDX-License-Identifier: GPL-2.0
 #
-# Testing for IPv4 and IPv6 BIG TCP over VXLAN, GENEVE and bareudp tunnels.
+# Testing for IPv4 and IPv6 BIG TCP over VXLAN, GENEVE and bareudp tunnels,
+# and over ipip, gre, gretap, sit, ip6tnl, ip6gre and ip6gretap tunnels,
+# without encapsulation and with FOU and GUE.
 
 source "$(dirname "$0")/lib.sh"
 
@@ -17,6 +19,8 @@ CLIENT_IP6="2001:db8::1:2"
 CLIENT_IP4_TUN="192.168.2.2"
 CLIENT_IP6_TUN="2001:db8::2:2"
 
+FOU_PORT=5555
+
 # Kselftest framework requirement - SKIP code is 4.
 ksft_skip=4
 
@@ -71,15 +75,86 @@ setup_bareudp() {
 	return 1
 }
 
+# $1: tunnel type, $2: traffic family
+# Prints the IP protocol carried by FOU for this tunnel.
+fou_ipproto() {
+	case "$1" in
+	ipip)
+		echo 4
+		;;
+	sit)
+		echo 41
+		;;
+	ip6tnl)
+		if [ "$2" = 4 ]; then
+			echo 4
+		else
+			echo 41
+		fi
+		;;
+	*)
+		echo 47
+		;;
+	esac
+}
+
+# Create an IP tunnel device, with FOU or GUE encapsulation if requested.
+# $1: netns, $2: device, $3: tunnel type, $4: tunnel family,
+# $5: traffic family, $6: encapsulation (none, fou or gue),
+# $7: local underlay address, $8: remote one
+setup_ip_tunnel() {
+	local encap_args=()
+	local fou_args=()
+	local mode=()
+
+	if [ "$4" = 6 ]; then
+		fou_args=(-6)
+	fi
+	if [ "$6" = fou ]; then
+		ip -netns "$1" fou add port "$FOU_PORT" \
+			ipproto "$(fou_ipproto "$3" "$5")" "${fou_args[@]}" ||
+			return 1
+	elif [ "$6" = gue ]; then
+		ip -netns "$1" fou add port "$FOU_PORT" gue "${fou_args[@]}" ||
+			return 1
+	fi
+	if [ "$6" != none ]; then
+		encap_args=(encap "$6" encap-sport auto encap-dport "$FOU_PORT")
+		# Check the outer UDP checksum too
+		if [ "$4" = 4 ]; then
+			encap_args+=(encap-csum)
+		else
+			encap_args+=(encap-udp6-csum)
+		fi
+	fi
+	if [ "$3" = ip6tnl ]; then
+		if [ "$5" = 4 ]; then
+			mode=(mode ipip6)
+		else
+			mode=(mode ip6ip6)
+		fi
+	fi
+
+	ip -netns "$1" link add "$2" type "$3" "${mode[@]}" \
+		local "$7" remote "$8" "${encap_args[@]}"
+}
+
+# $1: tunnel type, $2: tunnel family, $3: veth tx csum offload,
+# and for IP tunnels: $4: traffic family, $5: encapsulation
 setup_tunnel() {
+	local name="${1^^}"
+
+	if [ "${5:-none}" != none ]; then
+		name="$name/${5^^}"
+	fi
 	if [ "$2" = 4 ]; then
 		SERVER_IP="$SERVER_IP4"
 		CLIENT_IP="$CLIENT_IP4"
-		echo "Setting up ${1^^} over IPv4, veth tx csum offload $3"
+		echo "Setting up $name over IPv4, veth tx csum offload $3"
 	else
 		SERVER_IP="$SERVER_IP6"
 		CLIENT_IP="$CLIENT_IP6"
-		echo "Setting up ${1^^} over IPv6, veth tx csum offload $3"
+		echo "Setting up $name over IPv6, veth tx csum offload $3"
 	fi
 
 	case "$1" in
@@ -95,6 +170,10 @@ setup_tunnel() {
 		setup_bareudp "$CLIENT_NS" tun0 "$CLIENT_IP" "$SERVER_IP" ||
 			return 1
 		;;
+	*)
+		setup_ip_tunnel "$CLIENT_NS" tun0 "$1" "$2" "$4" "$5" \
+			"$CLIENT_IP" "$SERVER_IP" || return 1
+		;;
 	esac
 	ip -netns "$CLIENT_NS" link set tun0 up
 	ip -netns "$CLIENT_NS" addr replace "$CLIENT_IP4_TUN/24" dev tun0
@@ -115,6 +194,10 @@ setup_tunnel() {
 		setup_bareudp "$SERVER_NS" tun1 "$SERVER_IP" "$CLIENT_IP" ||
 			return 1
 		;;
+	*)
+		setup_ip_tunnel "$SERVER_NS" tun1 "$1" "$2" "$4" "$5" \
+			"$SERVER_IP" "$CLIENT_IP" || return 1
+		;;
 	esac
 	ip -netns "$SERVER_NS" link set tun1 up
 	ip -netns "$SERVER_NS" addr replace "$SERVER_IP4_TUN/24" dev tun1
@@ -127,9 +210,22 @@ setup_tunnel() {
 	ip netns exec "$SERVER_NS" ethtool -K link1 tx-checksumming "$3" > /dev/null
 }
 
+# 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
+	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
Re: [PATCH net-next v2 3/6] sit: Enable BIG TCP packets
#22952
Author: Hangbin Liu
Date: Thu, 26 Nov 2026 08:12
51 lines
10513 bytes
On Wed, Nov 25, 2026 at 06:50:12PM -0800, Haishuang Yan wrote:
> Commit f3d0f753f066 ("vxlan: Enable BIG TCP packets") and
> commit 03ebe91b0f61 ("geneve: Enable BIG TCP packets") allowed BIG TCP
> on UDP tunnels. sit can carry BIG TCP packets as well: the outer IPv4
> header gets its total length from iph_set_totlen() on output, the GSO
> path already handles BIG TCP, and FOU encapsulation sets the UDP length
> with udp_set_len() since commit 47282504ad21 ("udp: Support BIG TCP GSO
> packets where they can occur").
> 
> Bump tso_max_size up to GSO_MAX_SIZE so that the admin can use BIG TCP
> with sit. The default gso_max_size and gso_ipv4_max_size stay at 64KB,
> so nothing changes unless they are raised explicitly.
> 
> iperf3 TCP over sit between two netns connected by veth, without
> encapsulation, 3 runs of 10 seconds each, in a KVM guest with 8 vCPUs
> on an Intel Core i7-14700 host:
> 
>   gso_max_size 65536:   96.0,  95.4,  98.0 Gbit/s
>   gso_max_size 196608: 136.9, 131.0, 129.8 Gbit/s (+37%)
> 
> On the receive side, GRO does not build sit packets larger than 64KB, so
> the gain comes from the sender when the underlay offloads GSO.
> 
> A later patch in this series extends big_tcp_tunnels.sh to cover sit
> without encapsulation and with FOU and GUE.
> 
> Reviewed-by: Alice Mikityanska <alice.kernel@fastmail.im>
> Signed-off-by: Haishuang Yan <yanhaishuang@cmss.chinamobile.com>
> ---
>  net/ipv6/sit.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
> index a7ec800216a..97044b1cad2 100644
> --- a/net/ipv6/sit.c
> +++ b/net/ipv6/sit.c
> @@ -1577,6 +1577,7 @@ static void ipip6_tunnel_setup(struct net_device *dev)
>  	dev->max_mtu		= IP6_MAX_MTU - t_hlen;
>  	dev->flags		= IFF_NOARP;
>  	netif_keep_dst(dev);
> +	netif_set_tso_max_size(dev, GSO_MAX_SIZE);
>  	dev->addr_len		= 4;
>  	dev->lltx		= true;
>  	dev->features		|= SIT_FEATURES;
> -- 
> 2.43.0
> 
> 
> 
Reviewed-by: Hangbin Liu <liuhangbin@kylinos.cn>
Re: [PATCH net-next v2 4/6] ip6_tunnel: Enable BIG TCP packets
#22953
Author: Hangbin Liu
Date: Thu, 26 Nov 2026 08:13
48 lines
10503 bytes
On Wed, Nov 25, 2026 at 06:50:13PM -0800, Haishuang Yan wrote:
> Commit f3d0f753f066 ("vxlan: Enable BIG TCP packets") and
> commit 03ebe91b0f61 ("geneve: Enable BIG TCP packets") allowed BIG TCP
> on UDP tunnels. ip6tnl can carry BIG TCP packets as well: IPv6 BIG TCP
> no longer needs a hop-by-hop jumbo header, the GSO and GRO paths already
> handle it, and FOU encapsulation sets the UDP length with udp_set_len()
> since commit 47282504ad21 ("udp: Support BIG TCP GSO packets where they
> can occur").
> 
> Bump tso_max_size up to GSO_MAX_SIZE so that the admin can use BIG TCP
> with ip6tnl. The default gso_max_size and gso_ipv4_max_size stay at
> 64KB, so nothing changes unless they are raised explicitly.
> 
> iperf3 TCP over ip6tnl, with IPv4 traffic between two netns connected by
> veth, without encapsulation, 3 runs of 10 seconds each, in a KVM guest
> with 8 vCPUs on an Intel Core i7-14700 host:
> 
>   gso_max_size/gso_ipv4_max_size 65536:   93.0,  90.8,  83.3 Gbit/s
>   gso_max_size/gso_ipv4_max_size 196608: 134.8, 123.4, 112.8 Gbit/s (+39%)
> 
> A later patch in this series extends big_tcp_tunnels.sh to cover ip6tnl
> with IPv4 and IPv6 traffic, without encapsulation and with FOU and GUE.
> 
> Reviewed-by: Alice Mikityanska <alice.kernel@fastmail.im>
> Signed-off-by: Haishuang Yan <yanhaishuang@cmss.chinamobile.com>
> ---
>  net/ipv6/ip6_tunnel.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
> index 64a184bca46..040012cdf15 100644
> --- a/net/ipv6/ip6_tunnel.c
> +++ b/net/ipv6/ip6_tunnel.c
> @@ -1919,6 +1919,7 @@ static void ip6_tnl_dev_setup(struct net_device *dev)
>  	dev->lltx = true;
>  	dev->pcpu_stat_type = NETDEV_PCPU_STAT_TSTATS;
>  	netif_keep_dst(dev);
> +	netif_set_tso_max_size(dev, GSO_MAX_SIZE);
>  
>  	dev->features		|= IPXIPX_FEATURES;
>  	dev->hw_features	|= IPXIPX_FEATURES;
> -- 
> 2.43.0
> 
> 
> 
Reviewed-by: Hangbin Liu <liuhangbin@kylinos.cn>
Re: [PATCH net-next v2 5/6] ip6_gre: Enable BIG TCP packets
#22954
Author: Hangbin Liu
Date: Thu, 26 Nov 2026 08:13
62 lines
11026 bytes
On Wed, Nov 25, 2026 at 06:50:14PM -0800, Haishuang Yan wrote:
> Commit f3d0f753f066 ("vxlan: Enable BIG TCP packets") and
> commit 03ebe91b0f61 ("geneve: Enable BIG TCP packets") allowed BIG TCP
> on UDP tunnels. ip6gre and ip6gretap can carry BIG TCP packets as well:
> IPv6 BIG TCP no longer needs a hop-by-hop jumbo header, the GRE header
> has no length field, the GSO and GRO paths already handle it, and FOU
> encapsulation sets the UDP length with udp_set_len() since
> commit 47282504ad21 ("udp: Support BIG TCP GSO packets where they can
> occur").
> 
> Bump tso_max_size up to GSO_MAX_SIZE so that the admin can use BIG TCP
> with ip6gre and ip6gretap. ip6erspan is left alone. The default
> gso_max_size and gso_ipv4_max_size stay at 64KB, so nothing changes
> unless they are raised explicitly.
> 
> iperf3 TCP over ip6gre and ip6gretap, with IPv4 traffic between two
> netns connected by veth, without encapsulation, 3 runs of 10 seconds
> each, in a KVM guest with 8 vCPUs on an Intel Core i7-14700 host:
> 
>   ip6gre,    65536:   84.7,  84.4,  90.2 Gbit/s
>   ip6gre,    196608: 117.7, 112.5, 128.4 Gbit/s (+38%)
>   ip6gretap, 65536:  103.1,  97.9, 102.4 Gbit/s
>   ip6gretap, 196608: 123.0, 125.7, 124.8 Gbit/s (+23%)
> 
> A later patch in this series extends big_tcp_tunnels.sh to cover ip6gre
> and ip6gretap with IPv4 and IPv6 traffic, without encapsulation and with
> FOU and GUE.
> 
> Reviewed-by: Alice Mikityanska <alice.kernel@fastmail.im>
> Signed-off-by: Haishuang Yan <yanhaishuang@cmss.chinamobile.com>
> ---
>  net/ipv6/ip6_gre.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c
> index 26c0e1c4de1..0ace21db3b4 100644
> --- a/net/ipv6/ip6_gre.c
> +++ b/net/ipv6/ip6_gre.c
> @@ -1462,6 +1462,7 @@ static void ip6gre_tunnel_setup(struct net_device *dev)
>  	dev->flags |= IFF_NOARP;
>  	dev->addr_len = sizeof(struct in6_addr);
>  	netif_keep_dst(dev);
> +	netif_set_tso_max_size(dev, GSO_MAX_SIZE);
>  	/* This perm addr will be used as interface identifier by IPv6 */
>  	dev->addr_assign_type = NET_ADDR_RANDOM;
>  	eth_random_addr(dev->perm_addr);
> @@ -1934,6 +1935,7 @@ static void ip6gre_tap_setup(struct net_device *dev)
>  	dev->priv_flags &= ~IFF_TX_SKB_SHARING;
>  	dev->priv_flags |= IFF_LIVE_ADDR_CHANGE;
>  	netif_keep_dst(dev);
> +	netif_set_tso_max_size(dev, GSO_MAX_SIZE);
>  }
>  
>  static bool ip6gre_netlink_encap_parms(struct nlattr *data[],
> -- 
> 2.43.0
> 
> 
> 

Reviewed-by: Hangbin Liu <liuhangbin@kylinos.cn>
Re: [PATCH net-next v2 6/6] selftests: net: big_tcp_tunnels: Cover IP tunnels
#23293
Author: Hangbin Liu
Date: Fri, 27 Nov 2026 02:30
107 lines
11981 bytes
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>
Re: [PATCH net-next v2 0/6] ip tunnels: Enable BIG TCP packets
#25585
Author: patchwork-bot+netdevbpf
Date: Wed, 02 Dec 2026 03:10
38 lines
9493 bytes
Hello:

This series was applied to netdev/net-next.git (main)
by Willem de Bruijn <willemb@google.com>:

On Wed, 25 Nov 2026 18:50:09 -0800 you wrote:
> Following vxlan and geneve, this series allows BIG TCP on ipip, gre,
> gretap, sit, ip6tnl, ip6gre and ip6gretap, which also covers their FOU
> and GUE encapsulation. The UDP length of FOU and GUE is already handled
> since commit 47282504ad21 ("udp: Support BIG TCP GSO packets where they
> can occur").
> 
> Each driver patch bumps tso_max_size to GSO_MAX_SIZE in the setup of
> the device, like vxlan and geneve do. The default gso_max_size and
> gso_ipv4_max_size stay at 64KB. vti, erspan and ip6erspan are left
> alone.
> 
> [...]

Here is the summary with links:
  - [net-next,v2,1/6] ipip: Enable BIG TCP packets
    https://git.kernel.org/netdev/net-next/c/f1f65de89e6a
  - [net-next,v2,2/6] gre: Enable BIG TCP packets
    https://git.kernel.org/netdev/net-next/c/f813363d5568
  - [net-next,v2,3/6] sit: Enable BIG TCP packets
    https://git.kernel.org/netdev/net-next/c/981c6501320b
  - [net-next,v2,4/6] ip6_tunnel: Enable BIG TCP packets
    https://git.kernel.org/netdev/net-next/c/0826314baacd
  - [net-next,v2,5/6] ip6_gre: Enable BIG TCP packets
    https://git.kernel.org/netdev/net-next/c/4b315fac3edf
  - [net-next,v2,6/6] selftests: net: big_tcp_tunnels: Cover IP tunnels
    https://git.kernel.org/netdev/net-next/c/e6e103292085

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads