Skip to main content

QueuePair

Struct QueuePair 

Source
pub struct QueuePair {
    pub rx: RxQueue,
    pub tx: TxQueue,
}
Expand description

Queue pair combining RX and TX queues

This is a common pattern for per-core packet processing

Fields§

§rx: RxQueue§tx: TxQueue

Implementations§

Source§

impl QueuePair

Source

pub fn new( port_id: u16, queue_id: u16, rx_config: RxQueueConfig, tx_config: TxQueueConfig, ) -> DpdkResult<Self>

Create a new queue pair

Source

pub fn echo(&self, max_burst: u16) -> DpdkResult<u16>

Echo packets back (common test pattern)

Receives packets and immediately sends them back out

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.