Re: [PATCH net] net: stmmac: dwmac-sun8i: Honor the RX checksum offload setting
From: James Hilliard
Date: Fri Nov 20 2026 - 12:33:57 EST
On Thu, Nov 19, 2026 at 5:11 PM Jakub Kicinski <kuba@xxxxxxxxxx> wrote:
>
> On Thu, 19 Nov 2026 16:32:58 -0700 James Hilliard wrote:
> > 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@xxxxxxxxx/