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

From: Nazle Asmade, Muhammad Nazim Amirul

Date: Thu Jun 04 2026 - 05:12:26 EST


On 30/5/2026 3:19 am, Maxime Chevallier wrote:
> Hi,
>
> On 5/29/26 09:17, 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.
>>
>> 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")
>> Signed-off-by: Nazim Amirul
>> <muhammad.nazim.amirul.nazle.asmade@xxxxxxxxxx>
>
> We had an opposite discussion about enabling rx buf unavailable
> interrupts for other DWMAC versions :
>
> https://nam10.safelinks.protection.outlook.com/?
> url=https%3A%2F%2Flore.kernel.org%2Fnetdev%2FE1wBBaR-0000000GZHR-1dbM%40rmk-PC.armlinux.org.uk%2F&data=05%7C02%7Cmuhammad.nazim.amirul.nazle.asmade%40altera.com%7Cc3e0a35946944b7cebc508debdb729d1%7Cfbd72e03d4a54110adce614d51f2077a%7C0%7C0%7C639156791573135216%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=zgOd9DakLAP%2BFIOGSLYxSvXejHxFae%2BhnktdH7T1UUs%3D&reserved=0
>
> While your patch makes sense, I think it's important to note that it'll
> now make the "rx_buf_unav_irq" stat (that we can query from userspace)
> stuck at 0 now.
>
> That's a user-visible behaviour change, for a stat that can be useful,
> one could consider that a uAPI change...
>
> Do you have some numbers on the perf impact you see when buffer
> starvation hits to see what we are gaining/losing here ?
>
> Maxime
>
Hi Maxime,

Thank you for the review and for pointing out the rx_buf_unav_irq concern.

We do have interrupt storm data to share. On Agilex5, under heavy RX
pressure we observed:

Under heavy RX pressure we observed eth0:mac firing 1,821,811,555 times
vs 2,618,627 actual RX completions on eth0:rx-0 — a ~695x ratio.

BR,
Nazim