3 .TH IBV_MODIFY_XRC_RCV_QP 3 2008-02-10 libibverbs "Libibverbs Programmer's Manual"
5 ibv_modify_xrc_rcv_qp \- modify the attributes of an XRC receive queue pair (QP)
8 .B #include <infiniband/verbs.h>
10 .BI "int ibv_modify_xrc_rcv_qp(struct ibv_xrc_domain " "*xrc_domain" ", uint32_t " "xrc_qp_num" ,
11 .BI " struct ibv_qp_attr " "*attr" ", int " "attr_mask" );
15 modifies the attributes of an XRC receive QP with the number
17 which is associated with the XRC domain
19 with the attributes in
23 and move the QP state through the following transitions: Reset -> Init -> RTR.
25 should indicate all of the attributes which will be used in this QP transition and the following masks (at least) should be set:
28 Next state Required attributes
29 \-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
30 Init \fB IBV_QP_STATE, IBV_QP_PKEY_INDEX, IBV_QP_PORT, \fR
31 \fB IBV_QP_ACCESS_FLAGS \fR
32 RTR \fB IBV_QP_STATE, IBV_QP_AV, IBV_QP_PATH_MTU, \fR
33 \fB IBV_QP_DEST_QPN, IBV_QP_RQ_PSN, \fR
34 \fB IBV_QP_MAX_DEST_RD_ATOMIC, IBV_QP_MIN_RNR_TIMER \fR
37 The user can add optional attributes as well.
39 The argument \fIattr\fR is an ibv_qp_attr struct, as defined in <infiniband/verbs.h>.
44 enum ibv_qp_state qp_state; /* Move the QP to this state */
45 enum ibv_qp_state cur_qp_state; /* Assume this is the current QP state */
46 enum ibv_mtu path_mtu; /* Path MTU (valid only for RC/UC QPs) */
47 enum ibv_mig_state path_mig_state; /* Path migration state (valid if HCA supports APM) */
48 uint32_t qkey; /* Q_Key for the QP (valid only for UD QPs) */
49 uint32_t rq_psn; /* PSN for receive queue (valid only for RC/UC QPs) */
50 uint32_t sq_psn; /* PSN for send queue (valid only for RC/UC QPs) */
51 uint32_t dest_qp_num; /* Destination QP number (valid only for RC/UC QPs) */
52 int qp_access_flags; /* Mask of enabled remote access operations (valid only for RC/UC QPs) */
53 struct ibv_qp_cap cap; /* QP capabilities (valid if HCA supports QP resizing) */
54 struct ibv_ah_attr ah_attr; /* Primary path address vector (valid only for RC/UC QPs) */
55 struct ibv_ah_attr alt_ah_attr; /* Alternate path address vector (valid only for RC/UC QPs) */
56 uint16_t pkey_index; /* Primary P_Key index */
57 uint16_t alt_pkey_index; /* Alternate P_Key index */
58 uint8_t en_sqd_async_notify; /* Enable SQD.drained async notification (Valid only if qp_state is SQD) */
59 uint8_t sq_draining; /* Is the QP draining? Irrelevant for ibv_modify_qp() */
60 uint8_t max_rd_atomic; /* Number of outstanding RDMA reads & atomic operations on the destination QP (valid only for RC QPs) */
61 uint8_t max_dest_rd_atomic; /* Number of responder resources for handling incoming RDMA reads & atomic operations (valid only for RC QPs) */
62 uint8_t min_rnr_timer; /* Minimum RNR NAK timer (valid only for RC QPs) */
63 uint8_t port_num; /* Primary port number */
64 uint8_t timeout; /* Local ack timeout for primary path (valid only for RC QPs) */
65 uint8_t retry_cnt; /* Retry count (valid only for RC QPs) */
66 uint8_t rnr_retry; /* RNR retry (valid only for RC QPs) */
67 uint8_t alt_port_num; /* Alternate port number */
68 uint8_t alt_timeout; /* Local ack timeout for alternate path (valid only for RC QPs) */
73 For details on struct ibv_qp_cap see the description of
74 .B ibv_create_qp()\fR.
75 For details on struct ibv_ah_attr see the description of
76 .B ibv_create_ah()\fR.
80 specifies the QP attributes to be modified.
81 The argument is either 0 or the bitwise OR of one or more of the following flags:
84 .B IBV_QP_STATE \fR Modify qp_state
86 .B IBV_QP_CUR_STATE \fR Set cur_qp_state
88 .B IBV_QP_EN_SQD_ASYNC_NOTIFY \fR Set en_sqd_async_notify
90 .B IBV_QP_ACCESS_FLAGS \fR Set qp_access_flags
92 .B IBV_QP_PKEY_INDEX \fR Set pkey_index
94 .B IBV_QP_PORT \fR Set port_num
96 .B IBV_QP_QKEY \fR Set qkey
98 .B IBV_QP_AV \fR Set ah_attr
100 .B IBV_QP_PATH_MTU \fR Set path_mtu
102 .B IBV_QP_TIMEOUT \fR Set timeout
104 .B IBV_QP_RETRY_CNT \fR Set retry_cnt
106 .B IBV_QP_RNR_RETRY \fR Set rnr_retry
108 .B IBV_QP_RQ_PSN \fR Set rq_psn
110 .B IBV_QP_MAX_QP_RD_ATOMIC \fR Set max_rd_atomic
112 .B IBV_QP_ALT_PATH \fR Set the alternative path via: alt_ah_attr, alt_pkey_index, alt_port_num, alt_timeout
114 .B IBV_QP_MIN_RNR_TIMER \fR Set min_rnr_timer
116 .B IBV_QP_SQ_PSN \fR Set sq_psn
118 .B IBV_QP_MAX_DEST_RD_ATOMIC \fR Set max_dest_rd_atomic
120 .B IBV_QP_PATH_MIG_STATE \fR Set path_mig_state
122 .B IBV_QP_CAP \fR Set cap
124 .B IBV_QP_DEST_QPN \fR Set dest_qp_num
126 .B ibv_modify_xrc_rcv_qp()
127 returns 0 on success, or the value of errno on failure (which indicates the failure reason).
129 If any of the modify attributes or the modify mask are invalid, none
130 of the attributes will be modified (including the QP state).
132 Not all devices support alternate paths. To check if a device supports it, check if the
133 .B IBV_DEVICE_AUTO_PATH_MIG
134 bit is set in the device capabilities flags.
136 .BR ibv_open_xrc_domain (3),
137 .BR ibv_create_xrc_rcv_qp (3),
138 .BR ibv_query_xrc_rcv_qp (3)
141 Dotan Barak <dotanb@mellanox.co.il>