pub enum FanoutMode {
Hash,
LoadBalance,
Cpu,
Rollover,
Random,
QueueMapping,
Ebpf,
}Expand description
Fanout distribution mode for multi-socket packet sharing.
Variants§
Hash
Distribute by flow hash (src/dst IP+port).
LoadBalance
Round-robin across sockets.
Cpu
Route to the CPU that received the NIC interrupt.
Rollover
Fill one socket, overflow when backlogged.
Random
Random distribution.
QueueMapping
Based on skb->queue_mapping.
Ebpf
eBPF program selects the target socket.
The program receives the packet and returns the socket index
(0-based) within the fanout group. After building the socket with
.fanout(FanoutMode::Ebpf, group_id), attach the program via
Capture::attach_fanout_ebpf().
Trait Implementations§
Source§impl Clone for FanoutMode
impl Clone for FanoutMode
Source§fn clone(&self) -> FanoutMode
fn clone(&self) -> FanoutMode
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FanoutMode
impl Debug for FanoutMode
Source§impl Hash for FanoutMode
impl Hash for FanoutMode
Source§impl PartialEq for FanoutMode
impl PartialEq for FanoutMode
Source§fn eq(&self, other: &FanoutMode) -> bool
fn eq(&self, other: &FanoutMode) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for FanoutMode
impl Eq for FanoutMode
impl StructuralPartialEq for FanoutMode
Auto Trait Implementations§
impl Freeze for FanoutMode
impl RefUnwindSafe for FanoutMode
impl Send for FanoutMode
impl Sync for FanoutMode
impl Unpin for FanoutMode
impl UnsafeUnpin for FanoutMode
impl UnwindSafe for FanoutMode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.