Struct rxdp::PerCpuMap [−][src]
Used for working with per-cpu eBPF maps.
Implementations
impl<K: Default, V: ByteAligned> PerCpuMap<K, V>
[src]
pub fn create(
map_type: MapType,
key_size: u32,
value_size: u32,
max_entries: u32,
map_flags: u32
) -> XDPResult<PerCpuMap<K, V>>
[src]
map_type: MapType,
key_size: u32,
value_size: u32,
max_entries: u32,
map_flags: u32
) -> XDPResult<PerCpuMap<K, V>>
Create a new map.
pub fn new(xdp: &XDPLoadedObject, map_name: &str) -> XDPResult<PerCpuMap<K, V>>
[src]
Get access to the eBPF map map_name
. This will fail if the requested key size
doesn’t match the key size defined in the ELF file.
Trait Implementations
impl<K: Default + Copy, V: ByteAligned> MapLike<K, V> for PerCpuMap<K, V>
[src]
fn update_batching_not_supported(&self) -> bool
[src]
fn map_fd(&self) -> i32
[src]
fn map_type(&self) -> MapType
[src]
fn max_entries(&self) -> u32
[src]
fn update(&self, key: &K, value: &V, flags: MapFlags) -> XDPResult<()>
[src]
fn lookup(&self, key: &K) -> XDPResult<MapValue<V>>
[src]
fn update_batch_impl(
&self,
keys: &mut Vec<K>,
values: &mut Vec<V>,
opts: &bpf_map_batch_opts
) -> (i32, u32)
[src]
&self,
keys: &mut Vec<K>,
values: &mut Vec<V>,
opts: &bpf_map_batch_opts
) -> (i32, u32)
fn lookup_batch_impl(
&self,
batch_size: u32,
next_key: Option<u32>,
delete: bool
) -> XDPResult<BatchResult<K, MapValue<V>>>
[src]
&self,
batch_size: u32,
next_key: Option<u32>,
delete: bool
) -> XDPResult<BatchResult<K, MapValue<V>>>
fn _items(&self) -> XDPResult<Vec<KeyValue<K, MapValue<V>>>>
[src]
fn items(&self) -> XDPResult<Vec<KeyValue<K, MapValue<V>>>>
[src]
fn delete(&self, key: &K) -> XDPResult<()>
[src]
fn update_batch(
&self,
keys: &mut Vec<K>,
values: &mut Vec<V>,
flags: MapFlags
) -> XDPResult<u32>
[src]
&self,
keys: &mut Vec<K>,
values: &mut Vec<V>,
flags: MapFlags
) -> XDPResult<u32>
fn lookup_batch(
&self,
batch_size: u32,
next_key: Option<u32>
) -> XDPResult<BatchResult<K, MapValue<V>>>
[src]
&self,
batch_size: u32,
next_key: Option<u32>
) -> XDPResult<BatchResult<K, MapValue<V>>>
fn lookup_and_delete_batch(
&self,
batch_size: u32,
next_key: Option<u32>
) -> XDPResult<BatchResult<K, MapValue<V>>>
[src]
&self,
batch_size: u32,
next_key: Option<u32>
) -> XDPResult<BatchResult<K, MapValue<V>>>
Auto Trait Implementations
impl<K, V> RefUnwindSafe for PerCpuMap<K, V> where
K: RefUnwindSafe,
V: RefUnwindSafe,
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<K, V> Send for PerCpuMap<K, V> where
K: Send,
V: Send,
K: Send,
V: Send,
impl<K, V> Sync for PerCpuMap<K, V> where
K: Sync,
V: Sync,
K: Sync,
V: Sync,
impl<K, V> Unpin for PerCpuMap<K, V> where
K: Unpin,
V: Unpin,
K: Unpin,
V: Unpin,
impl<K, V> UnwindSafe for PerCpuMap<K, V> where
K: UnwindSafe,
V: UnwindSafe,
K: UnwindSafe,
V: UnwindSafe,
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, 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>,