diff options
author | Magnus Karlsson <magnus.karlsson@intel.com> | 2023-07-19 16:24:16 +0300 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2023-07-19 19:56:50 +0300 |
commit | f540d44e05cf2f324697ba375235da2d7c92743c (patch) | |
tree | 00de72aca37ada0a735baa63047f387dcff86d15 /tools/include/uapi/linux/if_xdp.h | |
parent | 17f1034dd76d7465d4c0948c5280c6fc64ee0542 (diff) | |
download | linux-f540d44e05cf2f324697ba375235da2d7c92743c.tar.xz |
selftests/xsk: add basic multi-buffer test
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.
Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
Link: https://lore.kernel.org/r/20230719132421.584801-20-maciej.fijalkowski@intel.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/include/uapi/linux/if_xdp.h')
-rw-r--r-- | tools/include/uapi/linux/if_xdp.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/include/uapi/linux/if_xdp.h b/tools/include/uapi/linux/if_xdp.h index 80245f5b4dd7..73a47da885dc 100644 --- a/tools/include/uapi/linux/if_xdp.h +++ b/tools/include/uapi/linux/if_xdp.h @@ -25,6 +25,12 @@ * application. */ #define XDP_USE_NEED_WAKEUP (1 << 3) +/* By setting this option, userspace application indicates that it can + * handle multiple descriptors per packet thus enabling xsk core to split + * multi-buffer XDP frames into multiple Rx descriptors. Without this set + * such frames will be dropped by xsk. + */ +#define XDP_USE_SG (1 << 4) /* Flags for xsk_umem_config flags */ #define XDP_UMEM_UNALIGNED_CHUNK_FLAG (1 << 0) |