🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #6423

Re: [PATCH net-next 2/2] net: stmmac: disable TX checksum offload for jumbo frames on bugged cores

#6423
From: Jisheng Zhang
Date: Thu, 22 Oct 2026 11:15
49 lines
10517 bytes
On Wed, Oct 21, 2026 at 12:33:37PM +0800, Jisheng Zhang wrote:
> On Tue, Oct 20, 2026 at 02:28:26PM +0200, Andrew Lunn wrote:
> > > > Here I want to query a generic rule from netdev maintainers:
> > > > can XDP frame enable HW checksum on dwmac IP? Per my understanding, the
> > > > dwmac can only do HW checksum for normal particular packets layouts, such as
> > > > TCP, UDP. What about if XDP transmits a non-IP frame?
> > > 
> > > or a generic XDP guide from netdev maintainers:
> > > Since XDP can tranmist arbitrary Eth frames, so how does the eth driver cope
> > > with HW checksum if the HW checksum is intended for supported IP packet
> > > layouts rather than arbitrary layer2 frames?
> > > 
> > > choices:
> > > c1. Simply disabled HW checksum by default. Then XDP prog must provide
> > > checksums themselves, lost the HW offload cap for IP packets.
> > > 
> > > c2. detect the frame in eth driver's xdp code path, then enable/disable
> > > HW checksum accordingly. Then how? Any example in exisiting eth drivers
> > > is appreciated.
> > 
> > Why is this specific to XDP? Cannot the network stack transmit
> > arbitrary layer2 frames? Isn't this a generic problem?
> > 
> 
> network stack normal tx supplies the skb->ip_summed metadata, and
> dwmac driver specifically can decide to enable/disable HW csum
> by checking the protocol which is extraced from skb, example
> stmmac_has_ip_ethertype()
> But XDP path doesn't have the necessary metadata, and I'm not sure
> whether stmmac_has_ip_ethertype xdb version can be implemented or
> not. That's the reason I request generic XDP guidence from netdev
> maintainers.
> 

Hi,

Given above, I think the dwmac hw csum needs to be disabled by default
to make XDP always behave properly. Since this patch2/2 has been
merged, I will update my patch:
https://lore.kernel.org/netdev/20260929121025.20821-1-jszhang@kernel.org/

1.rebase on the lastest net-next or wait for new rc1

2.update the commit msg of my patch to include above reply.

Kindly let me know if this way can be accepted or not

Thanks
Technical Details
Message-ID: <atnwQKwf8mfQT-2n@xhacker>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-350535-linux-kernel-netdev=dewy.ru
References: <20261012-stmmac-xdp-tx-pre-fixes-v1-0-05fd0c90f7e1@oss.qualcomm.com> <20261012-stmmac-xdp-tx-pre-fixes-v1-2-05fd0c90f7e1@oss.qualcomm.com> <6d1d99b5-1c3c-4e59-a0b2-e4d671e594ce@bootlin.com> <ata8k2EVDCDTmeE6@xhacker> <atbbRqSJIJ_glwuf@xhacker> <3ca537e7-c9a3-4306-a2f4-9c7d57123bfc@lunn.ch> <athAoWfW-xesPhFP@xhacker>

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-350535-linux-kernel-netdev=dewy.ru
From: jszhang@kernel.org (Jisheng Zhang)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next 2/2] net: stmmac: disable TX checksum offload
 for jumbo frames on bugged cores
Date: Thu, 22 Oct 2026 19:15:12 +0800
Organization: Usenet Network
Message-ID: <atnwQKwf8mfQT-2n@xhacker>
References: <20261012-stmmac-xdp-tx-pre-fixes-v1-0-05fd0c90f7e1@oss.qualcomm.com>
 <20261012-stmmac-xdp-tx-pre-fixes-v1-2-05fd0c90f7e1@oss.qualcomm.com>
 <6d1d99b5-1c3c-4e59-a0b2-e4d671e594ce@bootlin.com>
 <ata8k2EVDCDTmeE6@xhacker>
 <atbbRqSJIJ_glwuf@xhacker>
 <3ca537e7-c9a3-4306-a2f4-9c7d57123bfc@lunn.ch>
 <athAoWfW-xesPhFP@xhacker>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Injection-Info: usenet.network;
	logging-data="199286"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:ETVEPtQ0ecLPckusxHaJGCOcKSk= sha256:PIgWPsViKLEicgRdOPQJbY5wid/h77wJ26ZQtOIWTFA=
	sha1:RXzJee0I3Kocs3vypxq+Jf3l++k= sha256:YUmsOaFJLv9p2F8oCUSpqzh0DQwVWtbJqAkqCj0QFew=
Content-Disposition: inline
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 5F87711125F; Thu, 22 Oct 2026 14:38:37 +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 pirp8tuLegoo;
	Thu, 22 Oct 2026 14:38:33 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-350535-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 8C2B41111F7; Thu, 22 Oct 2026 14:38:24 +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 2B685292BC; Thu, 22 Oct 2026 11:35:22 +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=1792668922;
	b=lknAA4I0rVywN/6kby72OmdmHGxtgDjhqaN5Sm6a2TuWCd374k+rDV2OaLf5yBg3EJJt
	 qIRImUEBwurRTK9YOFPwMZDp/hFr4iNuCKEwdvH/2Fz/4fjZ9BmMtoEw8bxMxWxWcNpfd
	 i4NR9otEIAKzOv3PXZb3CfF68Wntjs9XO7Zp2v6AoOe7YVQ43OBxlsHWvaM0Jxc7KFsQY
	 KjZiTIn2uIF+H+HCCuSZbss3Xqa+5o9QsfAs3D26Atdu4ZFXaNSgI69yZQum24RxaZMtF
	 3YfqFTRLGSZ3/TgIkpnyf1iCDdx9P5Yj1K1ULFohDK81MLW6xy6CB+o2+syV2Ob2NxQ==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792668922;
	h=X-Original-To:Received:Received:DKIM-Signature:Date:From:To:Cc:
	 Subject:Message-ID:References:X-Mailing-List:List-Id:List-Post:
	 List-Help:List-Subscribe:List-Unsubscribe:List-Owner:Precedence:
	 MIME-Version:Content-Type:Content-Disposition:In-Reply-To;
	bh=VhH6+z3kKO1Bl5/znvKizz61KSkOxaasQ1jNB2IaQFU=;
	b=VGrpNPOd6YqB9W/8v+kcm9VVs+bs/3K1kFPSZ+j66IwLLkNW6oiKNSuB02/XYvcFCJMl
	 +C2rugScP96pKSmHbHv/w6COYWkIIvg4SbfNPwjaeIDgRILJ2fiZJNWdpARcyfObWEUF+
	 txBln1cIZ5N86qEzlfAHX9LbB1dmPhitiRnA2jFebFo3a6e/YZZxLaSKZ9BQJSz1vS9CB
	 OpIMP8vWMGjGf7pT8Xmqx5P6rpVJFDPCX6HJx56fwFbMEK0pJPOZswZgt5k9UDS8V2MiS
	 KN6OOv4I16srNZbbewJrK8ILNciwuYva7/vvSjqgoP+8bOBDPOmWruuttE81+PKFgUg==
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="Zbvy/0NS";
	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 0276D606A31D;
	Thu, 22 Oct 2026 11:35:22 +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=Zbvy/0NS
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=1792668920;
	b=JcB9EiwcKB4XXv0Q/aEG+gVDCS8XHpuXQolOuG7LU7/7yiBBI/egXY4boUDJv/IUZK2G
	 m+DiH5MCTyrC779OukRldsUM22QJupgykqR/lHjTpUErGt2WFVP2fhg/6Zc5g+XIv5fGl
	 ZZByEZlRpnJzdZJN5rssZZ6i/9RyZvCU2uVZrP5KA5T/b0Bud9Ay2jLppD4vp4b6EzhNI
	 N9OyCZKfHtmGASDqQAAyZRn8N4Uq61GXsIZeUebmn5Zdvq527hWxOhVKozeGDY17KFF5M
	 ugcBaNIZGAr7rx3DQSeh3+0pcnnO0LfndLESC6XzqOiCQjgsUmkpKoeWsrT+7T/OC8Q==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792668920;
	h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID:
	 References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To;
	bh=VhH6+z3kKO1Bl5/znvKizz61KSkOxaasQ1jNB2IaQFU=;
	b=aYtLrOiPAfe/FFicjzzU1bPKHNyHr1lvH+ylZS+IDsds28K8fZP8eQe/4uI4GtvBoiYY
	 1qv6zgs+IDLRdMuF61DKjcHuGNyRVk6TotbNsfDl7TepBZhgSb2H/gNWpWWmRqrJ0wbQZ
	 nKDASEmBYsZMY0kMo0s6MJi5IKzp9srumHyeYU+uj3n8n3PmVJfMYhMNA2RmtY8EmeBoN
	 4LkDlKnuwDsvosXQ0ipy3YoKTnqVbTxHdJlrtwc3tzG2Ws4Y2gp/duOwU9wlkmhE2F02o
	 qN79ZG5JaAnKIIkRlyJ98ySZXAG0Q98q9FobyFEUpoW8RxsV9CqM8NITdQrZJtQ4IyA==
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="Zbvy/0NS";
	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 5A72A606A31A;
	Thu, 22 Oct 2026 11:35:20 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 772231F000C2;
	Thu, 22 Oct 2026 11:35:14 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1792668919;
	bh=VhH6+z3kKO1Bl5/znvKizz61KSkOxaasQ1jNB2IaQFU=;
	h=Date:From:To:Cc:Subject:References:In-Reply-To;
	b=Zbvy/0NS5hi8ZwGaL0mHdj6PEHhtbpZcgsb2Xp7eB8vNm91KXm6vAJ7shxoujBAe1
	 dhfj5zW9GQjv2ICnLKITKYEVzIPUmr/T43Jte0mZvaglbKkhuJTD/V6vQcS26uTCFt
	 OXasMXASP+V7SWvLS7aqv6WgFIHv/Z8rVTdNyptNUr0oy2H7iDd5b7kUaf0Cyoam5X
	 uCgKS1SFyrbOMkuvNTg7wMFXssb/Zd5v96NUXlFCeDqopZEQD/tE8951DjZUUkufjP
	 zYi24h+tNP9MH/3GJ/iZijRpORTplyqr7Cmi85uhX3LidPPNuictm20cp7A+p/XIxm
	 nQb5r+beBBOWQ==
X-Cc: Maxime Chevallier <maxime.chevallier@bootlin.com>,
	Lorenzo Bianconi <lorenzo.bianconi@oss.qualcomm.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Alexandre Torgue <alexandre.torgue@foss.st.com>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Jesper Dangaard Brouer <hawk@kernel.org>,
	John Fastabend <john.fastabend@gmail.com>,
	Stanislav Fomichev <sdf@fomichev.me>,
	Ong Boon Leong <boon.leong.ong@intel.com>, netdev@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, bpf@vger.kernel.org
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: <athAoWfW-xesPhFP@xhacker>