Struct ibverbs::Context[][src]

pub struct Context { /* fields omitted */ }

An RDMA context bound to a device.

Methods

impl Context
[src]

Create a completion queue (CQ).

When an outstanding Work Request, within a Send or Receive Queue, is completed, a Work Completion is being added to the CQ of that Work Queue. This Work Completion indicates that the outstanding Work Request has been completed (and no longer considered outstanding) and provides details on it (status, direction, opcode, etc.).

A single CQ can be shared for sending, receiving, and sharing across multiple QPs. The Work Completion holds the information to specify the QP number and the Queue (Send or Receive) that it came from.

min_cq_entries defines the minimum size of the CQ. The actual created size can be equal or higher than this value. id is an opaque identifier that is echoed by CompletionQueue::poll.

Errors

  • EINVAL: Invalid min_cq_entries (must be 1 <= cqe <= dev_cap.max_cqe).
  • ENOMEM: Not enough resources to complete this operation.

Allocate a protection domain (PDs) for the device's context.

The created PD will be used primarily to create QueuePairs and MemoryRegions.

A protection domain is a means of protection, and helps you create a group of object that can work together. If several objects were created using PD1, and others were created using PD2, working with objects from group1 together with objects from group2 will not work.

Trait Implementations

impl Sync for Context
[src]

impl Send for Context
[src]

impl Drop for Context
[src]

Executes the destructor for this type. Read more