Add the first basic multi-buffer test that sends a stream of 9K packets and validates that they are received at the other end. In order to enable sending and receiving multi-buffer packets, code that sets the MTU is introduced as well as modifications to the XDP programs so that they signal that they are multi-buffer enabled.
Showing the changes to tools/include/uapi/linux (1 of 6 files). Show all
Unified · Split
| @@ -25,6 +25,12 @@ · 24 unmodified lines | |||
| 25 | * application. | 25 | * application. |
| 26 | */ | 26 | */ |
| 27 | #define XDP_USE_NEED_WAKEUP (1 << 3) | 27 | #define XDP_USE_NEED_WAKEUP (1 << 3) |
| 28 | /* By setting this option, userspace application indicates that it can | ||
| 29 | * handle multiple descriptors per packet thus enabling xsk core to split | ||
| 30 | * multi-buffer XDP frames into multiple Rx descriptors. Without this set | ||
| 31 | * such frames will be dropped by xsk. | ||
| 32 | */ | ||
| 33 | #define XDP_USE_SG (1 << 4) | ||
| 28 | 34 | ||
| 29 | /* Flags for xsk_umem_config flags */ | 35 | /* Flags for xsk_umem_config flags */ |
| 30 | #define XDP_UMEM_UNALIGNED_CHUNK_FLAG (1 << 0) | 36 | #define XDP_UMEM_UNALIGNED_CHUNK_FLAG (1 << 0) |