Netdev List
 help / color / mirror / Atom feed
* [PATCH net-next 0/2] net: stmmac: handle RX checksum and wire errors on sun8i
@ 2026-11-20 15:32 James Hilliard
  2026-11-20 15:32 ` [PATCH net-next 1/2] net: stmmac: dwmac-sun8i: deliver RX checksum errors to the stack James Hilliard
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: James Hilliard @ 2026-11-20 15:32 UTC (permalink / raw)
  To: netdev, Maxime Chevallier, Andrew Lunn, David S. Miller,
	Eric Dumazet, Paolo Abeni, Maxime Coquelin, Alexandre Torgue,
	Ong Boon Leong, Chen-Yu Tsai, Jernej Skrabec, Samuel Holland,
	LABBE Corentin
  Cc: Jakub Kicinski, Oleksij Rempel, linux-arm-kernel, linux-sunxi,
	James Hilliard

The sun8i MAC has one DMA forwarding control for both IP checksum
failures and Ethernet errors. With forwarding disabled, packet sockets
cannot see bad transport checksums, and the stack cannot apply its own
checksum policy. Toggling the hardware checker instead leaves no way
to tell whether a queued IP frame was actually checked.

Jakub asked how the proposed bit-27 change [0] fits into the complete
fix [1]. This series replaces that change: the checker stays on whenever
the receiver is running. Both ethtool modes deliver checksum failures for
software validation; only with rx on can the driver mark a checked
packet as verified. Changing modes no longer needs a ring flush.

The first patch fixes ordinary reception while still dropping frames
with a bad FCS. The second adds rx-all support for capturing complete
frames with wire errors and runts that the MAC can forward.
On H616, a bad-FCS 64-byte frame reaches DMA, but a bad-FCS 63-byte
frame does not, even with both forwarding controls enabled.

[0] https://lore.kernel.org/r/20261115-submit-sun8i-emac-rx-checksum-v1-v1-1-f186d127b39f@gmail.com/
[1] https://lore.kernel.org/r/20261119161151.5251fc86@kernel.org/

Assisted-by: Codex:gpt-6-astra
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
James Hilliard (2):
      net: stmmac: dwmac-sun8i: deliver RX checksum errors to the stack
      net: stmmac: dwmac-sun8i: support ethtool rx-all

 drivers/net/ethernet/stmicro/stmmac/common.h      |   4 +
 drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 167 ++++++++++++++++------
 drivers/net/ethernet/stmicro/stmmac/hwif.h        |   3 +-
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c |  59 +++++---
 4 files changed, 172 insertions(+), 61 deletions(-)
---
base-commit: 2208ab00f4f213ade91ab775e7f8c4dacdcc856e
base-tree: git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git main
change-id: 20261119-submit-sun8i-rx-features-v1-9177e8328598

Best regards,
--  
James Hilliard <james.hilliard1@gmail.com>


^ permalink raw reply	[flat|nested] 14+ messages in thread
* [PATCH net-next 0/2] net: stmmac: support ethtool rx-all on sun8i
@ 2026-11-22  7:45 James Hilliard
  2026-11-22  7:45 ` [PATCH net-next 2/2] net: stmmac: dwmac-sun8i: support ethtool rx-all James Hilliard
  0 siblings, 1 reply; 14+ messages in thread
From: James Hilliard @ 2026-11-22  7:45 UTC (permalink / raw)
  To: netdev, Maxime Chevallier, Andrew Lunn, David S. Miller,
	Eric Dumazet, Paolo Abeni, Maxime Coquelin, Alexandre Torgue,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland
  Cc: Jakub Kicinski, Oleksij Rempel, linux-arm-kernel, linux-sunxi,
	James Hilliard

On H616 the PHY can count a bad-FCS frame even when it does not appear
in a packet capture. Enabling rx-all lets a capture see the complete
errored frames the MAC can forward. On this hardware, a 64-byte frame
with a bad FCS reaches DMA, but a 63-byte one does not, even with runt
forwarding enabled. Both lengths include the FCS.

Add the common stmmac receive and feature-handling paths first, then
enable them for sun8i. This feature was previously posted alongside the
checksum fix and is now separate following Maxime's review [0].

[0] https://lore.kernel.org/r/a91278be-9c14-4769-81f1-38497c38c47b@bootlin.com/

Assisted-by: Codex:gpt-6.2-astra
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>

---
James Hilliard (2):
      net: stmmac: add common RXALL handling
      net: stmmac: dwmac-sun8i: support ethtool rx-all

 drivers/net/ethernet/stmicro/stmmac/common.h      |  2 +
 drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 73 +++++++++++++----------
 drivers/net/ethernet/stmicro/stmmac/hwif.h        |  1 +
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 52 +++++++++++-----
 4 files changed, 80 insertions(+), 48 deletions(-)
---
base-commit: eb6d6c80d35449c27471b1874f13066c09a8964d
base-tree: git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git main
change-id: 20261122-submit-sun8i-rxall-v1-2666ccf2a020
prerequisite-change-id: 20261119-submit-sun8i-rx-features-v1-9177e8328598:v2
prerequisite-patch-id: cfcd83b1605af3856aff1188ef7bdbdbfc19cce0

Best regards,
--  
James Hilliard <james.hilliard1@gmail.com>


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2026-11-24 15:47 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-20 15:32 [PATCH net-next 0/2] net: stmmac: handle RX checksum and wire errors on sun8i James Hilliard
2026-11-20 15:32 ` [PATCH net-next 1/2] net: stmmac: dwmac-sun8i: deliver RX checksum errors to the stack James Hilliard
2026-11-24 15:47   ` netdev-bot+sashiko
2026-11-20 15:32 ` [PATCH net-next 2/2] net: stmmac: dwmac-sun8i: support ethtool rx-all James Hilliard
2026-11-20 18:30   ` Maxime Chevallier
2026-11-20 18:46     ` James Hilliard
2026-11-24 15:47   ` netdev-bot+sashiko
2026-11-20 15:37 ` [PATCH net-next 0/2] net: stmmac: handle RX checksum and wire errors on sun8i netdev-bot+sinfo
2026-11-20 16:29   ` James Hilliard
  -- strict thread matches above, loose matches on Subject: below --
2026-11-22  7:45 [PATCH net-next 0/2] net: stmmac: support ethtool rx-all " James Hilliard
2026-11-22  7:45 ` [PATCH net-next 2/2] net: stmmac: dwmac-sun8i: support ethtool rx-all James Hilliard
2026-11-22 18:38   ` Andrew Lunn
2026-11-22 20:05     ` James Hilliard
2026-11-22 20:57       ` Andrew Lunn
2026-11-22 18:41   ` Andrew Lunn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox