Re: [PATCH net 1/2] r8169: preserve checksum offload when packet padding is unnecessary
flat view
From: Simon Horman <horms@kernel.org>
Date: 2026-10-07 15:34:44
On Sat, Oct 03, 2026 at 12:07:54AM +0000, iugfdin wrote:
rtl_quirk_packet_padto() returns the minimum packet length required by
the padding quirks. For RTL8168evl and RTL8125-family chips this is at
least ETH_ZLEN, even when the skb is already longer.
rtl8169_features_check() treats that nonzero target as a boolean and
therefore disables checksum offload for ordinary non-GSO
CHECKSUM_PARTIAL packets on these chips. Packets that need no padding
are unnecessarily checksummed in software.
Compare the skb length with the padding target instead. Packets that
actually need padding continue to use software checksumming; the
existing short-frame and transport-offset checks are unchanged.
Fixes: 8d520b4de3ed ("r8169: work around RTL8125 UDP hw bug")
Assisted-by: LLM
Signed-off-by: iugfdin <redacted>Please consider using your real name in the From header and Signed-off-by tag. Apologies if I am misreading things and that is already the case.
--- Tested with W=1 driver-target builds on net under x86-64 allmodconfig and allyesconfig, and source-executing ASan/UBSan checks with modeled kernel/DMA/MMIO boundaries. No physical Realtek NIC was available; this is not an on-device test claim.
Reviewed-by: Simon Horman <horms@kernel.org>