summaryrefslogtreecommitdiff
path: root/include/linux/securebits.h
diff options
context:
space:
mode:
authorRongzheng Wang <testwrzwrz@gmail.com>2026-11-04 11:48:08 +0800
committerPaolo Abeni <pabeni@redhat.com>2026-11-10 12:07:00 +0100
commitf2eddafbfcc004098425fee7c5664adbe29152d7 (patch)
treed0f17a8c06cf940a1bd5824ce09c2d913ee7af0f /include/linux/securebits.h
parentb71c101bbb9814d163c00234d43c41f0a17907d4 (diff)
xsk: defer software checksum until the skb is complete
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@vger.kernel.org Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com> Acked-by: Stanislav Fomichev <sdf@fomichev.me> Reviewed-by: Jason Xing <kerneljasonxing@gmail.com> Signed-off-by: Rongzheng Wang <testwrzwrz@gmail.com> Link: https://patch.msgid.link/20261104034809.24545-2-testwrzwrz@gmail.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'include/linux/securebits.h')
0 files changed, 0 insertions, 0 deletions