pub struct Wq { /* private fields */ }
Expand description
A work queue (send or receive).
Implementations§
Source§impl Wq
impl Wq
Sourcepub fn new_sq(mem: MemoryBlock, doorbell: DoorbellPage, id: u32) -> Self
pub fn new_sq(mem: MemoryBlock, doorbell: DoorbellPage, id: u32) -> Self
Creates a new send work queue.
Sourcepub fn new_rq(mem: MemoryBlock, doorbell: DoorbellPage, id: u32) -> Self
pub fn new_rq(mem: MemoryBlock, doorbell: DoorbellPage, id: u32) -> Self
Creates a new receive work queue.
Sourcepub fn advance_head(&mut self, n: u32)
pub fn advance_head(&mut self, n: u32)
Advances the head, indicating that n
more bytes are available in the ring.
Sourcepub const fn entry_size(oob_len: usize, sge_count: usize) -> u32
pub const fn entry_size(oob_len: usize, sge_count: usize) -> u32
Computes the size of an entry with oob_len
OOB bytes and sge_count
scatter-gather entries.
Sourcepub fn push<I: IntoIterator<Item = Sge>>(
&mut self,
oob: &(impl IntoBytes + Immutable + KnownLayout),
sgl: I,
client_oob_in_sgl: Option<u8>,
gd_client_unit_data: u16,
) -> Result<u32, QueueFull>where
I::IntoIter: ExactSizeIterator,
pub fn push<I: IntoIterator<Item = Sge>>(
&mut self,
oob: &(impl IntoBytes + Immutable + KnownLayout),
sgl: I,
client_oob_in_sgl: Option<u8>,
gd_client_unit_data: u16,
) -> Result<u32, QueueFull>where
I::IntoIter: ExactSizeIterator,
Pushes a new work queue entry with an inline out-of-band buffer and external data via a scatter-gather list.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Wq
impl !RefUnwindSafe for Wq
impl Send for Wq
impl Sync for Wq
impl Unpin for Wq
impl !UnwindSafe for Wq
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