Struct xsk_rs::config::UmemConfig
source · [−]pub struct UmemConfig { /* private fields */ }
Expand description
Config for a Umem
instance.
It’s worth noting that the specified frame_size
is not
necessarily the buffer size that will be available to write data
into. Some of this will be eaten up by XDP program headroom
(XDP_PACKET_HEADROOM
) and any non-zero frame_headroom
. Use
the mtu
function to determine whether the frame
is large enough to hold the data you wish to transmit.
Implementations
sourceimpl Config
impl Config
sourcepub fn builder() -> ConfigBuilder
pub fn builder() -> ConfigBuilder
Creates a new UmemConfigBuilder
instance
with with sizes as per the libbpf
defaults.
sourcepub fn frame_size(&self) -> FrameSize
pub fn frame_size(&self) -> FrameSize
The size of each frame in the Umem
.
sourcepub fn fill_queue_size(&self) -> QueueSize
pub fn fill_queue_size(&self) -> QueueSize
The FillQueue
size.
sourcepub fn comp_queue_size(&self) -> QueueSize
pub fn comp_queue_size(&self) -> QueueSize
The CompQueue
size.
sourcepub fn xdp_headroom(&self) -> u32
pub fn xdp_headroom(&self) -> u32
The frame headroom reserved for the XDP program.
sourcepub fn frame_headroom(&self) -> u32
pub fn frame_headroom(&self) -> u32
The frame headroom available to the user.
Trait Implementations
impl Copy for Config
Auto Trait Implementations
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more