Re: [PATCH net v3 1/2] xsk: defer software checksum until the skb is complete
From: Stanislav Fomichev
Date: Wed Oct 28 2026 - 12:02:32 EST
On 10/28, Rongzheng Wang wrote:
> When XDP_UMEM_TX_SW_CSUM is used with multi-buffer TX, xsk_skb_metadata()
> calls skb_checksum_help() while only the first descriptor has been added to
> the skb. The checksum therefore covers just the first fragment, and
> skb_checksum_help() sets ip_summed to CHECKSUM_NONE, so the remaining
> fragments are never included in the checksum.
>
> Move the software checksum calculation to the point where the last
> descriptor has been added to the skb.
>
> On a checksum failure the packet is now dropped instead of being returned
> to the application for a retry. This path is not reachable with the
> existing metadata validation, but the behavior change is intentional.
>
> Fixes: 11614723af26 ("xsk: Add option to calculate TX checksum in SW")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Rongzheng Wang <testwrzwrz@xxxxxxxxx>
Acked-by: Stanislav Fomichev <sdf@xxxxxxxxxxx>