blob: 100abbbd6e6e78b8bb4a0eb01f2102b74f5b6996 [file] [log] [blame]
Roland Dreier8a96b3f2005-07-07 17:57:12 -07001/*
2 * Copyright (c) 2005 Topspin Communications. All rights reserved.
Roland Dreier33b9b3e2006-01-30 14:29:21 -08003 * Copyright (c) 2005, 2006 Cisco Systems. All rights reserved.
Roland Dreier91ecd4a2005-10-14 15:21:44 -07004 * Copyright (c) 2005 PathScale, Inc. All rights reserved.
Dotan Barak8bdb0e82006-02-13 16:31:57 -08005 * Copyright (c) 2006 Mellanox Technologies. All rights reserved.
Roland Dreier8a96b3f2005-07-07 17:57:12 -07006 *
7 * This software is available to you under a choice of one of two
8 * licenses. You may choose to be licensed under the terms of the GNU
9 * General Public License (GPL) Version 2, available from the file
10 * COPYING in the main directory of this source tree, or the
11 * OpenIB.org BSD license below:
12 *
13 * Redistribution and use in source and binary forms, with or
14 * without modification, are permitted provided that the following
15 * conditions are met:
16 *
17 * - Redistributions of source code must retain the above
18 * copyright notice, this list of conditions and the following
19 * disclaimer.
20 *
21 * - Redistributions in binary form must reproduce the above
22 * copyright notice, this list of conditions and the following
23 * disclaimer in the documentation and/or other materials
24 * provided with the distribution.
25 *
26 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
27 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
28 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
29 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
30 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
31 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
32 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
33 * SOFTWARE.
Roland Dreier8a96b3f2005-07-07 17:57:12 -070034 */
35
36#ifndef IB_USER_VERBS_H
37#define IB_USER_VERBS_H
38
39#include <linux/types.h>
40
41/*
42 * Increment this value if any changes that break userspace ABI
43 * compatibility are made.
44 */
Dotan Barakea88fd12006-02-23 12:36:18 -080045#define IB_USER_VERBS_ABI_VERSION 6
Roland Dreier8a96b3f2005-07-07 17:57:12 -070046
47enum {
Roland Dreier8a96b3f2005-07-07 17:57:12 -070048 IB_USER_VERBS_CMD_GET_CONTEXT,
49 IB_USER_VERBS_CMD_QUERY_DEVICE,
50 IB_USER_VERBS_CMD_QUERY_PORT,
Roland Dreier8a96b3f2005-07-07 17:57:12 -070051 IB_USER_VERBS_CMD_ALLOC_PD,
52 IB_USER_VERBS_CMD_DEALLOC_PD,
53 IB_USER_VERBS_CMD_CREATE_AH,
54 IB_USER_VERBS_CMD_MODIFY_AH,
55 IB_USER_VERBS_CMD_QUERY_AH,
56 IB_USER_VERBS_CMD_DESTROY_AH,
57 IB_USER_VERBS_CMD_REG_MR,
58 IB_USER_VERBS_CMD_REG_SMR,
59 IB_USER_VERBS_CMD_REREG_MR,
60 IB_USER_VERBS_CMD_QUERY_MR,
61 IB_USER_VERBS_CMD_DEREG_MR,
62 IB_USER_VERBS_CMD_ALLOC_MW,
63 IB_USER_VERBS_CMD_BIND_MW,
64 IB_USER_VERBS_CMD_DEALLOC_MW,
Roland Dreier6b73597e2005-09-26 13:53:25 -070065 IB_USER_VERBS_CMD_CREATE_COMP_CHANNEL,
Roland Dreier8a96b3f2005-07-07 17:57:12 -070066 IB_USER_VERBS_CMD_CREATE_CQ,
67 IB_USER_VERBS_CMD_RESIZE_CQ,
68 IB_USER_VERBS_CMD_DESTROY_CQ,
69 IB_USER_VERBS_CMD_POLL_CQ,
70 IB_USER_VERBS_CMD_PEEK_CQ,
71 IB_USER_VERBS_CMD_REQ_NOTIFY_CQ,
72 IB_USER_VERBS_CMD_CREATE_QP,
73 IB_USER_VERBS_CMD_QUERY_QP,
74 IB_USER_VERBS_CMD_MODIFY_QP,
75 IB_USER_VERBS_CMD_DESTROY_QP,
76 IB_USER_VERBS_CMD_POST_SEND,
77 IB_USER_VERBS_CMD_POST_RECV,
78 IB_USER_VERBS_CMD_ATTACH_MCAST,
Roland Dreierf520ba52005-08-18 12:24:13 -070079 IB_USER_VERBS_CMD_DETACH_MCAST,
80 IB_USER_VERBS_CMD_CREATE_SRQ,
81 IB_USER_VERBS_CMD_MODIFY_SRQ,
82 IB_USER_VERBS_CMD_QUERY_SRQ,
83 IB_USER_VERBS_CMD_DESTROY_SRQ,
Sean Hefty53d0bd12011-05-24 08:33:46 -070084 IB_USER_VERBS_CMD_POST_SRQ_RECV,
85 IB_USER_VERBS_CMD_OPEN_XRCD,
Sean Hefty8541f8d2011-05-25 17:08:38 -070086 IB_USER_VERBS_CMD_CLOSE_XRCD,
87 IB_USER_VERBS_CMD_CREATE_XSRQ
Roland Dreier8a96b3f2005-07-07 17:57:12 -070088};
89
90/*
91 * Make sure that all structs defined in this file remain laid out so
92 * that they pack the same way on 32-bit and 64-bit architectures (to
93 * avoid incompatibility between 32-bit userspace and 64-bit kernels).
Roland Dreier91ecd4a2005-10-14 15:21:44 -070094 * Specifically:
95 * - Do not use pointer types -- pass pointers in __u64 instead.
96 * - Make sure that any structure larger than 4 bytes is padded to a
97 * multiple of 8 bytes. Otherwise the structure size will be
98 * different between 32-bit and 64-bit architectures.
Roland Dreier8a96b3f2005-07-07 17:57:12 -070099 */
100
101struct ib_uverbs_async_event_desc {
102 __u64 element;
103 __u32 event_type; /* enum ib_event_type */
104 __u32 reserved;
105};
106
107struct ib_uverbs_comp_event_desc {
108 __u64 cq_handle;
109};
110
111/*
112 * All commands from userspace should start with a __u32 command field
113 * followed by __u16 in_words and out_words fields (which give the
114 * length of the command block and response buffer if any in 32-bit
115 * words). The kernel driver will read these fields first and read
116 * the rest of the command struct based on these value.
117 */
118
119struct ib_uverbs_cmd_hdr {
120 __u32 command;
121 __u16 in_words;
122 __u16 out_words;
123};
124
Roland Dreier8a96b3f2005-07-07 17:57:12 -0700125struct ib_uverbs_get_context {
126 __u64 response;
Roland Dreier8a96b3f2005-07-07 17:57:12 -0700127 __u64 driver_data[0];
128};
129
130struct ib_uverbs_get_context_resp {
131 __u32 async_fd;
Roland Dreier6b73597e2005-09-26 13:53:25 -0700132 __u32 num_comp_vectors;
Roland Dreier8a96b3f2005-07-07 17:57:12 -0700133};
134
135struct ib_uverbs_query_device {
136 __u64 response;
137 __u64 driver_data[0];
138};
139
140struct ib_uverbs_query_device_resp {
141 __u64 fw_ver;
Sean Hefty97f52eb2005-08-13 21:05:57 -0700142 __be64 node_guid;
143 __be64 sys_image_guid;
Roland Dreier8a96b3f2005-07-07 17:57:12 -0700144 __u64 max_mr_size;
145 __u64 page_size_cap;
146 __u32 vendor_id;
147 __u32 vendor_part_id;
148 __u32 hw_ver;
149 __u32 max_qp;
150 __u32 max_qp_wr;
151 __u32 device_cap_flags;
152 __u32 max_sge;
153 __u32 max_sge_rd;
154 __u32 max_cq;
155 __u32 max_cqe;
156 __u32 max_mr;
157 __u32 max_pd;
158 __u32 max_qp_rd_atom;
159 __u32 max_ee_rd_atom;
160 __u32 max_res_rd_atom;
161 __u32 max_qp_init_rd_atom;
162 __u32 max_ee_init_rd_atom;
163 __u32 atomic_cap;
164 __u32 max_ee;
165 __u32 max_rdd;
166 __u32 max_mw;
167 __u32 max_raw_ipv6_qp;
168 __u32 max_raw_ethy_qp;
169 __u32 max_mcast_grp;
170 __u32 max_mcast_qp_attach;
171 __u32 max_total_mcast_qp_attach;
172 __u32 max_ah;
173 __u32 max_fmr;
174 __u32 max_map_per_fmr;
175 __u32 max_srq;
176 __u32 max_srq_wr;
177 __u32 max_srq_sge;
178 __u16 max_pkeys;
179 __u8 local_ca_ack_delay;
180 __u8 phys_port_cnt;
181 __u8 reserved[4];
182};
183
184struct ib_uverbs_query_port {
185 __u64 response;
186 __u8 port_num;
187 __u8 reserved[7];
188 __u64 driver_data[0];
189};
190
191struct ib_uverbs_query_port_resp {
192 __u32 port_cap_flags;
193 __u32 max_msg_sz;
194 __u32 bad_pkey_cntr;
195 __u32 qkey_viol_cntr;
196 __u32 gid_tbl_len;
197 __u16 pkey_tbl_len;
198 __u16 lid;
199 __u16 sm_lid;
200 __u8 state;
201 __u8 max_mtu;
202 __u8 active_mtu;
203 __u8 lmc;
204 __u8 max_vl_num;
205 __u8 sm_sl;
206 __u8 subnet_timeout;
207 __u8 init_type_reply;
208 __u8 active_width;
209 __u8 active_speed;
210 __u8 phys_state;
Eli Cohen2420b602010-10-18 14:45:20 -0700211 __u8 link_layer;
212 __u8 reserved[2];
Roland Dreier8a96b3f2005-07-07 17:57:12 -0700213};
214
Roland Dreier8a96b3f2005-07-07 17:57:12 -0700215struct ib_uverbs_alloc_pd {
216 __u64 response;
217 __u64 driver_data[0];
218};
219
220struct ib_uverbs_alloc_pd_resp {
221 __u32 pd_handle;
222};
223
224struct ib_uverbs_dealloc_pd {
225 __u32 pd_handle;
226};
227
Sean Hefty53d0bd12011-05-24 08:33:46 -0700228struct ib_uverbs_open_xrcd {
229 __u64 response;
230 __u32 fd;
231 __u32 oflags;
232 __u64 driver_data[0];
233};
234
235struct ib_uverbs_open_xrcd_resp {
236 __u32 xrcd_handle;
237};
238
239struct ib_uverbs_close_xrcd {
240 __u32 xrcd_handle;
241};
242
Roland Dreier8a96b3f2005-07-07 17:57:12 -0700243struct ib_uverbs_reg_mr {
244 __u64 response;
245 __u64 start;
246 __u64 length;
247 __u64 hca_va;
248 __u32 pd_handle;
249 __u32 access_flags;
250 __u64 driver_data[0];
251};
252
253struct ib_uverbs_reg_mr_resp {
254 __u32 mr_handle;
255 __u32 lkey;
256 __u32 rkey;
257};
258
259struct ib_uverbs_dereg_mr {
260 __u32 mr_handle;
261};
262
Roland Dreier6b73597e2005-09-26 13:53:25 -0700263struct ib_uverbs_create_comp_channel {
264 __u64 response;
265};
266
267struct ib_uverbs_create_comp_channel_resp {
268 __u32 fd;
269};
270
Roland Dreier8a96b3f2005-07-07 17:57:12 -0700271struct ib_uverbs_create_cq {
272 __u64 response;
273 __u64 user_handle;
274 __u32 cqe;
Roland Dreier6b73597e2005-09-26 13:53:25 -0700275 __u32 comp_vector;
276 __s32 comp_channel;
277 __u32 reserved;
Roland Dreier8a96b3f2005-07-07 17:57:12 -0700278 __u64 driver_data[0];
279};
280
281struct ib_uverbs_create_cq_resp {
282 __u32 cq_handle;
283 __u32 cqe;
284};
285
Roland Dreier33b9b3e2006-01-30 14:29:21 -0800286struct ib_uverbs_resize_cq {
287 __u64 response;
288 __u32 cq_handle;
289 __u32 cqe;
290 __u64 driver_data[0];
291};
292
293struct ib_uverbs_resize_cq_resp {
294 __u32 cqe;
Ralph Campbell64f817b2006-09-22 15:22:24 -0700295 __u32 reserved;
296 __u64 driver_data[0];
Roland Dreier33b9b3e2006-01-30 14:29:21 -0800297};
298
Roland Dreier91ecd4a2005-10-14 15:21:44 -0700299struct ib_uverbs_poll_cq {
300 __u64 response;
301 __u32 cq_handle;
302 __u32 ne;
303};
304
305struct ib_uverbs_wc {
306 __u64 wr_id;
307 __u32 status;
308 __u32 opcode;
309 __u32 vendor_err;
310 __u32 byte_len;
Steve Wise00f7ec32008-07-14 23:48:45 -0700311 union {
312 __u32 imm_data;
313 __u32 invalidate_rkey;
314 } ex;
Roland Dreier91ecd4a2005-10-14 15:21:44 -0700315 __u32 qp_num;
316 __u32 src_qp;
317 __u32 wc_flags;
318 __u16 pkey_index;
319 __u16 slid;
320 __u8 sl;
321 __u8 dlid_path_bits;
322 __u8 port_num;
323 __u8 reserved;
324};
325
326struct ib_uverbs_poll_cq_resp {
327 __u32 count;
328 __u32 reserved;
329 struct ib_uverbs_wc wc[0];
330};
331
332struct ib_uverbs_req_notify_cq {
333 __u32 cq_handle;
334 __u32 solicited_only;
335};
336
Roland Dreier8a96b3f2005-07-07 17:57:12 -0700337struct ib_uverbs_destroy_cq {
Roland Dreier63aaf642005-09-09 15:55:08 -0700338 __u64 response;
Roland Dreier8a96b3f2005-07-07 17:57:12 -0700339 __u32 cq_handle;
Roland Dreier63aaf642005-09-09 15:55:08 -0700340 __u32 reserved;
341};
342
343struct ib_uverbs_destroy_cq_resp {
344 __u32 comp_events_reported;
345 __u32 async_events_reported;
Roland Dreier8a96b3f2005-07-07 17:57:12 -0700346};
347
Sean Hefty6a9af2e2006-06-17 20:37:27 -0700348struct ib_uverbs_global_route {
349 __u8 dgid[16];
350 __u32 flow_label;
351 __u8 sgid_index;
352 __u8 hop_limit;
353 __u8 traffic_class;
354 __u8 reserved;
355};
356
357struct ib_uverbs_ah_attr {
358 struct ib_uverbs_global_route grh;
359 __u16 dlid;
360 __u8 sl;
361 __u8 src_path_bits;
362 __u8 static_rate;
363 __u8 is_global;
364 __u8 port_num;
365 __u8 reserved;
366};
367
368struct ib_uverbs_qp_attr {
369 __u32 qp_attr_mask;
370 __u32 qp_state;
371 __u32 cur_qp_state;
372 __u32 path_mtu;
373 __u32 path_mig_state;
374 __u32 qkey;
375 __u32 rq_psn;
376 __u32 sq_psn;
377 __u32 dest_qp_num;
378 __u32 qp_access_flags;
379
380 struct ib_uverbs_ah_attr ah_attr;
381 struct ib_uverbs_ah_attr alt_ah_attr;
382
383 /* ib_qp_cap */
384 __u32 max_send_wr;
385 __u32 max_recv_wr;
386 __u32 max_send_sge;
387 __u32 max_recv_sge;
388 __u32 max_inline_data;
389
390 __u16 pkey_index;
391 __u16 alt_pkey_index;
392 __u8 en_sqd_async_notify;
393 __u8 sq_draining;
394 __u8 max_rd_atomic;
395 __u8 max_dest_rd_atomic;
396 __u8 min_rnr_timer;
397 __u8 port_num;
398 __u8 timeout;
399 __u8 retry_cnt;
400 __u8 rnr_retry;
401 __u8 alt_port_num;
402 __u8 alt_timeout;
403 __u8 reserved[5];
404};
405
Roland Dreier8a96b3f2005-07-07 17:57:12 -0700406struct ib_uverbs_create_qp {
407 __u64 response;
408 __u64 user_handle;
409 __u32 pd_handle;
410 __u32 send_cq_handle;
411 __u32 recv_cq_handle;
412 __u32 srq_handle;
413 __u32 max_send_wr;
414 __u32 max_recv_wr;
415 __u32 max_send_sge;
416 __u32 max_recv_sge;
417 __u32 max_inline_data;
418 __u8 sq_sig_all;
419 __u8 qp_type;
420 __u8 is_srq;
421 __u8 reserved;
422 __u64 driver_data[0];
423};
424
425struct ib_uverbs_create_qp_resp {
426 __u32 qp_handle;
427 __u32 qpn;
Jack Morgenstein77369ed2005-11-09 11:26:07 -0800428 __u32 max_send_wr;
429 __u32 max_recv_wr;
430 __u32 max_send_sge;
431 __u32 max_recv_sge;
432 __u32 max_inline_data;
Roland Dreier4d9781c2006-02-16 09:26:19 -0800433 __u32 reserved;
Roland Dreier8a96b3f2005-07-07 17:57:12 -0700434};
435
436/*
437 * This struct needs to remain a multiple of 8 bytes to keep the
438 * alignment of the modify QP parameters.
439 */
440struct ib_uverbs_qp_dest {
441 __u8 dgid[16];
442 __u32 flow_label;
443 __u16 dlid;
444 __u16 reserved;
445 __u8 sgid_index;
446 __u8 hop_limit;
447 __u8 traffic_class;
448 __u8 sl;
449 __u8 src_path_bits;
450 __u8 static_rate;
451 __u8 is_global;
452 __u8 port_num;
453};
454
Dotan Barak7ccc9a22006-02-13 16:31:25 -0800455struct ib_uverbs_query_qp {
456 __u64 response;
457 __u32 qp_handle;
458 __u32 attr_mask;
459 __u64 driver_data[0];
460};
461
462struct ib_uverbs_query_qp_resp {
463 struct ib_uverbs_qp_dest dest;
464 struct ib_uverbs_qp_dest alt_dest;
465 __u32 max_send_wr;
466 __u32 max_recv_wr;
467 __u32 max_send_sge;
468 __u32 max_recv_sge;
469 __u32 max_inline_data;
470 __u32 qkey;
471 __u32 rq_psn;
472 __u32 sq_psn;
473 __u32 dest_qp_num;
474 __u32 qp_access_flags;
475 __u16 pkey_index;
476 __u16 alt_pkey_index;
477 __u8 qp_state;
478 __u8 cur_qp_state;
479 __u8 path_mtu;
480 __u8 path_mig_state;
Jack Morgenstein0b26c882006-10-25 12:54:20 +0200481 __u8 sq_draining;
Dotan Barak7ccc9a22006-02-13 16:31:25 -0800482 __u8 max_rd_atomic;
483 __u8 max_dest_rd_atomic;
484 __u8 min_rnr_timer;
485 __u8 port_num;
486 __u8 timeout;
487 __u8 retry_cnt;
488 __u8 rnr_retry;
489 __u8 alt_port_num;
490 __u8 alt_timeout;
491 __u8 sq_sig_all;
492 __u8 reserved[5];
493 __u64 driver_data[0];
494};
495
Roland Dreier8a96b3f2005-07-07 17:57:12 -0700496struct ib_uverbs_modify_qp {
497 struct ib_uverbs_qp_dest dest;
498 struct ib_uverbs_qp_dest alt_dest;
499 __u32 qp_handle;
500 __u32 attr_mask;
501 __u32 qkey;
502 __u32 rq_psn;
503 __u32 sq_psn;
504 __u32 dest_qp_num;
505 __u32 qp_access_flags;
506 __u16 pkey_index;
507 __u16 alt_pkey_index;
508 __u8 qp_state;
509 __u8 cur_qp_state;
510 __u8 path_mtu;
511 __u8 path_mig_state;
512 __u8 en_sqd_async_notify;
513 __u8 max_rd_atomic;
514 __u8 max_dest_rd_atomic;
515 __u8 min_rnr_timer;
516 __u8 port_num;
517 __u8 timeout;
518 __u8 retry_cnt;
519 __u8 rnr_retry;
520 __u8 alt_port_num;
521 __u8 alt_timeout;
522 __u8 reserved[2];
523 __u64 driver_data[0];
524};
525
526struct ib_uverbs_modify_qp_resp {
527};
528
529struct ib_uverbs_destroy_qp {
Roland Dreier63aaf642005-09-09 15:55:08 -0700530 __u64 response;
Roland Dreier8a96b3f2005-07-07 17:57:12 -0700531 __u32 qp_handle;
Roland Dreier63aaf642005-09-09 15:55:08 -0700532 __u32 reserved;
533};
534
535struct ib_uverbs_destroy_qp_resp {
536 __u32 events_reported;
Roland Dreier8a96b3f2005-07-07 17:57:12 -0700537};
538
Roland Dreier91ecd4a2005-10-14 15:21:44 -0700539/*
540 * The ib_uverbs_sge structure isn't used anywhere, since we assume
541 * the ib_sge structure is packed the same way on 32-bit and 64-bit
542 * architectures in both kernel and user space. It's just here to
543 * document the ABI.
544 */
545struct ib_uverbs_sge {
546 __u64 addr;
547 __u32 length;
548 __u32 lkey;
549};
550
551struct ib_uverbs_send_wr {
Roland Dreiera74cd4a2006-02-13 16:30:49 -0800552 __u64 wr_id;
Roland Dreier91ecd4a2005-10-14 15:21:44 -0700553 __u32 num_sge;
554 __u32 opcode;
555 __u32 send_flags;
Roland Dreier0f39cf32008-04-16 21:09:32 -0700556 union {
557 __u32 imm_data;
558 __u32 invalidate_rkey;
559 } ex;
Roland Dreier91ecd4a2005-10-14 15:21:44 -0700560 union {
561 struct {
562 __u64 remote_addr;
563 __u32 rkey;
564 __u32 reserved;
565 } rdma;
566 struct {
567 __u64 remote_addr;
568 __u64 compare_add;
569 __u64 swap;
570 __u32 rkey;
571 __u32 reserved;
572 } atomic;
573 struct {
574 __u32 ah;
575 __u32 remote_qpn;
576 __u32 remote_qkey;
577 __u32 reserved;
578 } ud;
579 } wr;
580};
581
582struct ib_uverbs_post_send {
583 __u64 response;
584 __u32 qp_handle;
585 __u32 wr_count;
586 __u32 sge_count;
587 __u32 wqe_size;
588 struct ib_uverbs_send_wr send_wr[0];
589};
590
591struct ib_uverbs_post_send_resp {
592 __u32 bad_wr;
593};
594
595struct ib_uverbs_recv_wr {
596 __u64 wr_id;
597 __u32 num_sge;
598 __u32 reserved;
599};
600
601struct ib_uverbs_post_recv {
602 __u64 response;
603 __u32 qp_handle;
604 __u32 wr_count;
605 __u32 sge_count;
606 __u32 wqe_size;
607 struct ib_uverbs_recv_wr recv_wr[0];
608};
609
610struct ib_uverbs_post_recv_resp {
611 __u32 bad_wr;
612};
613
614struct ib_uverbs_post_srq_recv {
615 __u64 response;
616 __u32 srq_handle;
617 __u32 wr_count;
618 __u32 sge_count;
619 __u32 wqe_size;
620 struct ib_uverbs_recv_wr recv[0];
621};
622
623struct ib_uverbs_post_srq_recv_resp {
624 __u32 bad_wr;
625};
626
Roland Dreier91ecd4a2005-10-14 15:21:44 -0700627struct ib_uverbs_create_ah {
628 __u64 response;
629 __u64 user_handle;
630 __u32 pd_handle;
631 __u32 reserved;
632 struct ib_uverbs_ah_attr attr;
633};
634
635struct ib_uverbs_create_ah_resp {
636 __u32 ah_handle;
637};
638
639struct ib_uverbs_destroy_ah {
640 __u32 ah_handle;
641};
642
Roland Dreier8a96b3f2005-07-07 17:57:12 -0700643struct ib_uverbs_attach_mcast {
644 __u8 gid[16];
645 __u32 qp_handle;
646 __u16 mlid;
647 __u16 reserved;
648 __u64 driver_data[0];
649};
650
651struct ib_uverbs_detach_mcast {
652 __u8 gid[16];
653 __u32 qp_handle;
654 __u16 mlid;
655 __u16 reserved;
656 __u64 driver_data[0];
657};
658
Roland Dreierf520ba52005-08-18 12:24:13 -0700659struct ib_uverbs_create_srq {
660 __u64 response;
661 __u64 user_handle;
662 __u32 pd_handle;
663 __u32 max_wr;
664 __u32 max_sge;
665 __u32 srq_limit;
666 __u64 driver_data[0];
667};
668
Sean Hefty8541f8d2011-05-25 17:08:38 -0700669struct ib_uverbs_create_xsrq {
670 __u64 response;
671 __u64 user_handle;
672 __u32 srq_type;
673 __u32 pd_handle;
674 __u32 max_wr;
675 __u32 max_sge;
676 __u32 srq_limit;
677 __u32 reserved;
678 __u32 xrcd_handle;
679 __u32 cq_handle;
680 __u64 driver_data[0];
681};
682
Roland Dreierf520ba52005-08-18 12:24:13 -0700683struct ib_uverbs_create_srq_resp {
684 __u32 srq_handle;
Dotan Barakea88fd12006-02-23 12:36:18 -0800685 __u32 max_wr;
686 __u32 max_sge;
Sean Hefty8541f8d2011-05-25 17:08:38 -0700687 __u32 srqn;
Roland Dreierf520ba52005-08-18 12:24:13 -0700688};
689
690struct ib_uverbs_modify_srq {
691 __u32 srq_handle;
692 __u32 attr_mask;
693 __u32 max_wr;
Roland Dreierf520ba52005-08-18 12:24:13 -0700694 __u32 srq_limit;
Roland Dreierf520ba52005-08-18 12:24:13 -0700695 __u64 driver_data[0];
696};
697
Dotan Barak8bdb0e82006-02-13 16:31:57 -0800698struct ib_uverbs_query_srq {
699 __u64 response;
700 __u32 srq_handle;
701 __u32 reserved;
702 __u64 driver_data[0];
703};
704
705struct ib_uverbs_query_srq_resp {
706 __u32 max_wr;
707 __u32 max_sge;
708 __u32 srq_limit;
709 __u32 reserved;
710};
711
Roland Dreierf520ba52005-08-18 12:24:13 -0700712struct ib_uverbs_destroy_srq {
Roland Dreier63aaf642005-09-09 15:55:08 -0700713 __u64 response;
Roland Dreierf520ba52005-08-18 12:24:13 -0700714 __u32 srq_handle;
Roland Dreier63aaf642005-09-09 15:55:08 -0700715 __u32 reserved;
716};
717
718struct ib_uverbs_destroy_srq_resp {
719 __u32 events_reported;
Roland Dreierf520ba52005-08-18 12:24:13 -0700720};
721
Roland Dreier8a96b3f2005-07-07 17:57:12 -0700722#endif /* IB_USER_VERBS_H */