diff options
author | Stanislav Fomichev <sdf@google.com> | 2023-11-27 22:03:14 +0300 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2023-11-30 01:59:40 +0300 |
commit | 11614723af26e7c32fcb704d8f30fdf60c1122dc (patch) | |
tree | e1040027e771206bc1b17ebc626bf8d5e1a58574 /tools/include | |
parent | ce59f9686e0eca19431571c7403394a6c36371e2 (diff) | |
download | linux-11614723af26e7c32fcb704d8f30fdf60c1122dc.tar.xz |
xsk: Add option to calculate TX checksum in SW
For XDP_COPY mode, add a UMEM option XDP_UMEM_TX_SW_CSUM
to call skb_checksum_help in transmit path. Might be useful
to debugging issues with real hardware. I also use this mode
in the selftests.
Signed-off-by: Stanislav Fomichev <sdf@google.com>
Link: https://lore.kernel.org/r/20231127190319.1190813-9-sdf@google.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/include')
-rw-r--r-- | tools/include/uapi/linux/if_xdp.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/include/uapi/linux/if_xdp.h b/tools/include/uapi/linux/if_xdp.h index d0882edc1642..638c606dfa74 100644 --- a/tools/include/uapi/linux/if_xdp.h +++ b/tools/include/uapi/linux/if_xdp.h @@ -33,7 +33,13 @@ #define XDP_USE_SG (1 << 4) /* Flags for xsk_umem_config flags */ -#define XDP_UMEM_UNALIGNED_CHUNK_FLAG (1 << 0) +#define XDP_UMEM_UNALIGNED_CHUNK_FLAG (1 << 0) + +/* Force checksum calculation in software. Can be used for testing or + * working around potential HW issues. This option causes performance + * degradation and only works in XDP_COPY mode. + */ +#define XDP_UMEM_TX_SW_CSUM (1 << 1) struct sockaddr_xdp { __u16 sxdp_family; |