[PATCH net-next 2/6] gre: Enable BIG TCP packets
From: Haishuang Yan
Date: Mon Nov 23 2026 - 20:32:19 EST
Commit f3d0f753f066 ("vxlan: Enable BIG TCP packets") and
commit 03ebe91b0f61 ("geneve: Enable BIG TCP packets") allowed BIG TCP
on UDP tunnels. gre and gretap can carry BIG TCP packets as well: the
outer IPv4 header gets its total length from iph_set_totlen() on output,
the GRE header has no length field, the GSO and GRO paths already handle
IPv4 BIG TCP, and FOU and GUE encapsulation set 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 gre and gretap. erspan 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 gre and gretap 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:
gre, 65536: 92.9, 94.2, 93.0 Gbit/s
gre, 196608: 130.6, 128.6, 123.3 Gbit/s (+37%)
gretap, 65536: 105.5, 106.6, 106.6 Gbit/s
gretap, 196608: 124.7, 129.7, 127.5 Gbit/s (+20%)
A later patch in this series extends big_tcp_tunnels.sh to cover gre and
gretap with IPv4 and IPv6 traffic, without encapsulation, and with FOU
and GUE.
Signed-off-by: Haishuang Yan <yanhaishuang@xxxxxxxxxxxxxxxxxxxx>
---
net/ipv4/ip_gre.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
index f8a7c435350..41ec54dcbfd 100644
--- a/net/ipv4/ip_gre.c
+++ b/net/ipv4/ip_gre.c
@@ -1007,6 +1007,7 @@ static void ipgre_tunnel_setup(struct net_device *dev)
{
dev->netdev_ops = &ipgre_netdev_ops;
dev->type = ARPHRD_IPGRE;
+ netif_set_tso_max_size(dev, GSO_MAX_SIZE);
ip_tunnel_setup(dev, ipgre_net_id);
}
@@ -1394,6 +1395,7 @@ static void ipgre_tap_setup(struct net_device *dev)
dev->netdev_ops = &gre_tap_netdev_ops;
dev->priv_flags &= ~IFF_TX_SKB_SHARING;
dev->priv_flags |= IFF_LIVE_ADDR_CHANGE;
+ netif_set_tso_max_size(dev, GSO_MAX_SIZE);
ip_tunnel_setup(dev, gre_tap_net_id);
}
--
2.43.0