* [PATCH net] net: stmmac: leave the datapath running for normal-size MTU changes
@ 2026-10-01 4:39 James Hilliard
2026-10-01 4:42 ` netdev-bot+sinfo
2026-10-06 6:11 ` Nicolai Buchwitz
0 siblings, 2 replies; 5+ messages in thread
From: James Hilliard @ 2026-10-01 4:39 UTC (permalink / raw)
To: netdev, Paolo Abeni, Jakub Kicinski, Maxime Chevallier,
Andrew Lunn, Eric Dumazet, Maxime Coquelin, Alexandre Torgue,
Christian Marangi
Cc: David S. Miller, linux-stm32, linux-arm-kernel, linux-kernel,
Eric Dumazet, James Hilliard
When both MTUs are at most ETH_DATA_LEN, the receive buffer size and MAC
receive limit do not change. Update the MTU without restarting the
datapath.
This also avoids rebinding a live AF_XDP pool to a temporary RXQ. XDP
rejects jumbo MTUs, so all supported XDP MTU changes take this path.
Jumbo transitions remain on the reopen path until the rollback change.
Fixes: 3470079687448 ("net: ethernet: stmicro: stmmac: permit MTU change with interface up")
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 3f34d491c959..03cd14d10356 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -6161,7 +6161,12 @@ static int stmmac_change_mtu(struct net_device *dev, int new_mtu)
if ((txfifosz < new_mtu) || (new_mtu > BUF_SIZE_16KiB))
return -EINVAL;
- if (netif_running(dev)) {
+ /* Normal-size frames use the same buffers and MAC receive limits.
+ * In particular, do not disturb a live AF_XDP pool: XDP does not
+ * support jumbo frames, so it never needs the ring replacement below.
+ */
+ if (netif_running(dev) &&
+ (dev->mtu > ETH_DATA_LEN || mtu > ETH_DATA_LEN)) {
netdev_dbg(priv->dev, "restarting interface to change its MTU\n");
/* Try to allocate the new DMA conf with the new mtu */
dma_conf = stmmac_setup_dma_desc(priv, mtu);
---
base-commit: a7bfaba4823e3c165bb2004c74eff7c096672bc7
change-id: 20260930-stmmac-mtu-fastpath-68813ead3b90
Best regards,
--
James Hilliard <james.hilliard1@gmail.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net] net: stmmac: leave the datapath running for normal-size MTU changes
2026-10-01 4:39 [PATCH net] net: stmmac: leave the datapath running for normal-size MTU changes James Hilliard
@ 2026-10-01 4:42 ` netdev-bot+sinfo
2026-10-06 1:47 ` Jakub Kicinski
2026-10-06 4:31 ` James Hilliard
2026-10-06 6:11 ` Nicolai Buchwitz
1 sibling, 2 replies; 5+ messages in thread
From: netdev-bot+sinfo @ 2026-10-01 4:42 UTC (permalink / raw)
To: James Hilliard
Cc: netdev, Paolo Abeni, Jakub Kicinski, Maxime Chevallier,
Andrew Lunn, Eric Dumazet, Maxime Coquelin, Alexandre Torgue,
Christian Marangi, David S. Miller, linux-stm32,
linux-arm-kernel, linux-kernel
Hi!
This is an automated message. This series looks like a fix, but its
commit messages seem to be missing some information:
- How the issue was discovered, e.g. hit in production, hit during
development, syzbot report, manual code inspection, LLM or static
analysis tool scan.
- Whether the issue was actually triggered, or is only theoretical
(e.g. found by code inspection). If it was triggered please include
the symptoms, like the stack trace or error messages.
- What hardware the change was tested on. For driver fixes please
mention the device (and if relevant firmware version) used for
testing, or say that the change was not tested on real hardware.
Please do not repost the series just to address the above. Instead,
reply to this email with the missing information, so that reviewers
can take it into account. If the series needs another revision for
other reasons, please include the information in the commit messages
then.
The evaluation is done by an LLM so it may be wrong, if you think
that is the case please reply and explain.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net] net: stmmac: leave the datapath running for normal-size MTU changes
2026-10-01 4:42 ` netdev-bot+sinfo
@ 2026-10-06 1:47 ` Jakub Kicinski
2026-10-06 4:31 ` James Hilliard
1 sibling, 0 replies; 5+ messages in thread
From: Jakub Kicinski @ 2026-10-06 1:47 UTC (permalink / raw)
To: James Hilliard
Cc: netdev-bot+sinfo, netdev, Paolo Abeni, Maxime Chevallier,
Andrew Lunn, Eric Dumazet, Maxime Coquelin, Alexandre Torgue,
Christian Marangi, David S. Miller, linux-stm32,
linux-arm-kernel, linux-kernel
On Thu, 01 Oct 2026 04:42:59 +0000 netdev-bot+sinfo@kernel.org wrote:
> Hi!
>
> This is an automated message. This series looks like a fix, but its
> commit messages seem to be missing some information:
>
> - How the issue was discovered, e.g. hit in production, hit during
> development, syzbot report, manual code inspection, LLM or static
> analysis tool scan.
>
> - Whether the issue was actually triggered, or is only theoretical
> (e.g. found by code inspection). If it was triggered please include
> the symptoms, like the stack trace or error messages.
>
> - What hardware the change was tested on. For driver fixes please
> mention the device (and if relevant firmware version) used for
> testing, or say that the change was not tested on real hardware.
>
> Please do not repost the series just to address the above. Instead,
> reply to this email with the missing information, so that reviewers
> can take it into account. If the series needs another revision for
> other reasons, please include the information in the commit messages
> then.
>
> The evaluation is done by an LLM so it may be wrong, if you think
> that is the case please reply and explain.
James, you have to reply to these.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net] net: stmmac: leave the datapath running for normal-size MTU changes
2026-10-01 4:42 ` netdev-bot+sinfo
2026-10-06 1:47 ` Jakub Kicinski
@ 2026-10-06 4:31 ` James Hilliard
1 sibling, 0 replies; 5+ messages in thread
From: James Hilliard @ 2026-10-06 4:31 UTC (permalink / raw)
To: netdev-bot+sinfo
Cc: netdev, Paolo Abeni, Jakub Kicinski, Maxime Chevallier,
Andrew Lunn, Eric Dumazet, Maxime Coquelin, Alexandre Torgue,
Christian Marangi, David S. Miller, linux-stm32,
linux-arm-kernel, linux-kernel
On Wed, Sep 30, 2026 at 10:43 PM <netdev-bot+sinfo@kernel.org> wrote:
>
> Hi!
>
> This is an automated message. This series looks like a fix, but its
> commit messages seem to be missing some information:
>
> - How the issue was discovered, e.g. hit in production, hit during
> development, syzbot report, manual code inspection, LLM or static
> analysis tool scan.
Found by source review while working on the larger stmmac MTU/resume
recovery series, then split out as an independently useful fix.
> - Whether the issue was actually triggered, or is only theoretical
> (e.g. found by code inspection). If it was triggered please include
> the symptoms, like the stack trace or error messages.
The live AF_XDP pool corruption scenario was identified by inspection,
not reproduced on hardware.
> - What hardware the change was tested on. For driver fixes please
> mention the device (and if relevant firmware version) used for
> testing, or say that the change was not tested on real hardware.
The fast path was tested on Allwinner H616 hardware with sun8i EMAC1
and an AC300 PHY.
> Please do not repost the series just to address the above. Instead,
> reply to this email with the missing information, so that reviewers
> can take it into account. If the series needs another revision for
> other reasons, please include the information in the commit messages
> then.
>
> The evaluation is done by an LLM so it may be wrong, if you think
> that is the case please reply and explain.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net] net: stmmac: leave the datapath running for normal-size MTU changes
2026-10-01 4:39 [PATCH net] net: stmmac: leave the datapath running for normal-size MTU changes James Hilliard
2026-10-01 4:42 ` netdev-bot+sinfo
@ 2026-10-06 6:11 ` Nicolai Buchwitz
1 sibling, 0 replies; 5+ messages in thread
From: Nicolai Buchwitz @ 2026-10-06 6:11 UTC (permalink / raw)
To: James Hilliard
Cc: netdev, Paolo Abeni, Jakub Kicinski, Maxime Chevallier,
Andrew Lunn, Eric Dumazet, Maxime Coquelin, Alexandre Torgue,
Christian Marangi, David S. Miller, linux-stm32,
linux-arm-kernel, linux-kernel
Hi James
On 1.10.2026 06:39, James Hilliard wrote:
> When both MTUs are at most ETH_DATA_LEN, the receive buffer size and
> MAC
> receive limit do not change. Update the MTU without restarting the
> datapath.
>
> This also avoids rebinding a live AF_XDP pool to a temporary RXQ. XDP
> rejects jumbo MTUs, so all supported XDP MTU changes take this path.
> Jumbo transitions remain on the reopen path until the rollback change.
>
> Fixes: 3470079687448 ("net: ethernet: stmicro: stmmac: permit MTU
> change with interface up")
> Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
> ---
> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> index 3f34d491c959..03cd14d10356 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> @@ -6161,7 +6161,12 @@ static int stmmac_change_mtu(struct net_device
> *dev, int new_mtu)
> if ((txfifosz < new_mtu) || (new_mtu > BUF_SIZE_16KiB))
> return -EINVAL;
>
> - if (netif_running(dev)) {
> + /* Normal-size frames use the same buffers and MAC receive limits.
> + * In particular, do not disturb a live AF_XDP pool: XDP does not
> + * support jumbo frames, so it never needs the ring replacement
> below.
> + */
> + if (netif_running(dev) &&
> + (dev->mtu > ETH_DATA_LEN || mtu > ETH_DATA_LEN)) {
> netdev_dbg(priv->dev, "restarting interface to change its MTU\n");
> /* Try to allocate the new DMA conf with the new mtu */
> dma_conf = stmmac_setup_dma_desc(priv, mtu);
>
> ---
> base-commit: a7bfaba4823e3c165bb2004c74eff7c096672bc7
> change-id: 20260930-stmmac-mtu-fastpath-68813ead3b90
>
> Best regards,
> --
> James Hilliard <james.hilliard1@gmail.com>
Reviewed-by: Nicolai Buchwitz <nb@tipi-net.de>
Thanks,
Nicolai
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-10-06 6:11 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-01 4:39 [PATCH net] net: stmmac: leave the datapath running for normal-size MTU changes James Hilliard
2026-10-01 4:42 ` netdev-bot+sinfo
2026-10-06 1:47 ` Jakub Kicinski
2026-10-06 4:31 ` James Hilliard
2026-10-06 6:11 ` Nicolai Buchwitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®