๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #7753

Re: [PATCH net 3/3] igb: prepare TSO and checksum offloads before TX timestamps

#7753
From: Eric Dumazet
Date: Tue, 27 Oct 2026 06:43
26 lines
10285 bytes
Le lun. 26 oct. 2026 ร  10:16, Paul Moses <p@1g4.org> a รฉcrit :
>
> igb_xmit_frame_ring() takes an extra skb reference for TX timestamping
> before transmit preparation. For GSO packets, igb_tso() calls
> skb_cow_head(), which can reach pskb_expand_head() with a shared skb
> when the header is cloned. Commit c7d8bc3dd511 ("net: skbuff: don't BUG()
> on bad arguments to pskb_expand_head()") replaced the BUG_ON() with
> -EINVAL, causing TSO preparation to fail and the packet to be dropped.
>
> For non-GSO packets with CHECKSUM_PARTIAL, igb_tx_csum() falls back to
> skb_checksum_help() for unsupported checksum offsets. This can also
> reach pskb_expand_head() through skb_ensure_writable(). igb_tx_csum()
> ignores the error, allowing transmission to continue without completing
> the checksum.
>
> Move TSO and checksum preparation before taking the timestamp reference.
> Add the timestamp bit to first->tx_flags without overwriting the offload
> flags.
>
> Fixes: 1f6e8178d685 ("igb: Prevent dropped Tx timestamps via work items and interrupts.")
> Fixes: 6e033700887b ("igb: Add support for generic Tx checksums")
> Signed-off-by: Paul Moses <p@1g4.org>

Reviewed-by: Eric Dumazet <edumazet@kernel.org>
Technical Details
Message-ID: <CAL4WiiredhAG-x2Ls8moMLprzOt2Ua0E-eDSXk7Che0QHQ3E0g@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-352240-linux-kernel-netdev=dewy.ru
References: <20261026091549.605810-1-p@1g4.org> <20261026091549.605810-3-p@1g4.org>

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-352240-linux-kernel-netdev=dewy.ru
From: edumazet@kernel.org (Eric Dumazet)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net 3/3] igb: prepare TSO and checksum offloads before TX timestamps
Date: Tue, 27 Oct 2026 07:43:21 +0100
Organization: Usenet Network
Message-ID: <CAL4WiiredhAG-x2Ls8moMLprzOt2Ua0E-eDSXk7Che0QHQ3E0g@mail.gmail.com>
References: <20261026091549.605810-1-p@1g4.org> <20261026091549.605810-3-p@1g4.org>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Injection-Info: usenet.network;
	logging-data="1479591"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:3pQIF6ele2HOHnn6KgrdHmba1Xg= sha256:dTCcm25kejtqoBu8KRuIQv6ggWgAPfyKhbYDwgkNDrI=
	sha1:mnyeS6wNcyzDpXZevpAsF2mc4Qk= sha256:zpDI1s+rMR9Dna6tRfH/DjDiCfMqT4FQSvzak4Pt1t8=
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 1E531125BDC; Tue, 27 Oct 2026 09:44:10 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.739
X-Spam-Status: No, score=-3.739 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.339, 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 Fz1s39ruAXoA;
	Tue, 27 Oct 2026 09:44:07 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-352240-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 AB050125BDE; Tue, 27 Oct 2026 09:43:58 +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 AFBAE27D9D; Tue, 27 Oct 2026 06:43:34 +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=1793083414;
	b=ddz2Rfo8tezJ0ry8sdBmH4ixiETvhPZdhCjK5SY2jAdEo4HJuJyQW4/50NZwUu54ptfG
	 qHkQjqEiWR1KsdqQ8UpfWNYxdhPtHJppqfOVcj9NG2hVvP3F/nZOLHfBpALdiySVChWOB
	 uOX26qWgYpqHLf3rQJf7DIJqorug/2VM4sKEa+qvCwpbf47M2Kq9mF8CXR8h+Ptju0KVB
	 MJOfh0XFtbnD1qci6zBqHYqGuae9AugFr5ZaG/ibCBSovQ3xKtcP5JYBjRAgYcQdqg8rX
	 LJZFUnVravyDHnZIcWqKQv1P+vpn/WPljVoIT1NHLpP+A2hEQdr6BKBEcwFnUF18JyQ==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793083414;
	h=X-Original-To:Received:Received:DKIM-Signature:Received:
	 X-Forwarded-Encrypted:X-Gm-Message-State:X-Received:X-Mailing-List:
	 List-Id:List-Post:List-Help:List-Subscribe:List-Unsubscribe:
	 List-Owner:Precedence:MIME-Version:References:In-Reply-To:From:Date:
	 X-Gmail-Original-Message-ID:X-Gm-Features:Message-ID:Subject:To:Cc:
	 Content-Type:Content-Transfer-Encoding;
	bh=1rV7sJ5OuvWmQzcl5Y+LhIg6Y4llgh/mlRpgtM99hK0=;
	b=Wo9ECAhDeg6Ubd3VtfFbts1XVIwwgojh8dLQ0zvU2Y1SgvqwHGxzAC0/sehWCJLxYRjt
	 sfjpA2c+w/G3QcE0pvWg1VMuv83dENVQcp2ZcfEKoHW6sbVaudIW8nl1wILY3u8XJUpEw
	 QYoKJVzKAuecyZpq3qDk1e4eMrfz1bl+xW0bpdkCCG+X0MxXGlftKNv5Rc/gQ+lbn979V
	 +oDRYmaYUygklTlB9Iu8u9AL6RgVRSYct34Bt5LhslKrLscfLQAJSR7Utp3+DkLwcndKI
	 3/CZsa7NHEuKgyJiRaO7NEUYmsWEKQCHs+MDaubPuw5E3VdJViRtQUEU6h67hyAttEQ==
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=oeyLHW12;
	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 44869606A327;
	Tue, 27 Oct 2026 06:43:34 +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=oeyLHW12
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=1793083413;
	b=gRIpXHDMxw3aAYzOR03S9q+VPDJo8JlijAhXaWrQ/pCo1klxGshOGRrgXKtwOBmIfeAq
	 YuXQ2pmf3AXEdqtbgn3HWgVhNgMoGMY5ThZXlPLyb7O0OfwkFjhf8CcW5cJjzRdIPrXT6
	 BYC8IYXtSp+4EWVMzJvJsBvVJj4jtCSBAiQoiH09WAbal9q5dwIYIqYjpu3D3mAndwElV
	 4e2oUQUQrU7CijvQrSaakppQj1zw9WUjWFiZ9gqRFIFzgE0zwaqfLI7EzFSVyYCuatBqS
	 SCzUpU+mldT5Ot1VE6Ot4KXihpPqnhmPO1W70ZDgZe4+a6TziRQ/W7MKiGHmfc6jENg==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793083413;
	h=Received:DKIM-Signature:Received:X-Forwarded-Encrypted:
	 X-Gm-Message-State:X-Received:MIME-Version:References:In-Reply-To:
	 From:Date:X-Gmail-Original-Message-ID:X-Gm-Features:Message-ID:
	 Subject:To:Cc:Content-Type:Content-Transfer-Encoding;
	bh=1rV7sJ5OuvWmQzcl5Y+LhIg6Y4llgh/mlRpgtM99hK0=;
	b=B5DLEHJoVW7AZO5+e6cahGIiqlM71XfxSQriO5ZycM9y7RmufKSyOKHnZOWGSduEsmbI
	 lp6aIoaAio80uwgHAjOVK8DPd9fMDhMXFLsiIru8GCM8TE2RpDpzMc/AqvCmSWBkIGjll
	 zdFBoD7/eCGkg3tohwyVEHQL0ASyePJbk56jCWWgkJTZHwcLQKcgCDn4U+ZgS800iHzlJ
	 jVERHAhexAP60HD65Qq/DjMfDz2UFjkW0iFCbcyZksi8ygMlrENuGUlGzbNSyKaf+SxgG
	 MQ65Fz/mIb7LRWQKWfOyocjKEEd0dGu/6Et+bFG9OZSZwPz2BX7RWVyAGKKzPQPmNmA==
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=oeyLHW12;
	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 2417A606A31A
	for <netdev@vger.kernel.org>; Tue, 27 Oct 2026 06:43:33 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 015A51F031E0
	for <netdev@vger.kernel.org>; Tue, 27 Oct 2026 06:43:33 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1793083413;
	bh=1rV7sJ5OuvWmQzcl5Y+LhIg6Y4llgh/mlRpgtM99hK0=;
	h=References:In-Reply-To:From:Date:Subject:To:Cc;
	b=oeyLHW12ZBVJE6WwsG5A6uwis/ZOX7lxJXy+K6wLdbIGwF5dWUB7rRaEIA2sOn484
	 KEbamJPaydrLoq1Vo0IljG+Srs4rgLh9IaAnlw+HVuHY+mZXRMVsXdp3zfmn8Kb112
	 5mifVnj/u5mFKtH47GvCltgVRGPlXKvHccHv5zRgknF6rxSgxUIdYgJ3jJ+NPWp4aP
	 fs7r2yLCNDTnTn72pKo6w41h8TUnttVlWG57bPK6kHWwk1zruD4Gy5SW1BDZWws8aw
	 QuE+d7omHnJ64LXfWtKiZOm4e8pfJ2lvjvygxhS6zK5Wx9SePtpSZAjFEgZpBtZTu6
	 9NccuSBZLvfkw==
X-Received: by mail-oi1-f180.google.com with SMTP id 5614622812f47-4ab8cb2a6e4so2767401b6e.0
        for <netdev@vger.kernel.org>; Mon, 26 Oct 2026 23:43:32 -0700 (PDT)
X-Forwarded-Encrypted: i=1; AKwUvBzaahl+hXuQy4AKxyFb90hSs0KwWNhQrVBXyaXoRpvqcCr3yKcc8s5M4CBA4NjOwDXsuJcIJhU=@vger.kernel.org
X-Gm-Message-State: AFq9FYJJC/Rt1zM5xaX9HQPH8CL32t6zPGyemGlx1Y0MKYRw1OT77q0X
	KZlUJk/gl7WLUfjyZWoTtji7BeH39Ldy4ChUu7urkvJw/A5rRJyTQ8o1zJekX6r27ZicgbClM/l
	NCFz8jO3uMIHdoDhdydKCKrEuGVgb2Fk=
X-Received: by 2002:a05:6808:220a:b0:4ed:7045:d3bc with SMTP id
 5614622812f47-55c002d9ed3mr5982970b6e.32.1793083412383; Mon, 26 Oct 2026
 23:43:32 -0700 (PDT)
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
X-In-Reply-To: <20261026091549.605810-3-p@1g4.org>
X-Gmail-Original-Message-ID: <CAL4WiiredhAG-x2Ls8moMLprzOt2Ua0E-eDSXk7Che0QHQ3E0g@mail.gmail.com>
X-Gm-Features: AclHuK8M6VbpWDO_HbzkaGdWK1HEj-x4xPb3ExTmDRcyeOQYYZiLPbtFqH9A-VI
X-Cc: anthony.l.nguyen@intel.com, przemyslaw.kitszel@intel.com, 
	intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, 
	linux-kernel@vger.kernel.org, andrew+netdev@lunn.ch, davem@davemloft.net, 
	kuba@kernel.org, pabeni@redhat.com, aleksandr.loktionov@intel.com, 
	chwee.lin.choong@intel.com, faizal.abdul.rahim@linux.intel.com, 
	horms@kernel.org, vinicius.gomes@intel.com, sasha.neftin@intel.com, 
	matthew.vick@intel.com, aduyck@mirantis.com