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:

This example is not tested
// 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);

Methods

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

Get the network endpoint for this QueuePair.

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

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> !Send for PreparedQueuePair<'res>

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