From: Simon Horman <horms@kernel.org>
To: Jan Petrous <jan.petrous@oss.nxp.com>
Cc: alexandre.torgue@foss.st.com, devicetree@vger.kernel.org,
festevam@gmail.com, chester62515@gmail.com,
s.hauer@pengutronix.de, linux-arm-kernel@lists.infradead.org,
davem@davemloft.net, mbrugger@suse.com, netdev@vger.kernel.org,
andrew+netdev@lunn.ch, s32@nxp.com, pabeni@redhat.com,
linux-kernel@vger.kernel.org, krzk+dt@kernel.org,
conor+dt@kernel.org, Frank.Li@nxp.com, robh@kernel.org,
kuba@kernel.org, linux-stm32@st-md-mailman.stormreply.com,
ghennadi.procopciuc@oss.nxp.com, kernel@pengutronix.de,
shawnguo@kernel.org, edumazet@google.com,
mcoquelin.stm32@gmail.com, imx@lists.linux.dev
Subject: Re: [v5,4/4] stmmac: s32: enable support for Multi-IRQ mode
Date: Thu, 26 Feb 2026 12:02:00 +0000 [thread overview]
Message-ID: <aaA2ODfcRcFDkPPt@horms.kernel.org> (raw)
In-Reply-To: <aZ7IwgwP5iy2kej8@lsv051416.swis.nl-cdc01.nxp.com>
On Wed, Feb 25, 2026 at 11:02:42AM +0100, Jan Petrous wrote:
> On Wed, Feb 25, 2026 at 09:25:13AM +0000, Simon Horman wrote:
> > This is an AI-generated review of your patch. The human sending this
> > email has considered the AI review valid, or at least plausible.
> >
> > For local reproduction steps see https://netdev-ai.bots.linux.dev/ai-local.html
> > ---
> > stmmac: s32: enable support for Multi-IRQ mode
> >
> > This commit enables Multi-IRQ mode for the S32 DWMAC driver, allowing
> > per-queue IRQs for improved performance. The driver checks for multiple
> > queues and per-queue IRQs, enabling multi-IRQ mode when both are present.
> >
> > > diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-s32.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-s32.c
> > > index af594a096676..4aad7077c9d6 100644
> > > --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-s32.c
> > > +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-s32.c
> >
> > [ ... ]
> >
> > > @@ -165,6 +165,16 @@ static int s32_dwmac_probe(struct platform_device *pdev)
> > > plat->core_type = DWMAC_CORE_GMAC4;
> > > plat->pmt = 1;
> > > plat->flags |= STMMAC_FLAG_SPH_DISABLE;
> > > +
> > > + /* Check for multi-IRQ config. Assumption: symmetrical rx/tx queues */
> > > + if (plat->rx_queues_to_use > 1 &&
> > > + (res.rx_irq[0] > 0 && res.tx_irq[0] > 0)) {
> > > + plat->flags |= STMMAC_FLAG_MULTI_MSI_EN;
> > > + dev_info(dev, "Multi-IRQ mode (per queue IRQs) selected\n");
> > > + } else {
> > > + dev_info(dev, "MAC IRQ mode selected\n");
> > > + }
> >
> > Does this validation check all queues have IRQs? The condition verifies
> > only res.rx_irq[0] and res.tx_irq[0] but doesn't confirm that higher
> > queues have IRQs when rx_queues_to_use > 1.
> >
> > If a device tree specifies multiple queues but only provides IRQs for
> > queue 0:
> >
> > snps,rx-queues-to-use = <2>;
> > interrupt-names = "macirq", "rx-queue-0", "tx-queue-0";
> > /* queue 1 IRQs missing */
> >
> > The driver would enable STMMAC_FLAG_MULTI_MSI_EN, but later in
> > stmmac_request_irq_multi_msi() (drivers/net/ethernet/stmicro/stmmac/
> > stmmac_main.c), queues with rx_irq[i] == 0 are silently skipped:
> >
> > for (i = 0; i < priv->plat->rx_queues_to_use; i++) {
> > if (priv->rx_irq[i] <= 0)
> > continue; /* queue 1+ skipped, no handler registered */
> > ...
> > }
> >
> > This would leave higher-numbered queues with no interrupt handler,
> > causing packet loss when traffic arrives on those queues.
> >
> > Would it be safer to validate all queue IRQs before enabling multi-IRQ
> > mode, or fall back to MAC IRQ mode if any queue IRQ is missing?
> >
> > > +
> > > plat->rx_fifo_size = 20480;
> > > plat->tx_fifo_size = 20480;
>
> Hi Simon,
>
> I already addressed this in v6 I sent today.
Thanks!
prev parent reply other threads:[~2026-02-26 12:02 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-23 13:58 [PATCH v5 0/4] Support multi-channel IRQs in stmmac platform drivers Jan Petrous via B4 Relay
2026-02-23 13:58 ` [PATCH v5 1/4] net: stmmac: platform: read channels irq Jan Petrous via B4 Relay
2026-02-25 9:24 ` [v5,1/4] " Simon Horman
2026-02-25 10:01 ` Jan Petrous
2026-02-23 13:58 ` [PATCH v5 2/4] dt-bindings: net: nxp,s32-dwmac: Declare per-queue interrupts Jan Petrous via B4 Relay
2026-02-24 7:06 ` Krzysztof Kozlowski
2026-02-24 7:20 ` Jan Petrous
2026-02-23 13:58 ` [PATCH v5 3/4] arm64: dts: s32: set Ethernet channel irqs Jan Petrous via B4 Relay
2026-02-23 13:58 ` [PATCH v5 4/4] stmmac: s32: enable support for Multi-IRQ mode Jan Petrous via B4 Relay
2026-02-25 9:25 ` [v5,4/4] " Simon Horman
2026-02-25 10:02 ` Jan Petrous
2026-02-26 12:02 ` Simon Horman [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=aaA2ODfcRcFDkPPt@horms.kernel.org \
--to=horms@kernel.org \
--cc=Frank.Li@nxp.com \
--cc=alexandre.torgue@foss.st.com \
--cc=andrew+netdev@lunn.ch \
--cc=chester62515@gmail.com \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=festevam@gmail.com \
--cc=ghennadi.procopciuc@oss.nxp.com \
--cc=imx@lists.linux.dev \
--cc=jan.petrous@oss.nxp.com \
--cc=kernel@pengutronix.de \
--cc=krzk+dt@kernel.org \
--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=mbrugger@suse.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=robh@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=s32@nxp.com \
--cc=shawnguo@kernel.org \
/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