pub struct TxRing { /* private fields */ }Expand description
The ring used to enqueue packets for the kernel to send
Implementations§
Source§impl TxRing
impl TxRing
Sourcepub unsafe fn send(&mut self, packets: &mut HeapSlab) -> usize
pub unsafe fn send(&mut self, packets: &mut HeapSlab) -> usize
Enqueues packets to be sent by the kernel
§Safety
The crate::Umem that owns the packets being sent must outlive the AF_XDP
socket
§Returns
The number of packets that were actually enqueued. This number can be
lower than the requested num_packets if the ring doesn’t have sufficient
capacity
Auto Trait Implementations§
impl Freeze for TxRing
impl RefUnwindSafe for TxRing
impl Send for TxRing
impl Sync for TxRing
impl Unpin for TxRing
impl !UnwindSafe for TxRing
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