ib_user_cm.h
001:
002:
003:
004:
005:
006:
007:
008:
009:
010:
011:
012:
013:
014:
015:
016:
017:
018:
019:
020:
021:
022:
023:
024:
025:
026:
027:
028:
029:
030:
031:
032:
033:
034: #ifndef IB_USER_CM_H
035: #define IB_USER_CM_H
036:
037: #include <linux/types.h>
038: #include <rdma/ib_user_sa.h>
039:
040: #define IB_USER_CM_ABI_VERSION 5
041:
042: enum {
043: IB_USER_CM_CMD_CREATE_ID,
044: IB_USER_CM_CMD_DESTROY_ID,
045: IB_USER_CM_CMD_ATTR_ID,
046:
047: IB_USER_CM_CMD_LISTEN,
048: IB_USER_CM_CMD_NOTIFY,
049:
050: IB_USER_CM_CMD_SEND_REQ,
051: IB_USER_CM_CMD_SEND_REP,
052: IB_USER_CM_CMD_SEND_RTU,
053: IB_USER_CM_CMD_SEND_DREQ,
054: IB_USER_CM_CMD_SEND_DREP,
055: IB_USER_CM_CMD_SEND_REJ,
056: IB_USER_CM_CMD_SEND_MRA,
057: IB_USER_CM_CMD_SEND_LAP,
058: IB_USER_CM_CMD_SEND_APR,
059: IB_USER_CM_CMD_SEND_SIDR_REQ,
060: IB_USER_CM_CMD_SEND_SIDR_REP,
061:
062: IB_USER_CM_CMD_EVENT,
063: IB_USER_CM_CMD_INIT_QP_ATTR,
064: };
065:
066:
067:
068: struct ib_ucm_cmd_hdr {
069: __u32 cmd;
070: __u16 in;
071: __u16 out;
072: };
073:
074: struct ib_ucm_create_id {
075: __u64 uid;
076: __u64 response;
077: };
078:
079: struct ib_ucm_create_id_resp {
080: __u32 id;
081: };
082:
083: struct ib_ucm_destroy_id {
084: __u64 response;
085: __u32 id;
086: __u32 reserved;
087: };
088:
089: struct ib_ucm_destroy_id_resp {
090: __u32 events_reported;
091: };
092:
093: struct ib_ucm_attr_id {
094: __u64 response;
095: __u32 id;
096: __u32 reserved;
097: };
098:
099: struct ib_ucm_attr_id_resp {
100: __be64 service_id;
101: __be64 service_mask;
102: __be32 local_id;
103: __be32 remote_id;
104: };
105:
106: struct ib_ucm_init_qp_attr {
107: __u64 response;
108: __u32 id;
109: __u32 qp_state;
110: };
111:
112: struct ib_ucm_listen {
113: __be64 service_id;
114: __be64 service_mask;
115: __u32 id;
116: __u32 reserved;
117: };
118:
119: struct ib_ucm_notify {
120: __u32 id;
121: __u32 event;
122: };
123:
124: struct ib_ucm_private_data {
125: __u64 data;
126: __u32 id;
127: __u8 len;
128: __u8 reserved[3];
129: };
130:
131: struct ib_ucm_req {
132: __u32 id;
133: __u32 qpn;
134: __u32 qp_type;
135: __u32 psn;
136: __be64 sid;
137: __u64 data;
138: __u64 primary_path;
139: __u64 alternate_path;
140: __u8 len;
141: __u8 peer_to_peer;
142: __u8 responder_resources;
143: __u8 initiator_depth;
144: __u8 remote_cm_response_timeout;
145: __u8 flow_control;
146: __u8 local_cm_response_timeout;
147: __u8 retry_count;
148: __u8 rnr_retry_count;
149: __u8 max_cm_retries;
150: __u8 srq;
151: __u8 reserved[5];
152: };
153:
154: struct ib_ucm_rep {
155: __u64 uid;
156: __u64 data;
157: __u32 id;
158: __u32 qpn;
159: __u32 psn;
160: __u8 len;
161: __u8 responder_resources;
162: __u8 initiator_depth;
163: __u8 target_ack_delay;
164: __u8 failover_accepted;
165: __u8 flow_control;
166: __u8 rnr_retry_count;
167: __u8 srq;
168: __u8 reserved[4];
169: };
170:
171: struct ib_ucm_info {
172: __u32 id;
173: __u32 status;
174: __u64 info;
175: __u64 data;
176: __u8 info_len;
177: __u8 data_len;
178: __u8 reserved[6];
179: };
180:
181: struct ib_ucm_mra {
182: __u64 data;
183: __u32 id;
184: __u8 len;
185: __u8 timeout;
186: __u8 reserved[2];
187: };
188:
189: struct ib_ucm_lap {
190: __u64 path;
191: __u64 data;
192: __u32 id;
193: __u8 len;
194: __u8 reserved[3];
195: };
196:
197: struct ib_ucm_sidr_req {
198: __u32 id;
199: __u32 timeout;
200: __be64 sid;
201: __u64 data;
202: __u64 path;
203: __u16 reserved_pkey;
204: __u8 len;
205: __u8 max_cm_retries;
206: __u8 reserved[4];
207: };
208:
209: struct ib_ucm_sidr_rep {
210: __u32 id;
211: __u32 qpn;
212: __u32 qkey;
213: __u32 status;
214: __u64 info;
215: __u64 data;
216: __u8 info_len;
217: __u8 data_len;
218: __u8 reserved[6];
219: };
220:
221:
222:
223: struct ib_ucm_event_get {
224: __u64 response;
225: __u64 data;
226: __u64 info;
227: __u8 data_len;
228: __u8 info_len;
229: __u8 reserved[6];
230: };
231:
232: struct ib_ucm_req_event_resp {
233: struct ib_user_path_rec primary_path;
234: struct ib_user_path_rec alternate_path;
235: __be64 remote_ca_guid;
236: __u32 remote_qkey;
237: __u32 remote_qpn;
238: __u32 qp_type;
239: __u32 starting_psn;
240: __u8 responder_resources;
241: __u8 initiator_depth;
242: __u8 local_cm_response_timeout;
243: __u8 flow_control;
244: __u8 remote_cm_response_timeout;
245: __u8 retry_count;
246: __u8 rnr_retry_count;
247: __u8 srq;
248: __u8 port;
249: __u8 reserved[7];
250: };
251:
252: struct ib_ucm_rep_event_resp {
253: __be64 remote_ca_guid;
254: __u32 remote_qkey;
255: __u32 remote_qpn;
256: __u32 starting_psn;
257: __u8 responder_resources;
258: __u8 initiator_depth;
259: __u8 target_ack_delay;
260: __u8 failover_accepted;
261: __u8 flow_control;
262: __u8 rnr_retry_count;
263: __u8 srq;
264: __u8 reserved[5];
265: };
266:
267: struct ib_ucm_rej_event_resp {
268: __u32 reason;
269:
270: };
271:
272: struct ib_ucm_mra_event_resp {
273: __u8 timeout;
274: __u8 reserved[3];
275: };
276:
277: struct ib_ucm_lap_event_resp {
278: struct ib_user_path_rec path;
279: };
280:
281: struct ib_ucm_apr_event_resp {
282: __u32 status;
283:
284: };
285:
286: struct ib_ucm_sidr_req_event_resp {
287: __u16 pkey;
288: __u8 port;
289: __u8 reserved;
290: };
291:
292: struct ib_ucm_sidr_rep_event_resp {
293: __u32 status;
294: __u32 qkey;
295: __u32 qpn;
296:
297: };
298:
299: #define IB_UCM_PRES_DATA 0x01
300: #define IB_UCM_PRES_INFO 0x02
301: #define IB_UCM_PRES_PRIMARY 0x04
302: #define IB_UCM_PRES_ALTERNATE 0x08
303:
304: struct ib_ucm_event_resp {
305: __u64 uid;
306: __u32 id;
307: __u32 event;
308: __u32 present;
309: __u32 reserved;
310: union {
311: struct ib_ucm_req_event_resp req_resp;
312: struct ib_ucm_rep_event_resp rep_resp;
313: struct ib_ucm_rej_event_resp rej_resp;
314: struct ib_ucm_mra_event_resp mra_resp;
315: struct ib_ucm_lap_event_resp lap_resp;
316: struct ib_ucm_apr_event_resp apr_resp;
317:
318: struct ib_ucm_sidr_req_event_resp sidr_req_resp;
319: struct ib_ucm_sidr_rep_event_resp sidr_rep_resp;
320:
321: __u32 send_status;
322: } u;
323: };
324:
325: #endif
326:
© Andrew Scott 2006 -
2025,
All Rights Reserved