Re: [PATCH net] net: stmmac: dwmac-sun8i: Honor the RX checksum offload setting

From
James Hilliard <james.hilliard1@gmail.com>
Date
2026-11-20 17:33:49
Also in
linux-arm-kernel, linux-sunxi, lkml
Reply to
Jakub Kicinski, 2026-11-20
On Thu, Nov 19, 2026 at 5:11 PM Jakub Kicinski [off-list ref] wrote:
On Thu, 19 Nov 2026 16:32:58 -0700 James Hilliard wrote:
quoted
Would it make sense to address the `rx on` drops in a separate
follow-up along the lines of Oleksij's dwmac4 fix [0]? On sun8i that
would mean enabling error forwarding to DMA and passing packets whose
only error is an IP or transport checksum up as CHECKSUM_NONE, while
still discarding frames with a bad FCS or other fatal RX errors.

If we leave the checker enabled in both modes, `rx off` would only
control whether the driver reports a checksum as verified. In that
form the follow-up would replace the conditional bit-27 write rather
than depend on this patch.
I'm not very clear on the changes needed to get to "bad L4 csum packets
still reach the stack" / correct behavior. Would you be willing to
sketch the full series out already, and then we decide what gets
applied where?
I posted the two-patch series [0]. The first patch fixes RX checksum
handling in both ethtool modes. The second adds rx-all support.
What I would like to avoid is us applying this fix to net (which
seems legitimate on the surface), but then following up with another
fix which unconditionally clears EMAC_RX_DO_CRC since AFAIU we
need to clear it for the correct behavior.
We don't need to clear EMAC_RX_DO_CRC. On H616 I verified that setting
RX_ERR_FRM lets packets with a bad UDP checksum reach DMA while
EMAC_RX_DO_CRC is still set. The descriptor flags the checksum error,
so the driver can pass the packet up as CHECKSUM_NONE while still
dropping frames with a bad FCS by default.

The new series keeps EMAC_RX_DO_CRC set in both modes. It replaces
the conditional write in this patch, so there's no need to apply this
patch to net first.

[0] https://lore.kernel.org/r/20261120-submit-sun8i-rx-features-v1-v1-0-5058fecba6b3@gmail.com/ (local)
Thread (12 messages) 12 messages, 6 authors, last reply 1d ago
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help