From: Maxime Chevallier <maxime.chevallier@bootlin.com>
To: Pengfei Zhang <zhangfeionline@gmail.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>
Cc: Jose Abreu <joabreu@synopsys.com>,
EricChan <chenchuangyu@xiaomi.com>,
Simon Horman <horms@kernel.org>,
zhangpengfei16@xiaomi.com, netdev@vger.kernel.org,
linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] net: stmmac: xgmac: do not treat TBU as a TX event
Date: Tue, 13 Oct 2026 08:40:58 +0200 [thread overview]
Message-ID: <093d3499-d848-4f68-abc6-f2a3ceda3521@bootlin.com> (raw)
In-Reply-To: <20261013024747.2688984-1-zhangfeionline@gmail.com>
Hi,
On 10/13/26 04:47, Pengfei Zhang wrote:
> Commit 8d07a7930434 ("net: stmmac: xgmac: Do not enable TBU interrupt")
> removed TBUE from the default DMA interrupt mask, but did not remove the
> TBU check from dwxgmac2_dma_interrupt().
>
> TBU is set whenever a TX channel runs out of descriptors. Since TBUE is
> not enabled and only enabled bits are cleared, the TBU status bit is
> never cleared. As a result, TBU stays set on every idle TX channel,
> regardless of whether there is any TX traffic.
>
> With a shared interrupt, stmmac_dma_interrupt() checks all channels,
> so every interrupt from any source schedules TX NAPI on every idle TX
> channel.
>
> Only use TI to trigger TX processing.
>
> Fixes: 8d07a7930434 ("net: stmmac: xgmac: Do not enable TBU interrupt")
> Signed-off-by: Pengfei Zhang <zhangfeionline@gmail.com>
Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
> ---
> Tested on a board with 8 RX/TX DMA channels behind one shared
> interrupt. A peer sends 10k UDP packets/s to the board and the board
> sends nothing back, so there should be almost no TX work. Every idle
> channel reads DMA_CH_STATUS 0x4 (TBU only).
>
> Per second, averaged over 10 s:
>
> before after
> hw interrupts 9071 8580
> tx_normal_irq_n 72572 1
> tx_clean ~73000 9
>
> - hw interrupts: the shared interrupt line, from /proc/interrupts.
> Unchanged, the RX watchdog sets the rate.
> - tx_normal_irq_n (ethtool -S): how often dwxgmac2_dma_interrupt()
> returned handle_tx. Before the fix every interrupt reports it for
> all 8 channels.
> - tx_clean (ethtool -S): stmmac_tx_clean() runs, i.e. TX NAPI polls.
> Each spurious handle_tx schedules one. What is left after the fix
> is real TX and the TX coalesce timer. The "before" value is from a
> separate run with the same setup.
>
> No packet loss before or after.
If you need to respin, that information should be in the commit log
directly.
Thanks,
Maxime
prev parent reply other threads:[~2026-10-13 6:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-13 2:47 Pengfei Zhang
2026-10-13 2:49 ` netdev-bot+sinfo
2026-10-13 6:09 ` Pengfei Zhang
2026-10-13 4:55 ` Pengfei Zhang
2026-10-13 6:40 ` Maxime Chevallier [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=093d3499-d848-4f68-abc6-f2a3ceda3521@bootlin.com \
--to=maxime.chevallier@bootlin.com \
--cc=alexandre.torgue@foss.st.com \
--cc=andrew+netdev@lunn.ch \
--cc=chenchuangyu@xiaomi.com \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=horms@kernel.org \
--cc=joabreu@synopsys.com \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=zhangfeionline@gmail.com \
--cc=zhangpengfei16@xiaomi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®