[−][src]Struct xsk_rs::UmemConfig
Config for a Umem instance.
fill_queue_size
and comp_queue_size
must be powers of two and
frame size must not be less than 2048
. If you have set
use_huge_pages
as true
but are getting errors, check that the
HugePages_Total
setting is non-zero when you run cat /proc/meminfo
.
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_PACKET_HEADROOM
and
any non-zero frame_headroom
, so make sure to check that
frame_size
is large enough to hold the data you with to transmit
(e.g. an ETH frame) plus XDP_PACKET_HEADROOM + frame_headroom
bytes.
Implementations
impl Config
[src]
pub fn new(
frame_count: NonZeroU32,
frame_size: NonZeroU32,
fill_queue_size: u32,
comp_queue_size: u32,
frame_headroom: u32,
use_huge_pages: bool
) -> Result<Self, ConfigError>
[src]
frame_count: NonZeroU32,
frame_size: NonZeroU32,
fill_queue_size: u32,
comp_queue_size: u32,
frame_headroom: u32,
use_huge_pages: bool
) -> Result<Self, ConfigError>
pub fn default(frame_count: NonZeroU32, use_huge_pages: bool) -> Self
[src]
Default configuration based on constants set in the libbpf
library.
pub fn frame_count(&self) -> u32
[src]
pub fn frame_size(&self) -> u32
[src]
pub fn fill_queue_size(&self) -> u32
[src]
pub fn comp_queue_size(&self) -> u32
[src]
pub fn frame_headroom(&self) -> u32
[src]
pub fn use_huge_pages(&self) -> bool
[src]
pub fn umem_len(&self) -> usize
[src]
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Config
[src]
impl Send for Config
[src]
impl Sync for Config
[src]
impl Unpin for Config
[src]
impl UnwindSafe for Config
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,