Struct ibverbs::PreparedQueuePair[][src]

pub struct PreparedQueuePair<'res> { /* fields omitted */ }

An allocated but uninitialized QueuePair.

Specifically, this QueuePair has been allocated with ibv_create_qp, but has not yet been initialized with calls to ibv_modify_qp.

To complete the construction of the QueuePair, you will need to obtain the QueuePairEndpoint of the remote end (by using PreparedQueuePair::endpoint), and then call PreparedQueuePair::handshake on both sides with the other side’s QueuePairEndpoint:

// on host 1
let pqp: PreparedQueuePair = ...;
let host1end = pqp.endpoint();
host2.send(host1end);
let host2end = host2.recv();
let qp = pqp.handshake(host2end);

// on host 2
let pqp: PreparedQueuePair = ...;
let host2end = pqp.endpoint();
host1.send(host2end);
let host1end = host1.recv();
let qp = pqp.handshake(host1end);

Implementations

impl<'res> PreparedQueuePair<'res>[src]

pub fn endpoint(&self) -> QueuePairEndpoint[src]

Get the network endpoint for this QueuePair.

This endpoint will need to be communicated to the QueuePair on the remote end.

pub fn handshake(self, remote: QueuePairEndpoint) -> Result<QueuePair<'res>>[src]

Set up the QueuePair such that it is ready to exchange packets with a remote QueuePair.

Internally, this uses ibv_modify_qp to mark the QueuePair as initialized (IBV_QPS_INIT), ready to receive (IBV_QPS_RTR), and ready to send (IBV_QPS_RTS). Further discussion of the protocol can be found on RDMAmojo.

The handshake also sets the following parameters, which are currently not configurable:

Examples

port_num = PORT_NUM;
pkey_index = 0;
rq_psn = 0;
sq_psn = 0;

max_dest_rd_atomic = 1;
max_rd_atomic = 1;

ah_attr.sl = 0;
ah_attr.is_global = 1;
ah_attr.src_path_bits = 0;
ah_attr.grh.hop_limit = 0xff;

Errors

  • EINVAL: Invalid value provided in attr or in attr_mask.
  • ENOMEM: Not enough resources to complete this operation.

Auto Trait Implementations

impl<'res> RefUnwindSafe for PreparedQueuePair<'res>

impl<'res> !Send for PreparedQueuePair<'res>

impl<'res> !Sync for PreparedQueuePair<'res>

impl<'res> Unpin for PreparedQueuePair<'res>

impl<'res> UnwindSafe for PreparedQueuePair<'res>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.