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; 4+ 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] 4+ messages in thread

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

Thread overview: 4+ 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-20 15:32 ` [PATCH net-next 2/2] net: stmmac: dwmac-sun8i: support ethtool rx-all James Hilliard
2026-11-20 15:37 ` [PATCH net-next 0/2] net: stmmac: handle RX checksum and wire errors on sun8i netdev-bot+sinfo

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