Netdev List
 help / color / mirror / Atom feed
From: Christian Schmidbauer <opensource@grische.xyz>
To: netdev@vger.kernel.org
Cc: maxime.chevallier@bootlin.com, andrew+netdev@lunn.ch,
	davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org,
	pabeni@redhat.com, Oleksij Rempel <o.rempel@pengutronix.de>,
	Christian Schmidbauer <opensource@grische.xyz>
Subject: [PATCH net v2 0/3] net: stmmac: deliver frames with Rx checksum errors to the stack
Date: Wed,  4 Nov 2026 16:19:10 +0100	[thread overview]
Message-ID: <20261104151914.2651241-1-opensource@grische.xyz> (raw)

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


             reply	other threads:[~2026-11-04 15:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-04 15:19 Christian Schmidbauer [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261104151914.2651241-1-opensource@grische.xyz \
    --to=opensource@grische.xyz \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=kuba@kernel.org \
    --cc=maxime.chevallier@bootlin.com \
    --cc=netdev@vger.kernel.org \
    --cc=o.rempel@pengutronix.de \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox