Article View: linux.kernel.netdev
Article #22229Re: [PATCH net-next 2/6] gre: Enable BIG TCP packets
From: netdev-bot+sashiko
Date: Wed, 25 Nov 2026 01:34
Date: Wed, 25 Nov 2026 01:34
85 lines
10999 bytes
10999 bytes
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.
Low priority / nit picks for your consideration:
- [Low] This patch turns on BIG TCP for gre and gretap (tso_max_size =
GSO_MAX_SIZE in ipgre_tunnel_setup()/ipgre_tap_setup()).
--
gre: Enable BIG TCP packets
This commit raises tso_max_size to GSO_MAX_SIZE for gre and gretap
devices, so an admin can use BIG TCP on them by raising gso_max_size and
gso_ipv4_max_size. erspan is not changed, and the defaults stay at 64KB.
> diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
> index f8a7c43535020..41ec54dcbfdcc 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);
> }
[Severity: Low]
The commit message says FOU and GUE are covered because they "set the UDP
length with udp_set_len()". That covers transmit. Is the receive side in
net/ipv4/fou_core.c also ready for these packets?
Take gre over FOU/GUE with gso_ipv4_max_size raised. A GSO packet larger
than 64KB leaves __ip_local_out() with an outer tot_len of 0, set by
iph_set_totlen(). udp_set_len() also sets uh->len to 0.
On the receiver, ip_rcv_core() accepts this through iph_totlen(), and
__udp4_lib_rcv() accepts it through udp_get_len(). The skb then reaches
fou_recv_pull() and gue_udp_recv(). Both of them do this:
net/ipv4/fou_core.c:fou_recv_pull() {
...
if (fou->family == AF_INET)
ip_hdr(skb)->tot_len = htons(ntohs(ip_hdr(skb)->tot_len) - len);
...
}
Doesn't this wrap when tot_len is 0? For plain FOU it becomes 0 - 8 =
65528. For GUE it becomes 0 - (8 + 4 + optlen).
That non-zero length is written back into the outer header, while the skb
can hold up to 512KB. It breaks the convention that a tot_len of 0 means
"use skb->len".
No in-kernel reader seems to misbehave on this value. After the pull, the
skb is resubmitted as IPPROTO_GRE and goes through
gre_rcv()->ipgre_rcv()->ip_tunnel_rcv(). That path only reads daddr and
tos from the outer header before it drops the header.
The wrong length is still visible in two places:
- raw IPPROTO_GRE sockets, which get the outer header back through the
skb_push() in raw_rcv()
- the header quoted by icmp_send() when no tunnel matches
The big_tcp_tunnels.sh extension later in this series runs this path with
FOU and GUE.
The AF_INET6 branch in both functions has the same pattern for
payload_len. The later ip6_tunnel and ip6_gre patches in the series make
that branch reachable, and no later patch changes fou_core.c.
Would something like iph_set_totlen(iph, iph_totlen(skb, iph) - len) fit
here? Another option is to skip the adjustment when tot_len is 0.
The gretap change in ipgre_tap_setup() exposes the same path.
[ ... ]
--
Sashiko AI review ยท https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261124013124.3693-1-yanhaishuang%40cmss.chinamobile.com
Technical Details
Message-ID:
<179557049527.3135.5031926005314724834@kernel.org>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-370950-linux-kernel-netdev=dewy.ruReferences:
<20261124013124.3693-3-yanhaishuang@cmss.chinamobile.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-370950-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next 2/6] gre: Enable BIG TCP packets Date: Wed, 25 Nov 2026 01:34:55 +0000 Organization: Usenet Network Message-ID: <179557049527.3135.5031926005314724834@kernel.org> References: <20261124013124.3693-3-yanhaishuang@cmss.chinamobile.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="82865"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:kx8q3xJKEMr//h0e3ReUkW9Eqew= sha256:LGvyfIX2PmJWdFqXNM+U5jDUBqdqU0rUDMiPXSQQmOw= sha1:m3EeP9ZFlQnm80MFhqMud3ZASVA= sha256:RyRGwoTIk/iCajuE2dfOXJAVYHc6mKCgKHnjDlD4FMI= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id C5667125E37; Wed, 25 Nov 2026 04:35:17 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.4 X-Spam-Status: No, score=-3.4 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mRL45tazcYt6; Wed, 25 Nov 2026 04:35:14 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-370950-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4]) by mail.dewy.ru (Postfix) with ESMTPS id B0BEC125E35; Wed, 25 Nov 2026 04:35:03 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sin.lore.kernel.org (Postfix) with ESMTP id B32932151D; Wed, 25 Nov 2026 01:35:00 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1795570497; b=K4VXyi5do51lOGvJ4jWk3Kz2LmQO/trZKGrCsZFDO2H365pAUQDuGZr+2sAzxuj3jCE+ cgDBYbDKCx0/en60AkRDKAFY6bDAv6V02JrBtgouKDkUrelm5uzVxmKh3OufYySwglcqC Qen2Okdri0u04NK72hW4FJDgzxkKDvX6iZInaYBrMqbDYe1nWLSWffQQQ9IYSQUPsVYNJ mEGGL2RiBriwUVQu4zp8eI9g/BVX/ScoJGSLl9S+y3rQ5qlwsTRO8EMWeJysEIsnq43VF O59NHPxtDk12f0fG8zJK79nK9wwCasCh02SQ4VLJETQPReVJyNvN0UIA76F8ujsLS1w== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795570497; h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc: Date:Message-ID:In-Reply-To:References:X-sashiko-severity: Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version; bh=DA59jyb89Y1wxXmPx1cwYGs8UOHaUM5ztUYSrDEo/88=; b=W9XNuemxlbTdbfF3yynqbZHVDrBSAV0RVM17m8du7k6i5LIUUQUoW8PF5inbxQg5Yw7F BytP+owMxJ85bSI1CHamMfVHyQoVF8Uwba6TfzcVPvQENRh1mdDVhHHGDUoi+Z9N6dumW kafXhU5sT8ortSMBn0lsn/6sEA/yfBIoHpOtLo+89RB8umaJxf2GBqexzYXRhWG+sO+6b pAw/e1/C9A45u9UygeTK37+LCtAHCW/VZwBk2xgqkWKk1V9myOdG7e3XtBeWtp6ETrbh7 rTtmFjKhkudNgWrRaid3lAATc1XK+iJ2kAVAchU4hZ0OcDyoKEsanyV725yG47BmMog== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=VAaa+eIv; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C42D7606A68C; Wed, 25 Nov 2026 01:34:57 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=VAaa+eIv X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795570497; b=F1sZK/FmwAkgU0xMHV1MyLBM/X/EbMurnKD5tUulDAkV3B4glkvB0Fc17r5LOvcCP8fw QlqwIr/N6sQdDfmdq/CKjmyShQQa0bP3zwFn52Cblj/wjgyPd+milQ82JVazESvVYyXrb 2lZrfddVP5FbVKv6zE1jn4n+8cz0P48Ml/HGMaD2X536ua4kuLXs3wRx2zXQX+p/L1Dw8 A2L4tT7v8AbLB8w5zDpYd1S6g/8vCJQrlWi5abpEtmWLboBNbYFBzc2W9qnI0X8HKEq1K 1Cd7xsbk9XjiRSCHmrdZLn9qKZOf13VoIkshT6jFWEZqQPD4eZFXE02QJoaCMLXT5KA== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795570497; h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID: In-Reply-To:References:X-sashiko-severity:Content-Type: Content-Transfer-Encoding:MIME-Version; bh=DA59jyb89Y1wxXmPx1cwYGs8UOHaUM5ztUYSrDEo/88=; b=vwhYbwIhMDJgtaramw1iYVt33phmQHx0PO9q3khxmf3HkABBPaj8pnBlMU1qnoqNgtLT vEm9UvwOpYrNGWM4bpB9nZffGVRHYx6cuf/Ev7V5WId1bjMeyo5N0grOZRZBJ2PH5pN90 LPELZfgcghRTSps1iGzZSN8rigb6IIZfwO7DTImKXMH8e4/G80HIEk0Z5ny92obfbTqH7 DQWrlBRRS1+QaYi4A7VS0gdDGUpFCvWDkj8rHCRoMiZI4elz/XE5PuH/g3zAb6YuM81/h BKuJu/uxLqC57aoIwGyRply3VLg/L/0GZoWdrcNX0fZfcrdQRdaA2yg7HpaoeIUuaiQ== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=VAaa+eIv; arc=none smtp.remote-ip=100.103.45.18 X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E5208606A681; Wed, 25 Nov 2026 01:34:56 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id B4BD71F000E1; Wed, 25 Nov 2026 01:34:55 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795570496; bh=DA59jyb89Y1wxXmPx1cwYGs8UOHaUM5ztUYSrDEo/88=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=VAaa+eIvaBoQmnXpkApc6jm4WQecmvkX58MDKhJZONqlGKlLTjblnSFdgqhLtveYo u4MNnJzvAxtc761OHVU+pw6wN0HH9C11yPJjNFBPZqyC68PlYDRaOJSXfdh05iJmin jGHxa7p7SXCZpjfiXCXfzb4OFmBU7IBBSjUhsAn65Kq6NYHrlVMaBmoTFCEBrhTGx/ m5Uz+/GXlbhb69wdqb3figGMhFlPZxkdZz84xwlW5NXIkLLoSwYaDmnINMAOi/9Vpb v1oMvxeloA57PyJkDd8xvCoDZ3ATdYoui+Xs89KZ5x0qBfbrw70m9C8N5vfFsVPxpt YsUryFCEC+GPg== X-Cc: netdev@vger.kernel.org, dsahern@kernel.org, idosch@nvidia.com, davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, horms@kernel.org, shuah@kernel.org, alice.kernel@fastmail.im, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org X-In-Reply-To: <20261124013124.3693-3-yanhaishuang@cmss.chinamobile.com> X-sashiko-severity: Low X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list