netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net v2 0/3] net: stmmac: deliver frames with Rx checksum errors to the stack
@ 2026-11-04 15:19 Christian Schmidbauer
  2026-11-04 15:19 ` [PATCH net v2 1/3] net: stmmac: honour Rx checksum errors in the AF_XDP zero-copy path Christian Schmidbauer
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Christian Schmidbauer @ 2026-11-04 15:19 UTC (permalink / raw)
  To: netdev
  Cc: maxime.chevallier, andrew+netdev, davem, edumazet, kuba, pabeni,
	Oleksij Rempel, Christian Schmidbauer

On dwmac1000 the MAC drops every frame that fails Rx checksum validation
before the driver sees it. The enhanced descriptor parser would discard
such a frame even if the MAC delivered it. As a result, a VXLAN tunnel
over IPv6 with zero UDP checksums receives nothing while Rx checksum
offload is on, and neither rx_dropped nor rx_errors shows the loss.
Patches 2 and 3 deliver these frames with CHECKSUM_NONE instead, as
commit fe4042797651 ("net: stmmac: dwmac4: stop hardware from dropping
checksum-error packets") did for dwmac4.

Patch 1 makes the AF_XDP zero-copy Rx path honour the checksum error
status. That path already receives such frames on dwmac4, and patches
2 and 3 make them reach it on dwmac1000 as well. Patch 3 depends on
patches 1 and 2.

Tested on an Aruba AP-325 (ipq806x-gmac-dwmac) on the net tree, with
and without the series.

Not tested:

- Patch 1 was only compile-tested, as an AF_XDP zero-copy setup was not
  available.
- dwmac-loongson, which also uses dwmac1000_dma_ops.
- Cores with normal descriptors, such as Rockchip RK3288, RK3328 and
  RK3399.

Changes in v2:

- Rebase on net, where commit 834ec9530832 ("net: stmmac: drop split
  frames on AF_XDP zero-copy RX") fixed the multi-buffer issue that
  Sashiko raised in the v1 review.
- Drop RDES0_LENGTH_ERROR from the Error Summary mask in patch 2, as
  the bit does not contribute to Error Summary and the length check
  further down discards such a frame anyway.
- Explain in the commit message of patch 2 why RDES0 bit 7 is not
  treated as an L2 error.
- Set DMA_CONTROL_DT in patch 3 only with enhanced descriptors, as
  the normal descriptor parser does not report a checksum-only error.

v1: https://lore.kernel.org/netdev/20261020190319.884375-1-opensource@grische.xyz/

Christian Schmidbauer (3):
  net: stmmac: honour Rx checksum errors in the AF_XDP zero-copy path
  net: stmmac: dwmac1000: don't discard frames with only a checksum
    error
  net: stmmac: dwmac1000: stop hardware from dropping checksum-error
    packets

 drivers/net/ethernet/stmicro/stmmac/dwmac1000.h     | 1 +
 drivers/net/ethernet/stmicro/stmmac/dwmac1000_dma.c | 8 ++++++++
 drivers/net/ethernet/stmicro/stmmac/enh_desc.c      | 8 ++++----
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c   | 8 +++++---
 4 files changed, 18 insertions(+), 7 deletions(-)


base-commit: 241dec6f9ab74d8c3ef246764f3611666b96b9e1
-- 
2.54.0


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

end of thread, other threads:[~2026-11-10 21:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-04 15:19 [PATCH net v2 0/3] net: stmmac: deliver frames with Rx checksum errors to the stack Christian Schmidbauer
2026-11-04 15:19 ` [PATCH net v2 1/3] net: stmmac: honour Rx checksum errors in the AF_XDP zero-copy path Christian Schmidbauer
2026-11-04 15:19 ` [PATCH net v2 2/3] net: stmmac: dwmac1000: don't discard frames with only a checksum error Christian Schmidbauer
2026-11-04 15:19 ` [PATCH net v2 3/3] net: stmmac: dwmac1000: stop hardware from dropping checksum-error packets Christian Schmidbauer
2026-11-10 20:25   ` Jakub Kicinski
2026-11-10 21:47     ` Christian Schmidbauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).