Struct ibverbs::CompletionQueue [] [src]

pub struct CompletionQueue<'ctx> { /* fields omitted */ }

A completion queue that allows subscribing to the completion of queued sends and receives.

Methods

impl<'ctx> CompletionQueue<'ctx>
[src]

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> Send for CompletionQueue<'a>
[src]

impl<'a> Sync for CompletionQueue<'a>
[src]

impl<'a> Drop for CompletionQueue<'a>
[src]

A method called when the value goes out of scope. Read more