History

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.

Stanislav Fomichev committed 2 years ago

Commit 11614721 parent ce59f967 files · +37 −3Browse files

Showing the changes to include/uapi (1 of 7 files). Show all

Unified · Split

include/uapi/linux/if_xdp.h+7−1
@@ -33,7 +33,13 @@ · 32 unmodified lines
3333 #define XDP_USE_SG (1 << 4)
3434
3535 /* Flags for xsk_umem_config flags */
36−#define XDP_UMEM_UNALIGNED_CHUNK_FLAG (1 << 0)
36+#define XDP_UMEM_UNALIGNED_CHUNK_FLAG (1 << 0)
37+
38+/* Force checksum calculation in software. Can be used for testing or
39+ * working around potential HW issues. This option causes performance
40+ * degradation and only works in XDP_COPY mode.
41+ */
42+#define XDP_UMEM_TX_SW_CSUM (1 << 1)
3743
3844 struct sockaddr_xdp {
3945 __u16 sxdp_family;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t