pub struct RxRing { /* private fields */ }Expand description
Ring from which we can dequeue packets that have been filled by the kernel
Implementations§
Source§impl RxRing
impl RxRing
Sourcepub unsafe fn recv(&mut self, umem: &Umem, packets: &mut HeapSlab) -> usize
pub unsafe fn recv(&mut self, umem: &Umem, packets: &mut HeapSlab) -> usize
Pops packets that have finished receiving
The number of packets returned will be the minimum of the number of packets actually available in the ring, and the remaining capacity in the slab
§Returns
The number of actual packets that were pushed to the slab
§Safety
The packets returned in the slab must not outlive the Umem
Auto Trait Implementations§
impl Freeze for RxRing
impl RefUnwindSafe for RxRing
impl Send for RxRing
impl Sync for RxRing
impl Unpin for RxRing
impl !UnwindSafe for RxRing
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