mirror of
https://github.com/torvalds/linux.git
synced 2026-11-20 13:03:48 +00:00
When the checksum offload engine (CoE) is enabled, the dwmac1000 MAC silently drops any frame for which the engine detects a checksum error, before the driver sees it. This breaks VXLAN over IPv6 with zero UDP checksums, which RFC 6935 and RFC 6936 allow for tunnels. Set DMA_CONTROL_DT so that such frames are delivered instead of dropped, as commitfe40427976("net: stmmac: dwmac4: stop hardware from dropping checksum-error packets") did for dwmac4. CoE remains enabled, so the driver still sees the error status and marks the skb CHECKSUM_NONE for the stack to verify. Set the bit only with enhanced descriptors. The normal descriptor parser does not report a checksum-only error to the stack, so cores that use it keep dropping such frames in hardware anyway. Tested on an Aruba AP-325 (ipq806x-gmac-dwmac) with Rx checksum offload on. Link: https://lore.kernel.org/all/[email protected]/ Link: https://github.com/freifunk-gluon/gluon/issues/3783 Fixes:47dd7a540b("net: add support for STMicroelectronics Ethernet controllers.") Cc: <[email protected]> # 6.6.x:ee0aace5f8: net: stmmac: Correctly handle Rx checksum offload errors Cc: <[email protected]> # 6.6.x Signed-off-by: Christian Schmidbauer <[email protected]> Reviewed-by: Maxime Chevallier <[email protected]> Tested-by: Maxime Chevallier <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Paolo Abeni <[email protected]>