]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - contrib/ofed/libibverbs/man/ibv_modify_xrc_rcv_qp.3
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / contrib / ofed / libibverbs / man / ibv_modify_xrc_rcv_qp.3
1 .\" -*- nroff -*-
2 .\"
3 .TH IBV_MODIFY_XRC_RCV_QP 3 2008-02-10 libibverbs "Libibverbs Programmer's Manual"
4 .SH "NAME"
5 ibv_modify_xrc_rcv_qp \- modify the attributes of an XRC receive queue pair (QP)
6 .SH "SYNOPSIS"
7 .nf
8 .B #include <infiniband/verbs.h>
9 .sp
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" );
12 .fi
13 .SH "DESCRIPTION"
14 .B ibv_modify_qp()
15 modifies the attributes of an XRC receive QP with the number
16 .I xrc_qp_num
17 which is associated with the XRC domain
18 .I xrc_domain
19 with the attributes in
20 .I attr
21 according to the mask
22 .I attr_mask
23 and move the QP state through the following transitions: Reset -> Init -> RTR.
24 .I attr_mask
25 should indicate all of the attributes which will be used in this QP transition and the following masks (at least) should be set:
26 .PP
27 .nf
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
35 .fi
36 .PP
37 The user can add optional attributes as well.
38 .PP
39 The argument \fIattr\fR is an ibv_qp_attr struct, as defined in <infiniband/verbs.h>.
40 .PP
41 .nf
42 struct ibv_qp_attr {
43 .in +8
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) */
69 .in -8
70 };
71 .fi
72 .PP
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.
77 .PP
78 The argument
79 .I attr_mask
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:
82 .PP
83 .TP
84 .B IBV_QP_STATE \fR Modify qp_state
85 .TP
86 .B IBV_QP_CUR_STATE \fR Set cur_qp_state
87 .TP
88 .B IBV_QP_EN_SQD_ASYNC_NOTIFY \fR Set en_sqd_async_notify
89 .TP
90 .B IBV_QP_ACCESS_FLAGS \fR Set qp_access_flags
91 .TP
92 .B IBV_QP_PKEY_INDEX \fR Set pkey_index
93 .TP
94 .B IBV_QP_PORT \fR Set port_num
95 .TP
96 .B IBV_QP_QKEY \fR Set qkey
97 .TP
98 .B IBV_QP_AV \fR Set ah_attr
99 .TP
100 .B IBV_QP_PATH_MTU \fR Set path_mtu
101 .TP
102 .B IBV_QP_TIMEOUT \fR Set timeout
103 .TP
104 .B IBV_QP_RETRY_CNT \fR Set retry_cnt
105 .TP
106 .B IBV_QP_RNR_RETRY \fR Set rnr_retry
107 .TP
108 .B IBV_QP_RQ_PSN \fR Set rq_psn
109 .TP
110 .B IBV_QP_MAX_QP_RD_ATOMIC \fR Set max_rd_atomic
111 .TP
112 .B IBV_QP_ALT_PATH \fR Set the alternative path via: alt_ah_attr, alt_pkey_index, alt_port_num, alt_timeout
113 .TP
114 .B IBV_QP_MIN_RNR_TIMER \fR Set min_rnr_timer
115 .TP
116 .B IBV_QP_SQ_PSN \fR Set sq_psn
117 .TP
118 .B IBV_QP_MAX_DEST_RD_ATOMIC \fR Set max_dest_rd_atomic
119 .TP
120 .B IBV_QP_PATH_MIG_STATE \fR Set path_mig_state
121 .TP
122 .B IBV_QP_CAP \fR Set cap
123 .TP
124 .B IBV_QP_DEST_QPN \fR Set dest_qp_num
125 .SH "RETURN VALUE"
126 .B ibv_modify_xrc_rcv_qp()
127 returns 0 on success, or the value of errno on failure (which indicates the failure reason).
128 .SH "NOTES"
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).
131 .PP
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.
135 .SH "SEE ALSO"
136 .BR ibv_open_xrc_domain (3),
137 .BR ibv_create_xrc_rcv_qp (3),
138 .BR ibv_query_xrc_rcv_qp (3)
139 .SH "AUTHORS"
140 .TP
141 Dotan Barak <dotanb@mellanox.co.il>