From: Paolo Abeni <pabeni@redhat.com>
To: muhammad.nazim.amirul.nazle.asmade@altera.com
Cc: netdev@vger.kernel.org, andrew+netdev@lunn.ch,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, mcoquelin.stm32@gmail.com,
alexandre.torgue@foss.st.com, rmk+kernel@armlinux.org.uk,
maxime.chevallier@bootlin.com, Jose.Abreu@synopsys.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: stmmac: xgmac2: disable RBUE in default RX interrupt mask
Date: Thu, 4 Jun 2026 10:48:03 +0200 [thread overview]
Message-ID: <20260604084803.67068-1-pabeni@redhat.com> (raw)
In-Reply-To: <20260529071734.27722-1-muhammad.nazim.amirul.nazle.asmade@altera.com>
From: AI Reviewer <ai@example.com>
This is an AI-generated review of your patch. The human sending this
email has considered the AI review valid, or at least plausible.
Full review at: https://sashiko.dev/
---
net: stmmac: xgmac2: disable RBUE in default RX interrupt mask
This commit removes the Receive Buffer Unavailable (RBUE) interrupt from
the default RX and DMA interrupt masks. The goal is to prevent MAC
interrupt storms when the DMA runs out of descriptors under heavy
RX pressure.
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h
> index 51943705a2b03..b5fdc253a2f24 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h
[ ... ]
> @@ -379,9 +379,9 @@
> #define XGMAC_RIE BIT(6)
> #define XGMAC_TBUE BIT(2)
> #define XGMAC_TIE BIT(0)
> -#define XGMAC_DMA_INT_DEFAULT_EN (XGMAC_NIE | XGMAC_AIE | XGMAC_RBUE | \
> +#define XGMAC_DMA_INT_DEFAULT_EN (XGMAC_NIE | XGMAC_AIE | \
> XGMAC_RIE | XGMAC_TIE)
[Severity: Medium]
Does removing XGMAC_RBUE from XGMAC_DMA_INT_DEFAULT_EN prevent the
XGMAC_RBU status bit from being cleared in dwxgmac2_dma_interrupt()?
If this default mask is used to clear pending interrupts, writing a 0 to
the XGMAC_RBU position would fail to clear it. Would this cause the bit
to latch indefinitely, triggering redundant NAPI schedules on unrelated
abnormal interrupts?
> -#define XGMAC_DMA_INT_DEFAULT_RX (XGMAC_RBUE | XGMAC_RIE)
> +#define XGMAC_DMA_INT_DEFAULT_RX (XGMAC_RIE)
[Severity: High]
Does disabling RBUE entirely break RX out-of-memory recovery?
If the RX ring becomes completely empty during memory pressure because
stmmac_rx_refill() fails to allocate SKBs, the MAC DMA will suspend. Once
a new packet arrives, the MAC drops it and sets the XGMAC_RBU status.
Since RIE is only asserted when a packet is successfully received and
transferred to a descriptor, and RBUE is now disabled, it appears no
interrupt will fire at all in this state. Could this leave NAPI
unscheduled and result in a permanent RX path lockup even after memory
becomes available again?
--
This is an AI-generated review.
prev parent reply other threads:[~2026-06-04 8:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-29 7:17 muhammad.nazim.amirul.nazle.asmade
2026-05-29 19:19 ` Maxime Chevallier
2026-06-04 9:01 ` Nazle Asmade, Muhammad Nazim Amirul
2026-06-04 9:08 ` Maxime Chevallier
2026-06-04 9:47 ` Nazle Asmade, Muhammad Nazim Amirul
2026-06-04 8:48 ` Paolo Abeni [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=20260604084803.67068-1-pabeni@redhat.com \
--to=pabeni@redhat.com \
--cc=Jose.Abreu@synopsys.com \
--cc=alexandre.torgue@foss.st.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maxime.chevallier@bootlin.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=muhammad.nazim.amirul.nazle.asmade@altera.com \
--cc=netdev@vger.kernel.org \
--cc=rmk+kernel@armlinux.org.uk \
/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
Powered by JetHome