Struct xdpsock::umem::UmemConfig [−][src]
pub struct UmemConfig { /* fields omitted */ }
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 UmemConfig
[src]
impl UmemConfig
[src]pub fn new(
frame_count: u32,
frame_size: u32,
fill_queue_size: u32,
comp_queue_size: u32,
frame_headroom: u32,
use_huge_pages: bool
) -> Result<Self, UmemConfigError>
[src]
frame_count: u32,
frame_size: u32,
fill_queue_size: u32,
comp_queue_size: u32,
frame_headroom: u32,
use_huge_pages: bool
) -> Result<Self, UmemConfigError>
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
impl Clone for UmemConfig
[src]
impl Clone for UmemConfig
[src]fn clone(&self) -> UmemConfig
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Default for UmemConfig
[src]
impl Default for UmemConfig
[src]impl PartialEq<UmemConfig> for UmemConfig
[src]
impl PartialEq<UmemConfig> for UmemConfig
[src]fn eq(&self, other: &UmemConfig) -> bool
[src]
fn ne(&self, other: &UmemConfig) -> bool
[src]
impl StructuralPartialEq for UmemConfig
[src]
impl StructuralPartialEq for UmemConfig
[src]Auto Trait Implementations
impl RefUnwindSafe for UmemConfig
impl RefUnwindSafe for UmemConfig
impl Send for UmemConfig
impl Send for UmemConfig
impl Sync for UmemConfig
impl Sync for UmemConfig
impl Unpin for UmemConfig
impl Unpin for UmemConfig
impl UnwindSafe for UmemConfig
impl UnwindSafe for UmemConfig