pub struct CompletionRing { /* private fields */ }Expand description
The ring used to dequeue buffers that the kernel has finished sending
Implementations§
Source§impl CompletionRing
impl CompletionRing
Sourcepub fn dequeue(&mut self, umem: &mut Umem, num_packets: usize) -> usize
pub fn dequeue(&mut self, umem: &mut Umem, num_packets: usize) -> usize
Dequeues up to num_packets and makes them available for use again
§Returns
The number of packets that were actually dequeued.
Sourcepub fn dequeue_with_timestamps(
&mut self,
umem: &mut Umem,
timestamps: &mut [u64],
) -> usize
pub fn dequeue_with_timestamps( &mut self, umem: &mut Umem, timestamps: &mut [u64], ) -> usize
The same as Self::dequeue, except the timestamp each packet was
transmitted is written to the provided slice.
Note this requires that crate::Packet::set_tx_metadata was called
Auto Trait Implementations§
impl Freeze for CompletionRing
impl RefUnwindSafe for CompletionRing
impl Send for CompletionRing
impl Sync for CompletionRing
impl Unpin for CompletionRing
impl !UnwindSafe for CompletionRing
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