Article View: linux.kernel.netdev
Article #4085Re: [PATCH net v2] net: gro: don't chain linear parts larger than gso_size into frag_list
From: Eric Dumazet
Date: Fri, 16 Oct 2026 17:14
Date: Fri, 16 Oct 2026 17:14
29 lines
7611 bytes
7611 bytes
Le mar. 13 oct. 2026 ร 15:03, Sorah Fukumori <her@sorah.jp> a รฉcrit :
>
> skb_gro_receive() chains an skb into the frag_list of the held packet
> when its payload cannot be attached as page frags: when its head is
> not a page fragment and still holds payload, or when its head and
> frags would overflow the frags[] array of the last packet. Since commit
> 5eddb24901ee ("gro: add support of (hw)gro packets to gro stack"), that
> skb may itself be a GSO packet whose linear part holds several
> gso_size segments. skb_segment() cannot split the linear part of a
> frag_list member across segments, so segmenting the aggregate in
> software, e.g. when forwarding it to a device without NETIF_F_FRAGLIST,
> hits
>
> BUG_ON(skb_headlen(list_skb) > len);
>
> Fully linear GSO packets come from generic XDP. When the program does
> not support frags, netif_skb_check_for_xdp() linearizes any nonlinear
> skb with pskb_expand_head() and skb_linearize() and keeps its GSO
> metadata. GRO on the device runs before generic XDP, so each aggregate
> passed by the program carries all of its payload in a kmalloc'ed head.
> A tunnel that decapsulates these packets and runs GRO again through
> gro_cells then builds the bad frag_list. This was first seen on a
> router that forwards TCP received over VXLAN, with a non-frags XDP
> program attached in SKB mode to the underlying bond because one slave
> lacks native XDP:
Reviewed-by: Eric Dumazet <edumazet@kernel.org>
Technical Details
Message-ID:
<CAL4WiipGB3Ac_8sgncnf9H+JiVf5sp3074M70mGb=GjeK1gtyA@mail.gmail.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-347465-linux-kernel-netdev=dewy.ruReferences:
<20261013130250.3643916-1-her@sorah.jp>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-347465-linux-kernel-netdev=dewy.ru
From: edumazet@kernel.org (Eric Dumazet)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net v2] net: gro: don't chain linear parts larger than
gso_size into frag_list
Date: Fri, 16 Oct 2026 19:14:59 +0200
Organization: Usenet Network
Message-ID: <CAL4WiipGB3Ac_8sgncnf9H+JiVf5sp3074M70mGb=GjeK1gtyA@mail.gmail.com>
References: <20261013130250.3643916-1-her@sorah.jp>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Injection-Info: usenet.network;
logging-data="2825516"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:BUJbaqfDc8fU7I/IuKHpoXOfJ9Y= sha256:c24AKIaoaTpWuKuBQh6VD0XsSbvU60toP0ePFYOrgZk=
sha1:TM5x/+Y24wuorCq6hxBnZQkdTd8= sha256:uGuWTARDhGVZtwbJyXvcndLtudoDFlzpDPJsqWaPyZo=
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 91DD511059F; Fri, 16 Oct 2026 20:29:16 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.64
X-Spam-Status: No, score=-3.64 tagged_above=-9999 required=6.31
tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.24, 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] 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 tuazYJYfXiuk;
Fri, 16 Oct 2026 20:29: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-347465-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 7A57311057E; Fri, 16 Oct 2026 20:29:05 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1])
by sin.lore.kernel.org (Postfix) with ESMTP id 85E4A3226E; Fri, 16 Oct 2026 17:15:13 +0000 (UTC)
X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id B670F559C9F;
Fri, 16 Oct 2026 17:15:12 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="UsyaxWd1"
X-Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 97B34559CAC
for <netdev@vger.kernel.org>; Fri, 16 Oct 2026 17:15:11 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18
X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1792170912; cv=none; b=ce9ph/ylhbNF4vpovtnQ4tXqx+qmEVAEExeTk597FLy7toP6mIVZ0QhkLrgHFR5WWl++ppXjT1t3C/UFka51AgFIhqKORhbzBZM3Qpatup0wqo47AkpXxjNMpSjGm23CmnpdhlBrEG5M82KDupDNFmYZgQHan5NB1GV7pPN3CtE=
X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1792170912; c=relaxed/simple;
bh=XAqAM94s1Jvjzv6bk28wxql1jd5OTzArOVTACBoHVzE=;
h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:
To:Cc:Content-Type; b=GCnCmoAXsizGLOeVst/yOGxP3S83YkarrlaMpx7Xi0ptLWGo2B3hRQtasWgmmxgSZIgLW/Zl7GuGUFwokHxfLSEN2OqTu+JWxh3W8+ryX/BPYbB2uHE6G98KlLaNKARjPGwYJ2bxXEexwoNCARWKEkhUcpEHHhpNs+uVa0izVCc=
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=UsyaxWd1; arc=none smtp.client-ip=100.103.45.18
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7B0561F000C8
for <netdev@vger.kernel.org>; Fri, 16 Oct 2026 17:15:11 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
s=k20260515; t=1792170911;
bh=CeJwseVTKorSKTUuNpdGPBAJ6qYGS7qrkA5boTVbrv0=;
h=References:In-Reply-To:From:Date:Subject:To:Cc;
b=UsyaxWd19zN8ASEQJT+sk2vw/YK/eAsLwySrOIz8Vka0b4OiXGmVg9bfpIX7vQiso
UZkdvjHsUtosngOrGkNXDhKTGfYRjMt9zido3CQ9GtWF+0cgXSlsptRGTaNCqrNUhi
Es2ZMKgylvCxs1X/i3CierLept5M7Ha7kCqtes5xehbbRqYanJJ1rK0bW5baRZzWSw
D+UWChoSm0cVPlGeUr+Ye5U9jo99RyVlEK5EnSLtSb57ZIXNfBFzVCSR+4S93p8GWz
TBzPqNAG3ItZiZiBhXlSE28dnETKX30kw0iKoY50V8M6fQmciJ7aSWHop0iC/3eB0k
l2OyObI+T5Kjg==
X-Received: by mail-oa1-f43.google.com with SMTP id 586e51a60fabf-4a691d29614so107773fac.2
for <netdev@vger.kernel.org>; Fri, 16 Oct 2026 10:15:11 -0700 (PDT)
X-Gm-Message-State: AFq9FYJ34H+OHEEzNxq8UmcmMoowrBcBWn/KfNMxeiJjHyQ7xKGRtglR
6OX1wUtEz9chJ+6GJWWZR7n/0edK9jdeqLorh9u5CTFXuY6i3pwxb5Xqgq3I4lwzmMSAXq6HtCr
AM2mNTNEej0DXvUeJ+DIac6lRPzilcyo=
X-Received: by 2002:a05:6871:c301:b0:48f:e363:5cc6 with SMTP id
586e51a60fabf-4a757aaeb6bmr574147fac.52.1792170910778; Fri, 16 Oct 2026
10:15:10 -0700 (PDT)
X-Precedence: bulk
X-Mailing-List: netdev@vger.kernel.org
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-In-Reply-To: <20261013130250.3643916-1-her@sorah.jp>
X-Gmail-Original-Message-ID: <CAL4WiipGB3Ac_8sgncnf9H+JiVf5sp3074M70mGb=GjeK1gtyA@mail.gmail.com>
X-Gm-Features: AclHuK96SeQgxwsPsQUfnxDkKW643K333FhB2GrErwXMvRRoDPeGHWvPa1jOlHY
X-Cc: netdev@vger.kernel.org, davem@davemloft.net, kuba@kernel.org,
pabeni@redhat.com, horms@kernel.org, willemb@google.com, lixiaoyan@google.com,
linux-kernel@vger.kernel.org