🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #11035

[PATCH net v4 0/2] net: gro: fix frag0 and remcsum handling

#11035
From: Eric Dumazet
Date: Wed, 04 Nov 2026 15:10
52 lines
9741 bytes
Two GRO fixes for paths using remote checksum offload (VXLAN, GUE)
and for NAPI_GRO_CB(skb)->frag0 after a pull.

Patch 1 skips skb_gro_remcsum_cleanup() once the skb was merged,
as grc->offset can no longer be trusted, and no longer builds
fraglist packets with an adjusted inner checksum.

Patch 2 invalidates frag0 before a pull, which commit bd56a29c7a4e
("net: gro: change skb_gro_network_header()") stopped doing.

v4:
- Patch 1: make skb_gro_receive_list() refuse packets with an adjusted
  checksum, instead of restoring it for fraglist members, which was
  wrong for VXLAN packets decapsulated locally (Sashiko).
- Patch 2: do not hold the packet if the pull in
  gro_try_pull_from_frag0() fails (Sashiko).

v3: https://lore.kernel.org/netdev/20261103105752.49542-1-edumazet@kernel.org/
- Patch 1: restore the inner checksum of fraglist members instead of
  keeping the adjusted value, which was wrong for forwarded packets
  and for GUE. Only restore it when it is part of the headers
  pulled by skb_gro_receive_list(), as start and offset come from the
  packet. Mention FOU_F_REMCSUM_NOPARTIAL (Sashiko).
- Patch 2: only use frag0 in gro_try_pull_from_frag0() while frag0_len
  is not zero, to not corrupt headers after a failed pull (Sashiko).
- Explain how the issues were found (netdev bot).

v2: https://lore.kernel.org/netdev/20261030125955.3107383-1-edumazet@kernel.org/
- Patch 1: reword the comment and changelog: skb->data is not always
  moved (frag/head steal).
- Patch 2: invalidate frag0 before the pull, as __pskb_pull_tail()
  can fail after pskb_expand_head() freed the old head (Sashiko).
- Patch 2: add a Fixes: tag for UDP fraglist GRO, which pulls
  directly since before bd56a29c7a4e (Sashiko).
- CC Tom Herbert and stable.

v1: https://lore.kernel.org/netdev/20261028141325.2103814-1-edumazet@kernel.org/

Eric Dumazet (2):
  net: gro: do not undo remote checksum offload on merged packets
  net: gro: invalidate frag0 after a pull

 include/net/gro.h       | 18 +++++++++++++++++-
 net/core/gro.c          | 27 +++++++++++++++++++++++----
 net/ipv4/esp4_offload.c |  1 +
 net/ipv4/udp_offload.c  |  1 +
 net/ipv6/esp6_offload.c |  1 +
 5 files changed, 43 insertions(+), 5 deletions(-)

-- 
2.53.0
Technical Details
Message-ID: <20261104151042.1157782-1-edumazet@kernel.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-356531-linux-kernel-netdev=dewy.ru

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-356531-linux-kernel-netdev=dewy.ru
From: edumazet@kernel.org (Eric Dumazet)
Newsgroups: linux.kernel.netdev
Subject: [PATCH net v4 0/2] net: gro: fix frag0 and remcsum handling
Date: Wed,  4 Nov 2026 16:10:40 +0100
Organization: Usenet Network
Message-ID: <20261104151042.1157782-1-edumazet@kernel.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="3417647"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:1Y3ap6bWbtEHCOdXZ3bFrtWz7zM= sha256:Rs3rsFkV8MEj4tgMG44RE2Sxd0SfnB+KdPi/CaiZEqY=
	sha1:ajeIAR7E7QUmaa8FWHCp4w+6vG0= sha256:DS4I8ghiB/qQ13DHXOm2bzqlcWJmcxQ/MCEW1eL27uQ=
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 BD644112C2B; Wed,  4 Nov 2026 18:17:57 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.401
X-Spam-Status: No, score=-3.401 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] 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 WoLkqCCrIZ6N;
	Wed,  4 Nov 2026 18:17:54 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-356531-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 sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id 11DD1112C27; Wed,  4 Nov 2026 18:17:46 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sea.lore.kernel.org (Postfix) with ESMTP id DF6012B33E; Wed,  4 Nov 2026 15:11:30 +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=1793805065;
	b=fh6INTglvyyJsIxATjegyR+ayV5m56rQHD3lWbz8ywMUvdEPTCrjr80vC0u2a41naO76
	 J1GqwMA/mFUG1Fg7fe+qBHr96bvkBdE98fIi5b0TiS7Vqn+MnUkCWeDJJsup0MzPptJd1
	 io8B3iHMuWbX8V0F4co8LgpPYz3GwFmOxm6VgEX2nI/gi/zI+RAknMNOQMVbtRZu/9Ocd
	 7WkUutQ9Gc6lkSqLMBwCFofvMB0VaoTtUPAr98QOXtruTOItMIJxaAG6jSo6mOq3JCeH6
	 cCG2DWtHbEWTqwrgDoXQReV8coiYHVzz/57YZvfqYrRn7yo8rhYdFla/A0khOIUkCBw==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793805065;
	h=X-Original-To:Received:Received:DKIM-Signature:From:To:Cc:Subject:
	 Date:Message-ID:X-Mailer:X-Mailing-List:List-Id:List-Post:List-Help:
	 List-Subscribe:List-Unsubscribe:List-Owner:Precedence:MIME-Version:
	 Content-Transfer-Encoding;
	bh=E8AFgNTmCXbgxtxj1hng+8rJEOPCc5jIRloVBfbwTLg=;
	b=xDQeSQ9F+x+DaNeSpxs5yQhxiiHLBVnqsoa4jS4dzqwULm5Yn9NrjiOYZfo7Iv72kIOV
	 0LD0haJ9cn4vR2eU82l83ulS6giO9tmg0eaQ2gZBo1uSIX3+IIRUtiO3xptwiCRKBr5ty
	 lFP1NA0Du4bbBjRzoUTJJXhQ6uBNkhxBV9YC//hD5VPKZpIJUS1ZFjnhkgVjWULWcHcbx
	 hUBVoeQJ5TxZvF4F+eF+OPq7f42KKzr0gEMMK7qKfu5BFyJTNbmyHuEfvG7nKvCn58ys6
	 WXvvwdRhiqFx/8Fe3pVMLA9DX8tm/kOfGR3i8zNvGvwPGZneGWuZQin+fp3wfTGKCug==
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=n8525tEp;
	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 DB1ED606EE84;
	Wed,  4 Nov 2026 15:11:05 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=n8525tEp
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=1793805050;
	b=ytqXn4q2kNTIcDKIC6Zb/cEfS1funDyWbXL1pHpIxqLMNJ+pi8qqvC0hu5h0LY8beiCv
	 l3NqPe++xEtcD5oadA5WKNATO0kn34yF4QW2NuWD/vp3koDnH74mT6d+tP0+1Q0LGmRN9
	 L0GVq9/9eNGNXLNtE1jcJrE25sipeP3kglqgQmzS2qc9EGEK0JAvLvuowiyqmrKaFlPN6
	 IKyCeCnvevLFRnYbqDlv7BD28FXLtIYa+dnYjEUI0M1K8Sh+ELWtUrH+sYIG3YIXArhg4
	 3n23HDMYdtcgd9riLllcVATsu5iALLUF0GzznCQolFVA79it3ZoSlMG9oqkLhiDOraA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793805050;
	h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer:
	 MIME-Version:Content-Transfer-Encoding;
	bh=E8AFgNTmCXbgxtxj1hng+8rJEOPCc5jIRloVBfbwTLg=;
	b=GrrSIR/yFHSxEfVOvn64gQYEf0tvitCeZjYk1oJaJGIo6Pk+Wk3ka/6+mioilFBmHLMI
	 hs+t8GCj4EaOeSWGCwxoJXRBFPKarw9fMJTvM7zXgYbUUqDD85xupV3qmJawsaqZtmAPc
	 15zMNqQR+hM6U37v8WaqNriWnqwXaQwp7rxQwrpnaq5Jh9+6YBPh03TlS0YIHwYO/j9US
	 oHu9IAa2iKk4ZymYgl+996b3VmZ0IQUdKWxGBpIzp/FVn0cAydNu2hI7o8z1W4JkrfD0j
	 aDtasgHcrhd+hD4pVYeWBy+c+vCFEcl0ZFGTtd4TrqZK0z0Tuuxkq02WRGFK/2nfzWA==
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=n8525tEp;
	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 B7969606A329
	for <netdev@vger.kernel.org>; Wed,  4 Nov 2026 15:10:49 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 001041F000C1;
	Wed,  4 Nov 2026 15:10:46 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1793805049;
	bh=E8AFgNTmCXbgxtxj1hng+8rJEOPCc5jIRloVBfbwTLg=;
	h=From:To:Cc:Subject:Date;
	b=n8525tEpLVHIeOb4Ljhhbg/50hG6LEu7WHl8u1D6kPJzUQT2N+vFOmvgFrjhPKms3
	 B3YINPOYIpdOmgMG1OpKRpj8utmK8OQY1SvMqoE1+lhqEE2+n36p72iDStm/6YFO4g
	 grbYtpmiq0A4TDzJ162Nb12O4IC/sf4bfKEVE1UZbMUh/b1icwLdbqRl8bvlHxMFZq
	 yfWCrkb4RdnF38uPfFtHhgQtYc790vBflIPpJ9SxrHhMsstJWIJ9+BmLBah7djYKlU
	 ZCda5N3dg7fVyoxlBjsB9ilMWEek9FR5+JlPdsHiNgRcqp9ne1+/epJ7s3YSPZFcie
	 2CSTWLl6Jp8gA==
X-Cc: horms@kernel.org,
	netdev@vger.kernel.org,
	willemb@google.com,
	steffen.klassert@secunet.com,
	tom@herbertland.com,
	cenzhang@linux.microsoft.com,
	AutonomousCodeSecurity@microsoft.com,
	Eric Dumazet <edumazet@kernel.org>
X-Mailer: git-send-email 2.53.0
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