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 save(&self) -> WqSavedState
 
pub fn save(&self) -> WqSavedState
Save the state of the Wq for restoration after servicing
Sourcepub fn restore_rq(
    mem: MemoryBlock,
    state: WqSavedState,
    doorbell: DoorbellPage,
) -> Result<Self>
 
pub fn restore_rq( mem: MemoryBlock, state: WqSavedState, doorbell: DoorbellPage, ) -> Result<Self>
Restores an existing receive work queue.
Sourcepub fn restore_sq(
    mem: MemoryBlock,
    state: WqSavedState,
    doorbell: DoorbellPage,
) -> Result<Self>
 
pub fn restore_sq( mem: MemoryBlock, state: WqSavedState, doorbell: DoorbellPage, ) -> Result<Self>
Restores an existing send 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 fn read(&mut self, offset: u32, n: usize) -> Vec<u8> ⓘ
 
pub fn read(&mut self, offset: u32, n: usize) -> Vec<u8> ⓘ
Reads from the offset, the first n bytes.
Sourcepub fn push<I: IntoIterator<Item = Sge>>(
    &mut self,
    oob: impl IntoBytes + Immutable + KnownLayout,
    sgl: I,
) -> Result<u32, QueueFull>
 
pub fn push<I: IntoIterator<Item = Sge>>( &mut self, oob: impl IntoBytes + Immutable + KnownLayout, sgl: I, ) -> Result<u32, QueueFull>
Pushes a new work queue entry with an inline out-of-band buffer and external data via a scatter-gather list.
Sourcepub fn wqe_builder(
    &mut self,
    oob: impl IntoBytes + Immutable + KnownLayout,
) -> WqeBuilder<'_>
 
pub fn wqe_builder( &mut self, oob: impl IntoBytes + Immutable + KnownLayout, ) -> WqeBuilder<'_>
Begins building a work queue entry with an inline out-of-band buffer.
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