Article View: linux.kernel.netdev
Article #5225Re: [PATCH net-next 2/2] net: stmmac: disable TX checksum offload for jumbo frames on bugged cores
From: Jisheng Zhang
Date: Tue, 20 Oct 2026 00:57
Date: Tue, 20 Oct 2026 00:57
72 lines
11248 bytes
11248 bytes
On Fri, Oct 16, 2026 at 04:18:06PM +0200, Maxime Chevallier wrote:
> Hi Lorenzo,
>
> On 10/12/26 17:24, Lorenzo Bianconi wrote:
> > stmmac_xdp_xmit_xdpf() decides TX checksum insertion from the queue COE
> > capability only:
> >
> > csum = !priv->plat->tx_queues_cfg[queue].coe_unsupported;
> >
> > and lets the enhanced descriptor set TX_CIC_FULL accordingly. On the
> > bugged_jumbo cores (snps,dwmac-3.40a, snps,dwmac-3.610 and
> > snps,dwmac-3.710) hardware checksum insertion is broken for jumbo
> > frames; the skb path works around it by clearing NETIF_F_CSUM_MASK in
> > stmmac_fix_features() when the MTU exceeds ETH_DATA_LEN, so skbs are
> > never marked CHECKSUM_PARTIAL and no checksum is inserted. The XDP TX
> > path bypasses that workaround, so once XDP is allowed at MTU >
> > ETH_DATA_LEN, jumbo frames sent via XDP_TX or redirected into the
> > device would leave the interface with a full checksum insertion enabled
> > on those cores - exactly what the workaround is meant to avoid.
> >
> > Disable checksum insertion for oversized frames on bugged_jumbo cores in
> > the XDP TX path too.
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?
Correct me if I misunderstood something.
Thanks
> >
> > Fixes: be8b38a722e6 ("net: stmmac: Add support for XDP_TX action")
> > Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@oss.qualcomm.com>
>
> Looks cleaner to me than the alternative patch from Jisheng :
>
> https://lore.kernel.org/netdev/20260929121025.20821-1-jszhang@kernel.org/
>
> It sure seems there're a lot of people interested in getting XDP/XSK
> working properly on stmmac :)
>
> Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
>
> Maxime
>
> > ---
> > drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 8 ++++++++
> > 1 file changed, 8 insertions(+)
> >
> > diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> > index ca61ab449e32..0e29c5d04714 100644
> > --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> > +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> > @@ -5276,6 +5276,14 @@ static int stmmac_xdp_xmit_xdpf(struct stmmac_priv *priv, int queue,
> > return STMMAC_XDP_CONSUMED;
> > }
> >
> > + /* Disable TX checksum offload for jumbo frames on cores where
> > + * checksum insertion is broken for oversized frames, matching the
> > + * stmmac_fix_features() workaround used by the skb path.
> > + */
> > + if (priv->plat->bugged_jumbo &&
> > + xdp_get_frame_len(xdpf) > ETH_FRAME_LEN)
> > + csum = false;
> > +
> > while (true) {
> > skb_frag_t *frag = i ? &sinfo->frags[i - 1] : NULL;
> > int len = frag ? skb_frag_size(frag) : xdpf->len;
> >
>
Technical Details
Message-ID:
<ata8k2EVDCDTmeE6@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-348950-linux-kernel-netdev=dewy.ruReferences:
<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>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-348950-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: Tue, 20 Oct 2026 08:57:55 +0800 Organization: Usenet Network Message-ID: <ata8k2EVDCDTmeE6@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> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Injection-Info: usenet.network; logging-data="3756131"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:IMunXAgS65JrJvsuMw5f4zrWv/A= sha256:Wv3JLysRZrndGtmo7+AI0dpN98XxnodPcsIVHOMTACk= sha1:/f886wqgE2qwO4ko4dds+tlqJb8= sha256:h76rZTylw37htA9l9rUZfAkecMpPJ51UkVOaSN+9+YM= 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 80421110AE6; Tue, 20 Oct 2026 04:18:48 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.729 X-Spam-Status: No, score=-3.729 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.329, 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 qOzj6qbfO_8r; Tue, 20 Oct 2026 04:18:45 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-348950-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 C6A9A1108D2; Tue, 20 Oct 2026 04:18:33 +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 2764924EAB; Tue, 20 Oct 2026 01:18:07 +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=1792459086; b=a8FkbLPfL5hdtNQtn8MLGUt9+2D+SW/LKUBDZk68BNjwDHnZWYhLbaJt+n9sKz9x5XvJ knCCGiPYl/tf2VZzXar2qdIZn5MyqsmIhtZC3EVBdIPFa5RsnQDT0dlqxySkRgas2CyTu pmzswXzYuFk3RziPaaI+rar4Qc8/BMPQnynVJnqWbLbpYrZKl2XHc1dF+j1HE4a4AnPhg 4sF3WbKbyGudrRYnt4SgclQztj38OV1Djuu7njkNXKktcYv/6XMt1qRicyS6caZyvNxoi mFqyXpolUyjf1N/G0z/RSPm0W+qwK+dEhmhT3978MAuk41V4H3HBqTa9UF8WcLhM4AA== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792459086; 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=gVKlbXZWCw8qO2LC4n2LKk2ZzmgfYZxvObuGjMQnSGY=; b=ZDNfTceIFkWmQ5KYrejnpWj9eR+j/rZTkSjpHDlsqqKwQgtfUNxUZLBrgi/Kf0+TixnT Xs5nX6esb+I4CjCicJRjYTyasa5kxmkOhx50le99sonLjWz73JoIb666llesrHcAjuM4m vcEFhYDxfE91muDULOkxpzTVTyYmkS0dGFnu9HJ7kUKrY+RG2uvim83j6GHeuDq38gVUj VZDZHypzrnvAkkVqP2Elh/Z++sbL/WPHiYwoIwp6sPtC9RiKvyJyRfqNDuoHOS63eWgFB 6VNFReu7GKAtqAf5HLlb83ksIstN320N8eKSAF1c0MzC34tU+0qhNLBpUm9b6DzrY/w== 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=iye2npiI; 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 7F5DB606A320; Tue, 20 Oct 2026 01:18:06 +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=iye2npiI 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=1792459085; b=BW+eEU1vUUjGrXCwQgoBTHYYCX56IOruybU1R2vmivMzjbDMeyklYxEQWSEM+Cv4ucgs 3LApvvLbNHhFU3Zk0jHGfDUvcj87JcIISxdjolvYxq3/j3xASDqIWm4OOH/2QAWivITMv ZnrjQSNGLc0PTz1JLdt+NOXEk5noKR+ZN+bK5Mt/Yvwfqqzri8MnhiWJMAvSsflS993qg dN4vk7dBG7HtmLUMkFjDovbNo+7298DJhfK5dH1CkhxRP4XXcLf06zgOVrKGhJ3lP3FCY gcrbZkFsa9OILeUE95Mx1YgmgiWErLd5d8hjj1nWINtsydomxukyeJiJ1GCTBf0ONRQ== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792459085; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=gVKlbXZWCw8qO2LC4n2LKk2ZzmgfYZxvObuGjMQnSGY=; b=IhMbNTpvtdzVh8QafO/hnRYVy2fqNkwDBiaHlKD9bQb0/2WbhW1KInoVM3ovdxAmoTDs ir9ff5Ui/6dx2jRi7qU/KVtf0xhAQvMgHPK6mCbgKyU9VCJlAClTIkfKY/CwS0/7abRkz R5PmtEtbWfOG9/sz+tqPgbY/vH7gila1Lm5Z3djPsPVim1hanwhZ/lFLa6cdhnjWHt05q 17Saiip9UUtjzo1BDNLWpCQMxzOWB4WbB9SCOF8zslrjoj3Cmbbw9K8ijEoxolhJS+VL0 4/IK3/8pkpWJVv5xMVIorlaIUeRmSmg7Vaq16Qi4OTay1aL/E91RGtUKYWthJfHuV+w== 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=iye2npiI; 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 57C64606A319; Tue, 20 Oct 2026 01:18:05 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1324D1F000C4; Tue, 20 Oct 2026 01:18:00 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1792459085; bh=gVKlbXZWCw8qO2LC4n2LKk2ZzmgfYZxvObuGjMQnSGY=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=iye2npiIIcGb2r8dG0dJ0aD7shMe74LoGxfkV2IRkJq+SXuU+RCGS1FFnCGYrT98E 6CNw3LBP4EPJnzNgA266EaBkoBDAG2o00Iaok+4JuE/iU7TGTTeFzSUPVFPy8Wt2KB Xjdi5Qimm6qpCx8SHpW7lwe2l0w6LEsHWzW9OR+F/zZ/+cldGyWbADWKGEX5URsoYA PCkjzEO4HAv7fai8qjQXM4MMDhexVEMykVEfdk78VV0gv0RvJwf5HrxbBeoq0i7BVU yZ2Hx/+PIC2MfBg3SvkbH8UNg3odB+yP4QgVwT8I+9XzSQqfe8lMptVB8OAnlKo+UF EAcM3GmYGF97Q== X-Cc: 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: <6d1d99b5-1c3c-4e59-a0b2-e4d671e594ce@bootlin.com>