Article View: linux.kernel.netdev
Article #27498Re: [PATCH net-next 1/3] net: stmmac: dwmac4: do not treat TBU as a TX event
From: netdev-bot+sashiko
Date: Sat, 05 Dec 2026 20:37
Date: Sat, 05 Dec 2026 20:37
106 lines
12049 bytes
12049 bytes
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.
Low priority / nit picks for your consideration:
- [Low] The commit fixes a defect introduced by commit 1103d3a5531c
("net: stmmac: dwmac4: Also use TBU interrupt to clean TX path") and…
- [Low] Removing the stuck-TBU => handle_tx path takes away the only
thing that, on shared-IRQ dwmac4 setups, cleaned XDP TX descriptors…
--
net: stmmac: dwmac4: do not treat TBU as a TX event
This patch stops dwmac4_dma_interrupt() from returning handle_tx when the
TBU status bit is set. TBUE is never enabled, so TBU is never cleared, and
on a shared interrupt every idle TX channel had TX NAPI scheduled. It
follows the earlier xgmac fix in commit 305deb54c6c2.
Link: https://lore.kernel.org/netdev/20261014045607.3421104-1-zhangfeionline@gmail.com/
> Commit 1103d3a5531c ("net: stmmac: dwmac4: Also use TBU interrupt to
> clean TX path") made dwmac4_dma_interrupt() report TBU as TX work.
[Severity: Low]
This isn't a bug, but should this patch have a Fixes: tag for the commit
it names?
When 1103d3a5531c was applied, DMA_CHAN_INTR_NORMAL in dwmac4_dma.h was
already:
#define DMA_CHAN_INTR_NORMAL (DMA_CHAN_INTR_ENA_NIE | \
DMA_CHAN_INTR_ENA_RIE | \
DMA_CHAN_INTR_ENA_TIE)
So TBU has stayed set since that commit. The matching xgmac fix,
305deb54c6c2 ("net: stmmac: xgmac: do not treat TBU as a TX event"),
has Fixes: 8d07a7930434 and was merged through net.
Something like:
Fixes: 1103d3a5531c ("net: stmmac: dwmac4: Also use TBU interrupt to clean TX path")
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c b/drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c
> index 02aa1a3dd1e25..55ca172332346 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c
> @@ -188,8 +188,6 @@ int dwmac4_dma_interrupt(struct stmmac_priv *priv, void __iomem *ioaddr,
> ret |= handle_tx;
> }
>
> - if (unlikely(intr_status & DMA_CHAN_STATUS_TBU))
> - ret |= handle_tx;
[Severity: Low]
With this check gone, can XDP TX descriptors go uncleaned on shared-IRQ
dwmac4 setups when the TX coalescing timer is off?
__stmmac_set_coalesce() accepts tx-usecs 0 if tx-frames is nonzero. In
that case stmmac_tx_timer_arm() returns right away:
if (!tx_coal_timer)
return;
stmmac_xdp_xmit_xdpf() sets IC only when the frame counter crosses a
multiple of tx_coal:
tx_coal = READ_ONCE(priv->tx_coal_frames[queue]);
if (tx_coal && (tx_q->tx_count_frames % tx_coal) < num_frames) {
stmmac_xmit() and the TSO path set IC when !netdev_xmit_more(). This path
has no such rule, so the last frames of an XDP_TX or ndo_xdp_xmit burst
raise no TI. Their callers, stmmac_finalize_xdp_rx() and stmmac_xdp_xmit(),
only call stmmac_tx_timer_arm(), which does nothing in this configuration.
Before this patch, TBU stayed set. Any later interrupt on the shared line
went through stmmac_dma_interrupt():
for (chan = 0; chan < channels_to_check; chan++)
status[chan] = stmmac_napi_check(priv, chan,
DMA_DIR_RXTX);
DMA_DIR_RXTX does not mask TBU, so the call returned handle_tx and
scheduled tx_napi, which cleaned those descriptors.
After this patch, only TI schedules tx_napi. For non-XSK queues, RX
interrupts only schedule rx_napi.
Would up to tx_coal_frames - 1 descriptors per queue, with their
xdp_frames and page_pool pages, then stay held until the next IC
completion on that queue?
The missing tail IC in the XDP paths predates this patch. The same
behaviour already exists with per-channel MSI, and on xgmac since
305deb54c6c2. This patch removes the fallback that hid it on shared-IRQ
dwmac4. The later patches in this series do not change the XDP IC logic
or the timer.
> if (unlikely(intr_status & DMA_CHAN_STATUS_ERI))
> x->rx_early_irq++;
>
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261204203130.287919-1-contact%40c127.dev
Technical Details
Message-ID:
<179650307507.3148.11981509559101127373@kernel.org>Path:
mbox-mo1.pugleaf.net!feed-us-txt.newsdeef.eu!feed-us-mo.newsdeef.eu!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-378120-linux-kernel-netdev=dewy.ruReferences:
<20261204203130.287919-2-contact@c127.dev>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!feed-us-txt.newsdeef.eu!feed-us-mo.newsdeef.eu!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-378120-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next 1/3] net: stmmac: dwmac4: do not treat TBU as a TX event Date: Sat, 05 Dec 2026 20:37:55 +0000 Organization: Usenet Network Message-ID: <179650307507.3148.11981509559101127373@kernel.org> References: <20261204203130.287919-2-contact@c127.dev> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="3115102"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:SR6Su3k/zeJzOdXxy4sWCaEZdjI= sha256:GH9ctbQD3wZ+3mZPTYCbD2qyQgZf8+dfR2Eii0OM6xI= sha1:ZyVMdmQUuRxXcmspAHhpPtWpl/I= sha256:uRTs4d4qXdlPbKC5VO+7ozTQ5DYiHFgL3duFc8CUUy0= 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 F3759117EA9; Sat, 5 Dec 2026 23:38:20 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.54 X-Spam-Status: No, score=-3.54 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.14, 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 kkC66fMr-MOs; Sat, 5 Dec 2026 23:38: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-378120-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 8B930117EA7; Sat, 5 Dec 2026 23:38:04 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sin.lore.kernel.org (Postfix) with ESMTP id 01B042B751; Sat, 5 Dec 2026 20:38:00 +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=1796503077; b=HvEWZlkAtNf++EJiWnBAxjh4RQ/EYZA6a0/nBMpY/MyZf7bT3OVi/l6Feyapa+Oc6jhS sL0yhtJKJmiFSTCD1uPD5zdjEnV57yFzc9mdXzyWG2wEC3LpnbdO0mhSPBquT1OfibNLV TN/bSl7k6sfBnCeFV75ZYzIEjijZKFSmi7i99Gl+d7b5ZOKpZL1Q0WxCI2AlUZvvbxug1 ZFMCHYHXDrGBlC6mHumLhzLWKBwrGJLqhZpEGFicN63LeDR40mcQfuFqlwn8x0CHAw7kU AnioUA96dUYbfS2D0n4Kjca5h1EsIxy24UGR1BzBmwamyo+OSVDvaKTFLGx7Afszlbg== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796503077; h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc: Date:Message-ID:In-Reply-To:References:X-sashiko-severity: Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version; bh=ERolfVXjuOO80RyY/eaQWZzL/DkiIMMcDcVDD7QdFKs=; b=HJkcEj6iLInRydoLoM0/gI5XkEXZe9ce9DrXcQW/MOzpzvqh2+UCGkGeYwJuV5NihlBZ TCOU/vU4GOngiXZW017hvn4fIYR491+OQv0I5bv2vENv66AR24PE89cPsii3uKamWygTm 2NHvbgzr08U2xDhK08j8aoDLZeDihLPLY22GH/J/VL8EzNwWzlTQ3xp2096KfkmtlozHR LJ09ZjHiZ3LQT02MAgQIZ/dVdwGI357s3N8q0IP+ueIuMVKhU80/rH6dDrTHIiKhyo2si vCizziIDBcHaJNgjR8nI12Bc1dbZpnAIOqPpYwqlmXJud/8VyegjPw0c88bKXpTpDcA== 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=b28IijEY; 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 A76E6606A334; Sat, 5 Dec 2026 20:37:57 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=b28IijEY 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=1796503076; b=adNfZ6sXSHqDPLl7s5QPZzkpBm2DVqSBM99e4oIJLS8mAJJW61TUHXgqKOe9WZibCZ6O jJHTpclShuTAnyRKUNnnhgyPplWSm/Rpc8ub8ElDZgu8biH8gIbzueUDHjGS6sbQv6YDt y+vUgOJ0cYgOqNqKiHsJoEeV8LSJwMXrbSrh7w4f9fqAMofw/y0x5y0YyfXjZR/5XCn1S 1Ym6cwJgL4VPLNa10qrv6z1ySKFErB42g1Sg7/Pxbpza89aq5BHbkMdeKnNPeLXWG3MwU BlK9SxSsFeRr4xWKtfe8kqntEOd/BeIURDw0R1PmiKsU7BeQ8Gx4DuJeCSOPp5bZdWA== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796503076; h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID: In-Reply-To:References:X-sashiko-severity:Content-Type: Content-Transfer-Encoding:MIME-Version; bh=ERolfVXjuOO80RyY/eaQWZzL/DkiIMMcDcVDD7QdFKs=; b=MmkwnZLzEAR4BKdp4+UxTcByRhQ3gWhk+peGhk5q5Pd8t04JoDnbym6T2YEFg0EhcNrc sTU+C/qhn7oLJPlbI1vjSHLbg2A6lY3CZc6heIP8pMUYb1Fm6tYUHh4gXetdk7/4YPTCW Z9uKG/woguCt6ZEjD3CxduMvTw9wYYI77uBI0h2P83jNbbm9Zn4w525B57igvXap7duqt 8KR+cf/sIjYQcYsz3nSZrbvO+YmspH6OmFCtvrhZiYryt9CQ/E1marSC7C6Z7M82y8Dbj OrD4ho3TQssGMknAzUT6BLHbMpj0TOjbRFfl6I91PyiiIqt/9ku4d3xeDDkgXVdeovg== 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=b28IijEY; 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 C3897606A31F for <netdev@vger.kernel.org>; Sat, 5 Dec 2026 20:37:56 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 917CC1F00936; Sat, 5 Dec 2026 20:37:55 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796503076; bh=ERolfVXjuOO80RyY/eaQWZzL/DkiIMMcDcVDD7QdFKs=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=b28IijEYkWx1TC6XR1kCzdDq6J2JNWgwJp/vvEuUKPU0amErw92o6B3C7DfWIBoQ1 4iMaNlLNF45d0Ng0KJ4xbK264Wx8Icg1Hw5wsgkNGzf1b/vGgmVaCro/hyiOJZuEEm 075lFX8+L8k9v/HgjkinJPmgMlZbh2N8Sdj1TJQmGtTMnqZXVRfOMyR3DLcXOVHrH4 81AkTpNQCiZexGo8q0QwT63w1+Kd4bqaqY5UnMvlq6Ubl2fm/5duXIf+sdWRwM4x/p p2iZGShjuekBhgrOCPIpg0uNu6mrdt/S+FtxpUDAVcpQrSxwnFmCwqBuzZKZzk2Ffg nuShJeOqNmpKw== X-Cc: kuba@kernel.org, pabeni@redhat.com, edumazet@kernel.org, davem@davemloft.net, andrew+netdev@lunn.ch, maxime.chevallier@bootlin.com, me@ziyao.cc, mcoquelin.stm32@gmail.com, alexandre.torgue@foss.st.com, netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, zhangfeionline@gmail.com X-In-Reply-To: <20261204203130.287919-2-contact@c127.dev> X-sashiko-severity: Low 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