pub struct UmemPoolConfig {
pub num_chunks: usize,
pub chunk_size: usize,
pub pre_fault: bool,
pub lock_memory: bool,
}Expand description
Configuration parameters for allocating an AF_XDP UmemPool.
Fields§
§num_chunks: usizeNumber of chunk buffers in the pool.
chunk_size: usizeSize of each chunk in bytes (typically 2048 or 4096).
pre_fault: boolPre-fault all memory pages during allocation via MAP_POPULATE.
When true (the default), eliminates page fault jitter during packet I/O
at the expense of higher startup latency and immediate RSS allocation.
When false, pages are faulted lazily on-demand, reducing startup time
and memory footprint on resource-constrained hosts.
lock_memory: boolPin pages in physical RAM via libc::mlock to prevent swapping.
Requires CAP_IPC_LOCK or sufficient RLIMIT_MEMLOCK. If true and mlock
fails, an error is returned.
Trait Implementations§
Source§impl Clone for UmemPoolConfig
impl Clone for UmemPoolConfig
impl Copy for UmemPoolConfig
Source§impl Debug for UmemPoolConfig
impl Debug for UmemPoolConfig
Source§impl Default for UmemPoolConfig
impl Default for UmemPoolConfig
impl Eq for UmemPoolConfig
Source§impl PartialEq for UmemPoolConfig
impl PartialEq for UmemPoolConfig
impl StructuralPartialEq for UmemPoolConfig
Auto Trait Implementations§
impl Freeze for UmemPoolConfig
impl RefUnwindSafe for UmemPoolConfig
impl Send for UmemPoolConfig
impl Sync for UmemPoolConfig
impl Unpin for UmemPoolConfig
impl UnsafeUnpin for UmemPoolConfig
impl UnwindSafe for UmemPoolConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more