Re: [PATCH net-next] net: stmmac: dwmac4: schedule RX NAPI on Receive Buffer Unavailable

From: Maxime Chevallier

Date: Thu Nov 19 2026 - 03:12:02 EST


Hi,

You're missing some people in CC, including the network maintainers...

On 11/17/26 05:27, David Wu wrote:
> Once the RX ring is exhausted, the RX DMA enters the suspend state and
> no more Receive Interrupts can be generated: incoming frames are kept
> in the MTL RX FIFO and are dropped once it overflows. The RX DMA only
> resumes after software refills the ring and updates the RX tail
> pointer, which is done by the RX NAPI poll (stmmac_rx_refill()).
>
> Commit 1b9707e6f1a9 ("net: stmmac: enable RPS and RBU interrupts")
> enabled the RBU interrupt for dwmac4, but the interrupt handler only
> updates the statistics counter without scheduling the RX NAPI. The RX
> NAPI is therefore never invoked, stmmac_rx_refill() never runs, and
> the RX path hangs forever once the ring has been exhausted.
>
> Schedule the RX NAPI when the RBU interrupt is received, aligning the
> dwmac4 behaviour with XGMAC (commit 6338488356d2 ("net: stmmac: xgmac:
> Add RBU handling in DMA interrupt")).
>
> This can be observed on a GMAC4 based platform with Split Header (SPH)
> enabled under high TCP RX pressure, where the slower RX refill path
> lets the RX ring run dry.
>
> Tested with Split Header (SPH) enabled, running a large file download
> over TCP:
>
> - Without this change, the RX path hangs permanently once the RX ring
> is exhausted: the RX tail pointer is never updated again and the
> DMA channel status register latches the RBU bit, while the TX path
> keeps running.
>
> - With this change, each RBU interrupt is handled and the RX path
> recovers by itself. e.g. 3 RBU events within 6 ms during a download
> peak, each one self-recovered (the RX tail pointer resumes advancing
> right after), with no further RBU events afterwards.
>
> Signed-off-by: David Wu <david.wu@xxxxxxxxxxxxxx>

In essence this looks correct to me. This fixes some real hangs, so
I'm wondering if this shouldn't actually go to net.

Please re-send to net and with everyone in CC, you can add:

Reviewed-by: Maxime Chevallier <maxime.chevallier@xxxxxxxxxxx>

Maxime