linux/net/xdp
Maciej Fijalkowski 36ee60b569 xsk: validate MTU against usable frame size on bind
AF_XDP bind currently accepts zero-copy pool configurations without
verifying that the device MTU fits into the usable frame space provided
by the UMEM chunk.

This becomes a problem since we started to respect tailroom which is
subtracted from chunk_size (among with headroom). 2k chunk size might
not provide enough space for standard 1500 MTU, so let us catch such
settings at bind time. Furthermore, validate whether underlying HW will
be able to satisfy configured MTU wrt XSK's frame size multiplied by
supported Rx buffer chain length (that is exposed via
net_device::xdp_zc_max_segs).

Fixes: 24ea50127e ("xsk: support mbuf on ZC RX")
Reviewed-by: Björn Töpel <bjorn@kernel.org>
Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Link: https://patch.msgid.link/20260402154958.562179-5-maciej.fijalkowski@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-04-06 18:43:51 -07:00
..
Kconfig
Makefile
xdp_umem.c xsk: tighten UMEM headroom validation to account for tailroom and min frame 2026-04-06 18:43:51 -07:00
xdp_umem.h
xsk_buff_pool.c xsk: validate MTU against usable frame size on bind 2026-04-06 18:43:51 -07:00
xsk_diag.c net: remove sock_i_uid() 2025-06-23 17:04:03 -07:00
xsk_queue.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
xsk_queue.h xsk: move cq_cached_prod_lock to avoid touching a cacheline in sending path 2026-01-15 10:07:45 +01:00
xsk.c xsk: respect tailroom for ZC setups 2026-04-06 18:43:51 -07:00
xsk.h xdp: Add proper __rcu annotations to redirect map entries 2021-06-24 19:41:15 +02:00
xskmap.c xsk: fix OOB map writes when deleting elements 2024-11-25 14:25:48 -08:00