Re: [PATCH v3] net: stmmac: xgmac2: disable RBUE in default RX interrupt mask

From: Simon Horman

Date: Thu Jun 11 2026 - 12:45:53 EST


On Tue, Jun 09, 2026 at 05:17:03AM -0700, muhammad.nazim.amirul.nazle.asmade@xxxxxxxxxx wrote:
> From: Nazim Amirul <muhammad.nazim.amirul.nazle.asmade@xxxxxxxxxx>
>
> Enabling the RX Buffer Unavailable (RBUE) interrupt is counterproductive
> and can trigger a MAC interrupt storm under heavy RX pressure. When the
> DMA runs out of RX descriptors it fires RBUE continuously until software
> refills the ring.
>
> However, RBUE is redundant: the normal RX completion interrupt (RIE)
> already triggers NAPI, which processes completed descriptors and refills
> the ring, causing the DMA to resume. The RBUE handler itself only sets
> handle_rx - the same outcome as RIE.
>
> On Agilex5 under heavy RX pressure, the MAC interrupt (which includes
> RBUE) was observed firing 1,821,811,555 times against only 2,618,627
> actual RX completions - a ~695x ratio - confirming the severity of the
> storm.
>
> RBUE does not provide OOM recovery. If page_pool is exhausted,
> stmmac_rx_refill() cannot advance the DMA tail pointer, the DMA stays
> suspended, and RBUE fires again on the next NAPI completion - a storm
> with no forward progress. This patch trades that storm for a clean
> stall with the same RX outcome. Proper OOM recovery is a pre-existing
> gap outside the scope of this fix.
>
> Note: as a consequence of disabling RBUE, the rx_buf_unav_irq ethtool
> counter will always read 0 on XGMAC2 devices. This behaviour is already
> inconsistent across DWMAC core versions.
>
> Remove RBUE from XGMAC_DMA_INT_DEFAULT_EN and XGMAC_DMA_INT_DEFAULT_RX
> to prevent the interrupt storm while keeping normal RX handling intact.
>
> Fixes: d6ddfacd95c7 ("net: stmmac: Add DMA related callbacks for XGMAC2")
> Reviewed-by: Maxime Chevallier <maxime.chevallier@xxxxxxxxxxx>
> Signed-off-by: Nazim Amirul <muhammad.nazim.amirul.nazle.asmade@xxxxxxxxxx>
> ---
> Changes in v3:
> - Clarified that RBUE does not provide OOM recovery even when enabled;
> disabling it trades an interrupt storm for a clean stall with the same
> RX outcome (Simon Horman, Paolo Abeni)

Reviewed-by: Simon Horman <horms@xxxxxxxxxx>