aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/net/xdp_sock_drv.h
diff options
context:
space:
mode:
authorMaxim Mikityanskiy <maximmi@nvidia.com>2022-09-29 00:21:41 -0700
committerJakub Kicinski <kuba@kernel.org>2022-09-30 07:55:45 -0700
commit9ca66afe73da16cd2c529e6770cc5aea0c4454df (patch)
tree91007d60eee481373f974cb7f9c615eb495ceeaa /include/net/xdp_sock_drv.h
parentip6_vti:Remove the space before the comma (diff)
downloadwireguard-linux-9ca66afe73da16cd2c529e6770cc5aea0c4454df.tar.xz
wireguard-linux-9ca66afe73da16cd2c529e6770cc5aea0c4454df.zip
xsk: Expose min chunk size to drivers
Drivers should be aware of the range of valid UMEM chunk sizes to be able to allocate their internal structures of an appropriate size. It will be used by mlx5e in the following patches. Signed-off-by: Maxim Mikityanskiy <maximmi@nvidia.com> Reviewed-by: Tariq Toukan <tariqt@nvidia.com> CC: "Björn Töpel" <bjorn@kernel.org> CC: Magnus Karlsson <magnus.karlsson@intel.com> CC: Maciej Fijalkowski <maciej.fijalkowski@intel.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/net/xdp_sock_drv.h')
-rw-r--r--include/net/xdp_sock_drv.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net/xdp_sock_drv.h b/include/net/xdp_sock_drv.h
index 0e58c38ce0c1..6406faa3d57d 100644
--- a/include/net/xdp_sock_drv.h
+++ b/include/net/xdp_sock_drv.h
@@ -9,6 +9,9 @@
#include <net/xdp_sock.h>
#include <net/xsk_buff_pool.h>
+#define XDP_UMEM_MIN_CHUNK_SHIFT 11
+#define XDP_UMEM_MIN_CHUNK_SIZE (1 << XDP_UMEM_MIN_CHUNK_SHIFT)
+
#ifdef CONFIG_XDP_SOCKETS
void xsk_tx_completed(struct xsk_buff_pool *pool, u32 nb_entries);