pub struct XdpConfig {
pub zero_copy: Option<bool>,
pub huge_page: Option<bool>,
pub need_wakeup: Option<bool>,
}
Expand description
Configuration options for creating an AF_XDP socket.
Fields§
§zero_copy: Option<bool>
Enables or disables zero-copy mode.
Some(true)
: EnablesXDP_ZEROCOPY
.Some(false)
: EnablesXDP_COPY
.None
: The kernel’s default behavior is used (typically copy mode).
huge_page: Option<bool>
Enables or disables huge pages for the UMEM.
Some(true)
: Attempts to use huge pages.Some(false)
: Uses standard page sizes.None
: The implementation default is used (typically standard pages).
need_wakeup: Option<bool>
Sets the XDP_USE_NEED_WAKEUP
flag.
Some(true)
: The flag is set. The application must callkick()
to wake up the kernel.Some(false)
: The flag is not set. The kernel polls without needing a wakeup call.None
: Defaults totrue
.
Trait Implementations§
impl Copy for XdpConfig
Auto Trait Implementations§
impl Freeze for XdpConfig
impl RefUnwindSafe for XdpConfig
impl Send for XdpConfig
impl Sync for XdpConfig
impl Unpin for XdpConfig
impl UnwindSafe for XdpConfig
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