Expand description
AF_XDP (XSK) kernel-bypass driver and UMEM shared memory pool.
Provides zero-copy memory buffers (UmemPool) and ring buffer descriptors
(FillRing, CompletionRing) for kernel-bypass packet I/O.
Low-level libc XSK/XDP structures and unsafe memory mappings are quarantined
within this module, with explicit // SAFETY: justifications on all unsafe blocks.
Structs§
- Completion
Ring - Ring buffer for UMEM completion descriptors (chunk addresses pushed by kernel/NIC after TX completion).
- Fill
Ring - Ring buffer for UMEM fill descriptors (chunk addresses pushed by userspace for the kernel/NIC to fill).
- RxRing
- Circular descriptor ring for AF_XDP RX packets.
- TxRing
- Circular descriptor ring for AF_XDP TX packets.
- Umem
Pool - Pre-allocated page-aligned shared memory pool for AF_XDP kernel-bypass I/O.
- Umem
Pool Config - Configuration parameters for allocating an AF_XDP
UmemPool. - Umem
Slab - Dedicated per-core / per-queue UMEM chunk slab for lock-free AF_XDP multi-worker scaling.
- XskDesc
- Descriptor for AF_XDP packets in RX and TX rings.
- XskSocket
- AF_XDP socket with three-tier opportunistic fallback engine.
Enums§
- XskBind
Mode - The operational mode for AF_XDP binding, with automatic fallback.
Constants§
- ENOTSUPP
- Linux internal errno for unsupported operation (
ENOTSUPP). - UMEM_
CHUNK_ SIZE - Default UMEM chunk size in bytes (2 KiB aligns with MTU 1500 + wire overhead).
- UMEM_
RING_ SIZE - Default ring size in descriptors (must be a power of two).
- XDP_
COPY - Flag for copy-mode bind in AF_XDP (
XDP_COPY). - XDP_
ZEROCOPY - Alias for
XDP_ZERO_COPYmatching kernel namingXDP_ZEROCOPY. - XDP_
ZERO_ COPY - Flag for zero-copy mode bind in AF_XDP (
XDP_ZEROCOPY).