Struct ibverbs::QueuePairBuilder[][src]

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

An unconfigured QueuePair.

A QueuePairBuilder is used to configure a QueuePair before it is allocated and initialized. To construct one, use ProtectionDomain::create_qp. See also RDMAmojo for many more details.

Implementations

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

pub fn set_access(&mut self, access: ibv_access_flags) -> &mut Self[src]

Set the access flags for the new QueuePair.

Defaults to IBV_ACCESS_LOCAL_WRITE.

pub fn allow_remote_rw(&mut self) -> &mut Self[src]

Set the access flags of the new QueuePair such that it allows remote reads and writes.

pub fn set_min_rnr_timer(&mut self, timer: u8) -> &mut Self[src]

Sets the minimum RNR NAK Timer Field Value for the new QueuePair.

Defaults to 16 (2.56 ms delay). Relevant only for RC QPs.

When an incoming message to this QP should consume a Work Request from the Receive Queue, but no Work Request is outstanding on that Queue, the QP will send an RNR NAK packet to the initiator. It does not affect RNR NAKs sent for other reasons. The value must be one of the following values:

  • 0 - 655.36 ms delay
  • 1 - 0.01 ms delay
  • 2 - 0.02 ms delay
  • 3 - 0.03 ms delay
  • 4 - 0.04 ms delay
  • 5 - 0.06 ms delay
  • 6 - 0.08 ms delay
  • 7 - 0.12 ms delay
  • 8 - 0.16 ms delay
  • 9 - 0.24 ms delay
  • 10 - 0.32 ms delay
  • 11 - 0.48 ms delay
  • 12 - 0.64 ms delay
  • 13 - 0.96 ms delay
  • 14 - 1.28 ms delay
  • 15 - 1.92 ms delay
  • 16 - 2.56 ms delay
  • 17 - 3.84 ms delay
  • 18 - 5.12 ms delay
  • 19 - 7.68 ms delay
  • 20 - 10.24 ms delay
  • 21 - 15.36 ms delay
  • 22 - 20.48 ms delay
  • 23 - 30.72 ms delay
  • 24 - 40.96 ms delay
  • 25 - 61.44 ms delay
  • 26 - 81.92 ms delay
  • 27 - 122.88 ms delay
  • 28 - 163.84 ms delay
  • 29 - 245.76 ms delay
  • 30 - 327.68 ms delay
  • 31 - 491.52 ms delay

pub fn set_timeout(&mut self, timeout: u8) -> &mut Self[src]

Sets the minimum timeout that the new QueuePair waits for ACK/NACK from remote QP before retransmitting the packet.

Defaults to 4 (65.536µs). Relevant only to RC QPs.

The value zero is special value that waits an infinite time for the ACK/NACK (useful for debugging). This means that if any packet in a message is being lost and no ACK or NACK is being sent, no retry will ever occur and the QP will just stop sending data.

For any other value of timeout, the time calculation is 4.096*2^timeoutµs, giving:

  • 0 - infinite
  • 1 - 8.192 µs
  • 2 - 16.384 µs
  • 3 - 32.768 µs
  • 4 - 65.536 µs
  • 5 - 131.072 µs
  • 6 - 262.144 µs
  • 7 - 524.288 µs
  • 8 - 1.048 ms
  • 9 - 2.097 ms
  • 10 - 4.194 ms
  • 11 - 8.388 ms
  • 12 - 16.777 ms
  • 13 - 33.554 ms
  • 14 - 67.108 ms
  • 15 - 134.217 ms
  • 16 - 268.435 ms
  • 17 - 536.870 ms
  • 18 - 1.07 s
  • 19 - 2.14 s
  • 20 - 4.29 s
  • 21 - 8.58 s
  • 22 - 17.1 s
  • 23 - 34.3 s
  • 24 - 68.7 s
  • 25 - 137 s
  • 26 - 275 s
  • 27 - 550 s
  • 28 - 1100 s
  • 29 - 2200 s
  • 30 - 4400 s
  • 31 - 8800 s

pub fn set_retry_count(&mut self, count: u8) -> &mut Self[src]

Sets the total number of times that the new QueuePair will try to resend the packets before reporting an error because the remote side doesn’t answer in the primary path.

This 3 bit value defaults to 6.

Panics

Panics if a count higher than 7 is given.

pub fn set_rnr_retry(&mut self, n: u8) -> &mut Self[src]

Sets the total number of times that the new QueuePair will try to resend the packets when an RNR NACK was sent by the remote QP before reporting an error.

This 3 bit value defaults to 6. The value 7 is special and specify to retry sending the message indefinitely when a RNR Nack is being sent by remote side.

Panics

Panics if a limit higher than 7 is given.

pub fn set_context(&mut self, ctx: isize) -> &mut Self[src]

Set the opaque context value for the new QueuePair.

Defaults to 0.

pub fn build(&self) -> Result<PreparedQueuePair<'res>>[src]

Create a new QueuePair from this builder template.

The returned QueuePair is associated with the builder’s ProtectionDomain.

This method will fail if asked to create QP of a type other than IBV_QPT_RC or IBV_QPT_UD associated with an SRQ.

Errors

  • EINVAL: Invalid ProtectionDomain, sending or receiving Context, or invalid value provided in max_send_wr, max_recv_wr, or in max_inline_data.
  • ENOMEM: Not enough resources to complete this operation.
  • ENOSYS: QP with this Transport Service Type isn’t supported by this RDMA device.
  • EPERM: Not enough permissions to create a QP with this Transport Service Type.

Auto Trait Implementations

impl<'res> RefUnwindSafe for QueuePairBuilder<'res>

impl<'res> Send for QueuePairBuilder<'res>

impl<'res> Sync for QueuePairBuilder<'res>

impl<'res> Unpin for QueuePairBuilder<'res>

impl<'res> UnwindSafe for QueuePairBuilder<'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.