* [PATCH net] net: stmmac: preserve RX checksum capability when offload is disabled
@ 2026-11-16 0:49 James Hilliard
2026-11-16 0:53 ` netdev-bot+sinfo
2026-11-17 15:50 ` Maxime Chevallier
0 siblings, 2 replies; 5+ messages in thread
From: James Hilliard @ 2026-11-16 0:49 UTC (permalink / raw)
To: netdev, Maxime Chevallier, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Maxime Coquelin,
Alexandre Torgue, Giuseppe CAVALLARO
Cc: linux-arm-kernel, linux-kernel, James Hilliard
The GMAC, GMAC4 and XGMAC rx_ipc callbacks return whether checksum offload
is enabled after programming the requested state. A zero return is
therefore expected when hw->rx_csum is zero.
stmmac_hw_setup() treats every zero return as a lack of hardware support
and clears plat->rx_coe. Disabling RX checksum offload with ethtool and
then reopening the interface loses the saved capability. Subsequent
attempts to enable offload are rejected by stmmac_fix_features(), which
uses plat->rx_coe to filter NETIF_F_RXCSUM.
Only clear the capability if offload was requested but could not be
enabled. Keep calling rx_ipc when offload is disabled so that the hardware
is still programmed with the requested state.
Fixes: 0f280e4d23c2 ("stmmac: fix the rx csum feature")
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 25894771e9e9..e162976be2e6 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -3723,7 +3723,7 @@ static int stmmac_hw_setup(struct net_device *dev)
stmmac_safety_feat_configuration(priv);
ret = stmmac_rx_ipc(priv, priv->hw);
- if (!ret) {
+ if (priv->hw->rx_csum && !ret) {
netdev_warn(priv->dev, "RX IPC Checksum Offload disabled\n");
priv->plat->rx_coe = STMMAC_RX_COE_NONE;
priv->hw->rx_csum = 0;
---
base-commit: aa40afa831ebfe45e40a23721711059f2ac584d4
change-id: 20261115-submit-stmmac-rx-checksum-capability-v1-ef6645788992
Best regards,
--
James Hilliard <james.hilliard1@gmail.com>
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH net] net: stmmac: preserve RX checksum capability when offload is disabled
@ 2026-11-16 0:53 ` netdev-bot+sinfo
2026-11-16 2:23 ` James Hilliard
0 siblings, 1 reply; 5+ messages in thread
From: netdev-bot+sinfo @ 2026-11-16 0:53 UTC (permalink / raw)
To: James Hilliard
Cc: netdev, Maxime Chevallier, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Maxime Coquelin,
Alexandre Torgue, Giuseppe CAVALLARO, 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 LLM and not proven at runtime). If it was triggered
please include the symptoms, like the stack trace or kernel 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.
*IMPORTANT*: If you do repost (for other reasons) - please include
the relevant info in the cover letter or commit messages.
--
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: preserve RX checksum capability when offload is disabled
2026-11-16 0:53 ` netdev-bot+sinfo
@ 2026-11-16 2:23 ` James Hilliard
0 siblings, 0 replies; 5+ messages in thread
From: James Hilliard @ 2026-11-16 2:23 UTC (permalink / raw)
To: netdev-bot+sinfo
Cc: netdev, Maxime Chevallier, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Maxime Coquelin,
Alexandre Torgue, Giuseppe CAVALLARO, linux-arm-kernel,
linux-kernel
On Sun, Nov 15, 2026 at 5:53 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.
This was found while investigating RX checksum offload behavior on
H616 and reviewing the shared setup and feature-filtering paths.
>
> - Whether the issue was actually triggered, or is only theoretical
> (e.g. found by LLM and not proven at runtime). If it was triggered
> please include the symptoms, like the stack trace or kernel messages.
The capability loss was reproduced in a source-extracted test using the
actual GMAC, GMAC4 and XGMAC checksum callbacks with mocked MMIO and the
relevant setup and feature-filtering logic.
With the original code, disabling offload and following the reopen path
clears plat->rx_coe. The feature filter then prevents offload from being
enabled again. With the patch, the saved capability survives that
sequence. A requested enable that fails hardware readback still clears
the capability.
>
> - 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.
Tested on an Allwinner H616 board with an AC200 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.
>
> *IMPORTANT*: If you do repost (for other reasons) - please include
> the relevant info in the cover letter or commit messages.
> --
> 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: preserve RX checksum capability when offload is disabled
2026-11-16 0:49 [PATCH net] net: stmmac: preserve RX checksum capability when offload is disabled James Hilliard
2026-11-16 0:53 ` netdev-bot+sinfo
@ 2026-11-17 15:50 ` Maxime Chevallier
2026-11-17 20:34 ` Lorenzo Bianconi
1 sibling, 1 reply; 5+ messages in thread
From: Maxime Chevallier @ 2026-11-17 15:50 UTC (permalink / raw)
To: James Hilliard, netdev, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Maxime Coquelin,
Alexandre Torgue, Giuseppe CAVALLARO
Cc: linux-arm-kernel, linux-kernel
Hi James,
On 11/16/26 01:49, James Hilliard wrote:
> The GMAC, GMAC4 and XGMAC rx_ipc callbacks return whether checksum offload
> is enabled after programming the requested state. A zero return is
> therefore expected when hw->rx_csum is zero.
>
> stmmac_hw_setup() treats every zero return as a lack of hardware support
> and clears plat->rx_coe. Disabling RX checksum offload with ethtool and
> then reopening the interface loses the saved capability. Subsequent
> attempts to enable offload are rejected by stmmac_fix_features(), which
> uses plat->rx_coe to filter NETIF_F_RXCSUM.
>
> Only clear the capability if offload was requested but could not be
> enabled. Keep calling rx_ipc when offload is disabled so that the hardware
> is still programmed with the requested state.
>
> Fixes: 0f280e4d23c2 ("stmmac: fix the rx csum feature")
This tag doesn't exist :
https://netdev-ctrl.bots.linux.dev/logview.html?f=/logs/build/1212156/14986330/verify_fixes/stdout
Besides that, this is legit. Tested on AgileX5, CycloneV and stm32mp1:
ip l s eth0 up
ethtool -K eth0 rx off
ip l s eth0 down;
ip l s eth0 up
ethtool -K eth0 rx on
Without patch:
ethtool -k eth0 => rx-checksumming off
With:
ethtool -k eth0 => rx-checksumming on
Please respin with a correct Fixes, feel free to add :
Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Tested-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Maxime
pw-bot: cr
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH net] net: stmmac: preserve RX checksum capability when offload is disabled
2026-11-17 15:50 ` Maxime Chevallier
@ 2026-11-17 20:34 ` Lorenzo Bianconi
0 siblings, 0 replies; 5+ messages in thread
From: Lorenzo Bianconi @ 2026-11-17 20:34 UTC (permalink / raw)
To: Maxime Chevallier
Cc: James Hilliard, netdev, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Maxime Coquelin,
Alexandre Torgue, Giuseppe CAVALLARO, linux-arm-kernel,
linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1652 bytes --]
> Hi James,
>
> On 11/16/26 01:49, James Hilliard wrote:
> > The GMAC, GMAC4 and XGMAC rx_ipc callbacks return whether checksum offload
> > is enabled after programming the requested state. A zero return is
> > therefore expected when hw->rx_csum is zero.
> >
> > stmmac_hw_setup() treats every zero return as a lack of hardware support
> > and clears plat->rx_coe. Disabling RX checksum offload with ethtool and
> > then reopening the interface loses the saved capability. Subsequent
> > attempts to enable offload are rejected by stmmac_fix_features(), which
> > uses plat->rx_coe to filter NETIF_F_RXCSUM.
> >
> > Only clear the capability if offload was requested but could not be
> > enabled. Keep calling rx_ipc when offload is disabled so that the hardware
> > is still programmed with the requested state.
> >
> > Fixes: 0f280e4d23c2 ("stmmac: fix the rx csum feature")
>
> This tag doesn't exist :
>
> https://netdev-ctrl.bots.linux.dev/logview.html?f=/logs/build/1212156/14986330/verify_fixes/stdout
>
> Besides that, this is legit. Tested on AgileX5, CycloneV and stm32mp1:
>
> ip l s eth0 up
> ethtool -K eth0 rx off
> ip l s eth0 down;
> ip l s eth0 up
> ethtool -K eth0 rx on
>
> Without patch:
> ethtool -k eth0 => rx-checksumming off
>
> With:
> ethtool -k eth0 => rx-checksumming on
>
> Please respin with a correct Fixes, feel free to add :
>
> Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
> Tested-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
>
> Maxime
>
> pw-bot: cr
>
>
Reviewed-by:Lorenzo Bianconi <lorenzo.bianconi@oss.qualcomm.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-11-17 20:34 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-16 0:49 [PATCH net] net: stmmac: preserve RX checksum capability when offload is disabled James Hilliard
2026-11-16 0:53 ` netdev-bot+sinfo
2026-11-16 2:23 ` James Hilliard
2026-11-17 15:50 ` Maxime Chevallier
2026-11-17 20:34 ` Lorenzo Bianconi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox