Struct ibverbs::ProtectionDomain [] [src]

pub struct ProtectionDomain<'a> { /* fields omitted */ }

A protection domain for a device's context.

Methods

impl<'a> ProtectionDomain<'a>
[src]

Creates a queue pair builder associated with this protection domain.

send and recv are the device Context to associate with the send and receive queues respectively. send and recv may refer to the same Context.

qp_type indicates the requested Transport Service Type of this QP:

  • IBV_QPT_RC: Reliable Connection
  • IBV_QPT_UC: Unreliable Connection
  • IBV_QPT_UD: Unreliable Datagram

Allocates and registers a Memory Region (MR) associated with this ProtectionDomain.

This process allows the RDMA device to read and write data to the allocated memory. Only registered memory can be sent from and received to by QueuePairs. Performing this registration takes some time, so performing memory registration isn't recommended in the data path, when fast response is required.

Every successful registration will result with a MR which has unique (within a specific RDMA device) lkey and rkey values. These keys must be communicated to the other end's QueuePair for direct memory access.

The maximum size of the block that can be registered is limited to device_attr.max_mr_size. There isn't any way to know what is the total size of memory that can be registered for a specific device.

allocate currently sets the following permissions for each new MemoryRegion:

  • IBV_ACCESS_LOCAL_WRITE: Enables Local Write Access
  • IBV_ACCESS_REMOTE_WRITE: Enables Remote Write Access
  • IBV_ACCESS_REMOTE_READ: Enables Remote Read Access
  • IBV_ACCESS_REMOTE_ATOMIC: Enables Remote Atomic Operation Access (if supported)

Local read access is always enabled for the MR.

Panics

Panics if the size of the memory region zero bytes, which can occur either if n is 0, or if mem::size_of::<T>() is 0.

Errors

  • EINVAL: Invalid access value.
  • ENOMEM: Not enough resources (either in operating system or in RDMA device) to complete this operation.

Trait Implementations

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

impl<'a> Send for ProtectionDomain<'a>
[src]

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

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