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.
Showing the changes to include/uapi (1 of 7 files). Show all
Unified · Split
| @@ -33,7 +33,13 @@ · 32 unmodified lines | |||
| 33 | #define XDP_USE_SG (1 << 4) | 33 | #define XDP_USE_SG (1 << 4) |
| 34 | 34 | ||
| 35 | /* Flags for xsk_umem_config flags */ | 35 | /* 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) | ||
| 37 | 43 | ||
| 38 | struct sockaddr_xdp { | 44 | struct sockaddr_xdp { |
| 39 | __u16 sxdp_family; | 45 | __u16 sxdp_family; |