pub struct RxQueue { /* private fields */ }Expand description
A receive queue on a DPDK port
Implementations§
Source§impl RxQueue
impl RxQueue
Sourcepub fn new(
port_id: u16,
queue_id: u16,
_config: RxQueueConfig,
) -> DpdkResult<Self>
pub fn new( port_id: u16, queue_id: u16, _config: RxQueueConfig, ) -> DpdkResult<Self>
Create a new receive queue
Sourcepub fn receive_burst(&self, max_packets: u16) -> DpdkResult<Vec<Mbuf>>
pub fn receive_burst(&self, max_packets: u16) -> DpdkResult<Vec<Mbuf>>
Receive a burst of packets
Returns a vector of received mbufs, up to max_packets count.
This is a non-blocking operation - returns immediately with
whatever packets are available.
Sourcepub fn receive_burst_timeout(
&self,
max_packets: u16,
timeout_us: u64,
) -> DpdkResult<Vec<Mbuf>>
pub fn receive_burst_timeout( &self, max_packets: u16, timeout_us: u64, ) -> DpdkResult<Vec<Mbuf>>
Poll for packets with a timeout
This is a convenience method that polls until either:
- At least one packet is received
- The timeout expires
Auto Trait Implementations§
impl Freeze for RxQueue
impl RefUnwindSafe for RxQueue
impl Send for RxQueue
impl Sync for RxQueue
impl Unpin for RxQueue
impl UnsafeUnpin for RxQueue
impl UnwindSafe for RxQueue
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