Struct ibverbs::CompletionQueue [−][src]
pub struct CompletionQueue<'ctx> { /* fields omitted */ }
A completion queue that allows subscribing to the completion of queued sends and receives.
Implementations
impl<'ctx> CompletionQueue<'ctx>
[src]
pub fn poll<'c>(
&self,
completions: &'c mut [ibv_wc]
) -> Result<&'c mut [ibv_wc], ()>
[src]
&self,
completions: &'c mut [ibv_wc]
) -> Result<&'c mut [ibv_wc], ()>
Poll for (possibly multiple) work completions.
A Work Completion indicates that a Work Request in a Work Queue, and all of the outstanding unsignaled Work Requests that posted to that Work Queue, associated with this CQ have completed. Any Receive Requests, signaled Send Requests and Send Requests that ended with an error will generate Work Completions.
When a Work Request ends, a Work Completion is added to the tail of the CQ that this Work
Queue is associated with. poll
checks if Work Completions are present in a CQ, and pop
them from the head of the CQ in the order they entered it (FIFO) into completions
. After
a Work Completion was popped from a CQ, it cannot be returned to it. poll
returns the
subset of completions
that successfully completed. If the returned slice has fewer
elements than the provided completions
slice, the CQ was emptied.
Not all attributes of the completed ibv_wc
’s are always valid. If the completion status
is not IBV_WC_SUCCESS
, only the following attributes are valid: wr_id
, status
,
qp_num
, and vendor_err
.
Note that poll
does not block or cause a context switch. This is why RDMA technologies
can achieve very low latency (below 1 µs).
Trait Implementations
impl<'a> Drop for CompletionQueue<'a>
[src]
impl<'a> Send for CompletionQueue<'a>
[src]
impl<'a> Sync for CompletionQueue<'a>
[src]
Auto Trait Implementations
impl<'ctx> RefUnwindSafe for CompletionQueue<'ctx>
impl<'ctx> Unpin for CompletionQueue<'ctx>
impl<'ctx> UnwindSafe for CompletionQueue<'ctx>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,