blob: b5cb63f41f0f9f239765d2ae4cdeeb8dbdde0afe [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 Dreier6b735972005-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,
86 IB_USER_VERBS_CMD_CLOSE_XRCD
Roland Dreier8a96b3f2005-07-07 17:57:12 -070087};
88
89/*
90 * Make sure that all structs defined in this file remain laid out so
91 * that they pack the same way on 32-bit and 64-bit architectures (to
92 * avoid incompatibility between 32-bit userspace and 64-bit kernels).
Roland Dreier91ecd4a2005-10-14 15:21:44 -070093 * Specifically:
94 * - Do not use pointer types -- pass pointers in __u64 instead.
95 * - Make sure that any structure larger than 4 bytes is padded to a
96 * multiple of 8 bytes. Otherwise the structure size will be
97 * different between 32-bit and 64-bit architectures.
Roland Dreier8a96b3f2005-07-07 17:57:12 -070098 */
99
100struct ib_uverbs_async_event_desc {
101 __u64 element;
102 __u32 event_type; /* enum ib_event_type */
103 __u32 reserved;
104};
105
106struct ib_uverbs_comp_event_desc {
107 __u64 cq_handle;
108};
109
110/*
111 * All commands from userspace should start with a __u32 command field
112 * followed by __u16 in_words and out_words fields (which give the
113 * length of the command block and response buffer if any in 32-bit
114 * words). The kernel driver will read these fields first and read
115 * the rest of the command struct based on these value.
116 */
117
118struct ib_uverbs_cmd_hdr {
119 __u32 command;
120 __u16 in_words;
121 __u16 out_words;
122};
123
Roland Dreier8a96b3f2005-07-07 17:57:12 -0700124struct ib_uverbs_get_context {
125 __u64 response;
Roland Dreier8a96b3f2005-07-07 17:57:12 -0700126 __u64 driver_data[0];
127};
128
129struct ib_uverbs_get_context_resp {
130 __u32 async_fd;
Roland Dreier6b735972005-09-26 13:53:25 -0700131 __u32 num_comp_vectors;
Roland Dreier8a96b3f2005-07-07 17:57:12 -0700132};
133
134struct ib_uverbs_query_device {
135 __u64 response;
136 __u64 driver_data[0];
137};
138
139struct ib_uverbs_query_device_resp {
140 __u64 fw_ver;
Sean Hefty97f52eb2005-08-13 21:05:57 -0700141 __be64 node_guid;
142 __be64 sys_image_guid;
Roland Dreier8a96b3f2005-07-07 17:57:12 -0700143 __u64 max_mr_size;
144 __u64 page_size_cap;
145 __u32 vendor_id;
146 __u32 vendor_part_id;
147 __u32 hw_ver;
148 __u32 max_qp;
149 __u32 max_qp_wr;
150 __u32 device_cap_flags;
151 __u32 max_sge;
152 __u32 max_sge_rd;
153 __u32 max_cq;
154 __u32 max_cqe;
155 __u32 max_mr;
156 __u32 max_pd;
157 __u32 max_qp_rd_atom;
158 __u32 max_ee_rd_atom;
159 __u32 max_res_rd_atom;
160 __u32 max_qp_init_rd_atom;
161 __u32 max_ee_init_rd_atom;
162 __u32 atomic_cap;
163 __u32 max_ee;
164 __u32 max_rdd;
165 __u32 max_mw;
166 __u32 max_raw_ipv6_qp;
167 __u32 max_raw_ethy_qp;
168 __u32 max_mcast_grp;
169 __u32 max_mcast_qp_attach;
170 __u32 max_total_mcast_qp_attach;
171 __u32 max_ah;
172 __u32 max_fmr;
173 __u32 max_map_per_fmr;
174 __u32 max_srq;
175 __u32 max_srq_wr;
176 __u32 max_srq_sge;
177 __u16 max_pkeys;
178 __u8 local_ca_ack_delay;
179 __u8 phys_port_cnt;
180 __u8 reserved[4];
181};
182
183struct ib_uverbs_query_port {
184 __u64 response;
185 __u8 port_num;
186 __u8 reserved[7];
187 __u64 driver_data[0];
188};
189
190struct ib_uverbs_query_port_resp {
191 __u32 port_cap_flags;
192 __u32 max_msg_sz;
193 __u32 bad_pkey_cntr;
194 __u32 qkey_viol_cntr;
195 __u32 gid_tbl_len;
196 __u16 pkey_tbl_len;
197 __u16 lid;
198 __u16 sm_lid;
199 __u8 state;
200 __u8 max_mtu;
201 __u8 active_mtu;
202 __u8 lmc;
203 __u8 max_vl_num;
204 __u8 sm_sl;
205 __u8 subnet_timeout;
206 __u8 init_type_reply;
207 __u8 active_width;
208 __u8 active_speed;
209 __u8 phys_state;
Eli Cohen2420b602010-10-18 14:45:20 -0700210 __u8 link_layer;
211 __u8 reserved[2];
Roland Dreier8a96b3f2005-07-07 17:57:12 -0700212};
213
Roland Dreier8a96b3f2005-07-07 17:57:12 -0700214struct ib_uverbs_alloc_pd {
215 __u64 response;
216 __u64 driver_data[0];
217};
218
219struct ib_uverbs_alloc_pd_resp {
220 __u32 pd_handle;
221};
222
223struct ib_uverbs_dealloc_pd {
224 __u32 pd_handle;
225};
226
Sean Hefty53d0bd12011-05-24 08:33:46 -0700227struct ib_uverbs_open_xrcd {
228 __u64 response;
229 __u32 fd;
230 __u32 oflags;
231 __u64 driver_data[0];
232};
233
234struct ib_uverbs_open_xrcd_resp {
235 __u32 xrcd_handle;
236};
237
238struct ib_uverbs_close_xrcd {
239 __u32 xrcd_handle;
240};
241
Roland Dreier8a96b3f2005-07-07 17:57:12 -0700242struct ib_uverbs_reg_mr {
243 __u64 response;
244 __u64 start;
245 __u64 length;
246 __u64 hca_va;
247 __u32 pd_handle;
248 __u32 access_flags;
249 __u64 driver_data[0];
250};
251
252struct ib_uverbs_reg_mr_resp {
253 __u32 mr_handle;
254 __u32 lkey;
255 __u32 rkey;
256};
257
258struct ib_uverbs_dereg_mr {
259 __u32 mr_handle;
260};
261
Roland Dreier6b735972005-09-26 13:53:25 -0700262struct ib_uverbs_create_comp_channel {
263 __u64 response;
264};
265
266struct ib_uverbs_create_comp_channel_resp {
267 __u32 fd;
268};
269
Roland Dreier8a96b3f2005-07-07 17:57:12 -0700270struct ib_uverbs_create_cq {
271 __u64 response;
272 __u64 user_handle;
273 __u32 cqe;
Roland Dreier6b735972005-09-26 13:53:25 -0700274 __u32 comp_vector;
275 __s32 comp_channel;
276 __u32 reserved;
Roland Dreier8a96b3f2005-07-07 17:57:12 -0700277 __u64 driver_data[0];
278};
279
280struct ib_uverbs_create_cq_resp {
281 __u32 cq_handle;
282 __u32 cqe;
283};
284
Roland Dreier33b9b3e2006-01-30 14:29:21 -0800285struct ib_uverbs_resize_cq {
286 __u64 response;
287 __u32 cq_handle;
288 __u32 cqe;
289 __u64 driver_data[0];
290};
291
292struct ib_uverbs_resize_cq_resp {
293 __u32 cqe;
Ralph Campbell64f817b2006-09-22 15:22:24 -0700294 __u32 reserved;
295 __u64 driver_data[0];
Roland Dreier33b9b3e2006-01-30 14:29:21 -0800296};
297
Roland Dreier91ecd4a2005-10-14 15:21:44 -0700298struct ib_uverbs_poll_cq {
299 __u64 response;
300 __u32 cq_handle;
301 __u32 ne;
302};
303
304struct ib_uverbs_wc {
305 __u64 wr_id;
306 __u32 status;
307 __u32 opcode;
308 __u32 vendor_err;
309 __u32 byte_len;
Steve Wise00f7ec32008-07-14 23:48:45 -0700310 union {
311 __u32 imm_data;
312 __u32 invalidate_rkey;
313 } ex;
Roland Dreier91ecd4a2005-10-14 15:21:44 -0700314 __u32 qp_num;
315 __u32 src_qp;
316 __u32 wc_flags;
317 __u16 pkey_index;
318 __u16 slid;
319 __u8 sl;
320 __u8 dlid_path_bits;
321 __u8 port_num;
322 __u8 reserved;
323};
324
325struct ib_uverbs_poll_cq_resp {
326 __u32 count;
327 __u32 reserved;
328 struct ib_uverbs_wc wc[0];
329};
330
331struct ib_uverbs_req_notify_cq {
332 __u32 cq_handle;
333 __u32 solicited_only;
334};
335
Roland Dreier8a96b3f2005-07-07 17:57:12 -0700336struct ib_uverbs_destroy_cq {
Roland Dreier63aaf642005-09-09 15:55:08 -0700337 __u64 response;
Roland Dreier8a96b3f2005-07-07 17:57:12 -0700338 __u32 cq_handle;
Roland Dreier63aaf642005-09-09 15:55:08 -0700339 __u32 reserved;
340};
341
342struct ib_uverbs_destroy_cq_resp {
343 __u32 comp_events_reported;
344 __u32 async_events_reported;
Roland Dreier8a96b3f2005-07-07 17:57:12 -0700345};
346
Sean Hefty6a9af2e2006-06-17 20:37:27 -0700347struct ib_uverbs_global_route {
348 __u8 dgid[16];
349 __u32 flow_label;
350 __u8 sgid_index;
351 __u8 hop_limit;
352 __u8 traffic_class;
353 __u8 reserved;
354};
355
356struct ib_uverbs_ah_attr {
357 struct ib_uverbs_global_route grh;
358 __u16 dlid;
359 __u8 sl;
360 __u8 src_path_bits;
361 __u8 static_rate;
362 __u8 is_global;
363 __u8 port_num;
364 __u8 reserved;
365};
366
367struct ib_uverbs_qp_attr {
368 __u32 qp_attr_mask;
369 __u32 qp_state;
370 __u32 cur_qp_state;
371 __u32 path_mtu;
372 __u32 path_mig_state;
373 __u32 qkey;
374 __u32 rq_psn;
375 __u32 sq_psn;
376 __u32 dest_qp_num;
377 __u32 qp_access_flags;
378
379 struct ib_uverbs_ah_attr ah_attr;
380 struct ib_uverbs_ah_attr alt_ah_attr;
381
382 /* ib_qp_cap */
383 __u32 max_send_wr;
384 __u32 max_recv_wr;
385 __u32 max_send_sge;
386 __u32 max_recv_sge;
387 __u32 max_inline_data;
388
389 __u16 pkey_index;
390 __u16 alt_pkey_index;
391 __u8 en_sqd_async_notify;
392 __u8 sq_draining;
393 __u8 max_rd_atomic;
394 __u8 max_dest_rd_atomic;
395 __u8 min_rnr_timer;
396 __u8 port_num;
397 __u8 timeout;
398 __u8 retry_cnt;
399 __u8 rnr_retry;
400 __u8 alt_port_num;
401 __u8 alt_timeout;
402 __u8 reserved[5];
403};
404
Roland Dreier8a96b3f2005-07-07 17:57:12 -0700405struct ib_uverbs_create_qp {
406 __u64 response;
407 __u64 user_handle;
408 __u32 pd_handle;
409 __u32 send_cq_handle;
410 __u32 recv_cq_handle;
411 __u32 srq_handle;
412 __u32 max_send_wr;
413 __u32 max_recv_wr;
414 __u32 max_send_sge;
415 __u32 max_recv_sge;
416 __u32 max_inline_data;
417 __u8 sq_sig_all;
418 __u8 qp_type;
419 __u8 is_srq;
420 __u8 reserved;
421 __u64 driver_data[0];
422};
423
424struct ib_uverbs_create_qp_resp {
425 __u32 qp_handle;
426 __u32 qpn;
Jack Morgenstein77369ed2005-11-09 11:26:07 -0800427 __u32 max_send_wr;
428 __u32 max_recv_wr;
429 __u32 max_send_sge;
430 __u32 max_recv_sge;
431 __u32 max_inline_data;
Roland Dreier4d9781c2006-02-16 09:26:19 -0800432 __u32 reserved;
Roland Dreier8a96b3f2005-07-07 17:57:12 -0700433};
434
435/*
436 * This struct needs to remain a multiple of 8 bytes to keep the
437 * alignment of the modify QP parameters.
438 */
439struct ib_uverbs_qp_dest {
440 __u8 dgid[16];
441 __u32 flow_label;
442 __u16 dlid;
443 __u16 reserved;
444 __u8 sgid_index;
445 __u8 hop_limit;
446 __u8 traffic_class;
447 __u8 sl;
448 __u8 src_path_bits;
449 __u8 static_rate;
450 __u8 is_global;
451 __u8 port_num;
452};
453
Dotan Barak7ccc9a22006-02-13 16:31:25 -0800454struct ib_uverbs_query_qp {
455 __u64 response;
456 __u32 qp_handle;
457 __u32 attr_mask;
458 __u64 driver_data[0];
459};
460
461struct ib_uverbs_query_qp_resp {
462 struct ib_uverbs_qp_dest dest;
463 struct ib_uverbs_qp_dest alt_dest;
464 __u32 max_send_wr;
465 __u32 max_recv_wr;
466 __u32 max_send_sge;
467 __u32 max_recv_sge;
468 __u32 max_inline_data;
469 __u32 qkey;
470 __u32 rq_psn;
471 __u32 sq_psn;
472 __u32 dest_qp_num;
473 __u32 qp_access_flags;
474 __u16 pkey_index;
475 __u16 alt_pkey_index;
476 __u8 qp_state;
477 __u8 cur_qp_state;
478 __u8 path_mtu;
479 __u8 path_mig_state;
Jack Morgenstein0b26c882006-10-25 12:54:20 +0200480 __u8 sq_draining;
Dotan Barak7ccc9a22006-02-13 16:31:25 -0800481 __u8 max_rd_atomic;
482 __u8 max_dest_rd_atomic;
483 __u8 min_rnr_timer;
484 __u8 port_num;
485 __u8 timeout;
486 __u8 retry_cnt;
487 __u8 rnr_retry;
488 __u8 alt_port_num;
489 __u8 alt_timeout;
490 __u8 sq_sig_all;
491 __u8 reserved[5];
492 __u64 driver_data[0];
493};
494
Roland Dreier8a96b3f2005-07-07 17:57:12 -0700495struct ib_uverbs_modify_qp {
496 struct ib_uverbs_qp_dest dest;
497 struct ib_uverbs_qp_dest alt_dest;
498 __u32 qp_handle;
499 __u32 attr_mask;
500 __u32 qkey;
501 __u32 rq_psn;
502 __u32 sq_psn;
503 __u32 dest_qp_num;
504 __u32 qp_access_flags;
505 __u16 pkey_index;
506 __u16 alt_pkey_index;
507 __u8 qp_state;
508 __u8 cur_qp_state;
509 __u8 path_mtu;
510 __u8 path_mig_state;
511 __u8 en_sqd_async_notify;
512 __u8 max_rd_atomic;
513 __u8 max_dest_rd_atomic;
514 __u8 min_rnr_timer;
515 __u8 port_num;
516 __u8 timeout;
517 __u8 retry_cnt;
518 __u8 rnr_retry;
519 __u8 alt_port_num;
520 __u8 alt_timeout;
521 __u8 reserved[2];
522 __u64 driver_data[0];
523};
524
525struct ib_uverbs_modify_qp_resp {
526};
527
528struct ib_uverbs_destroy_qp {
Roland Dreier63aaf642005-09-09 15:55:08 -0700529 __u64 response;
Roland Dreier8a96b3f2005-07-07 17:57:12 -0700530 __u32 qp_handle;
Roland Dreier63aaf642005-09-09 15:55:08 -0700531 __u32 reserved;
532};
533
534struct ib_uverbs_destroy_qp_resp {
535 __u32 events_reported;
Roland Dreier8a96b3f2005-07-07 17:57:12 -0700536};
537
Roland Dreier91ecd4a2005-10-14 15:21:44 -0700538/*
539 * The ib_uverbs_sge structure isn't used anywhere, since we assume
540 * the ib_sge structure is packed the same way on 32-bit and 64-bit
541 * architectures in both kernel and user space. It's just here to
542 * document the ABI.
543 */
544struct ib_uverbs_sge {
545 __u64 addr;
546 __u32 length;
547 __u32 lkey;
548};
549
550struct ib_uverbs_send_wr {
Roland Dreiera74cd4a2006-02-13 16:30:49 -0800551 __u64 wr_id;
Roland Dreier91ecd4a2005-10-14 15:21:44 -0700552 __u32 num_sge;
553 __u32 opcode;
554 __u32 send_flags;
Roland Dreier0f39cf32008-04-16 21:09:32 -0700555 union {
556 __u32 imm_data;
557 __u32 invalidate_rkey;
558 } ex;
Roland Dreier91ecd4a2005-10-14 15:21:44 -0700559 union {
560 struct {
561 __u64 remote_addr;
562 __u32 rkey;
563 __u32 reserved;
564 } rdma;
565 struct {
566 __u64 remote_addr;
567 __u64 compare_add;
568 __u64 swap;
569 __u32 rkey;
570 __u32 reserved;
571 } atomic;
572 struct {
573 __u32 ah;
574 __u32 remote_qpn;
575 __u32 remote_qkey;
576 __u32 reserved;
577 } ud;
578 } wr;
579};
580
581struct ib_uverbs_post_send {
582 __u64 response;
583 __u32 qp_handle;
584 __u32 wr_count;
585 __u32 sge_count;
586 __u32 wqe_size;
587 struct ib_uverbs_send_wr send_wr[0];
588};
589
590struct ib_uverbs_post_send_resp {
591 __u32 bad_wr;
592};
593
594struct ib_uverbs_recv_wr {
595 __u64 wr_id;
596 __u32 num_sge;
597 __u32 reserved;
598};
599
600struct ib_uverbs_post_recv {
601 __u64 response;
602 __u32 qp_handle;
603 __u32 wr_count;
604 __u32 sge_count;
605 __u32 wqe_size;
606 struct ib_uverbs_recv_wr recv_wr[0];
607};
608
609struct ib_uverbs_post_recv_resp {
610 __u32 bad_wr;
611};
612
613struct ib_uverbs_post_srq_recv {
614 __u64 response;
615 __u32 srq_handle;
616 __u32 wr_count;
617 __u32 sge_count;
618 __u32 wqe_size;
619 struct ib_uverbs_recv_wr recv[0];
620};
621
622struct ib_uverbs_post_srq_recv_resp {
623 __u32 bad_wr;
624};
625
Roland Dreier91ecd4a2005-10-14 15:21:44 -0700626struct ib_uverbs_create_ah {
627 __u64 response;
628 __u64 user_handle;
629 __u32 pd_handle;
630 __u32 reserved;
631 struct ib_uverbs_ah_attr attr;
632};
633
634struct ib_uverbs_create_ah_resp {
635 __u32 ah_handle;
636};
637
638struct ib_uverbs_destroy_ah {
639 __u32 ah_handle;
640};
641
Roland Dreier8a96b3f2005-07-07 17:57:12 -0700642struct ib_uverbs_attach_mcast {
643 __u8 gid[16];
644 __u32 qp_handle;
645 __u16 mlid;
646 __u16 reserved;
647 __u64 driver_data[0];
648};
649
650struct ib_uverbs_detach_mcast {
651 __u8 gid[16];
652 __u32 qp_handle;
653 __u16 mlid;
654 __u16 reserved;
655 __u64 driver_data[0];
656};
657
Roland Dreierf520ba52005-08-18 12:24:13 -0700658struct ib_uverbs_create_srq {
659 __u64 response;
660 __u64 user_handle;
661 __u32 pd_handle;
662 __u32 max_wr;
663 __u32 max_sge;
664 __u32 srq_limit;
665 __u64 driver_data[0];
666};
667
668struct ib_uverbs_create_srq_resp {
669 __u32 srq_handle;
Dotan Barakea88fd12006-02-23 12:36:18 -0800670 __u32 max_wr;
671 __u32 max_sge;
672 __u32 reserved;
Roland Dreierf520ba52005-08-18 12:24:13 -0700673};
674
675struct ib_uverbs_modify_srq {
676 __u32 srq_handle;
677 __u32 attr_mask;
678 __u32 max_wr;
Roland Dreierf520ba52005-08-18 12:24:13 -0700679 __u32 srq_limit;
Roland Dreierf520ba52005-08-18 12:24:13 -0700680 __u64 driver_data[0];
681};
682
Dotan Barak8bdb0e82006-02-13 16:31:57 -0800683struct ib_uverbs_query_srq {
684 __u64 response;
685 __u32 srq_handle;
686 __u32 reserved;
687 __u64 driver_data[0];
688};
689
690struct ib_uverbs_query_srq_resp {
691 __u32 max_wr;
692 __u32 max_sge;
693 __u32 srq_limit;
694 __u32 reserved;
695};
696
Roland Dreierf520ba52005-08-18 12:24:13 -0700697struct ib_uverbs_destroy_srq {
Roland Dreier63aaf642005-09-09 15:55:08 -0700698 __u64 response;
Roland Dreierf520ba52005-08-18 12:24:13 -0700699 __u32 srq_handle;
Roland Dreier63aaf642005-09-09 15:55:08 -0700700 __u32 reserved;
701};
702
703struct ib_uverbs_destroy_srq_resp {
704 __u32 events_reported;
Roland Dreierf520ba52005-08-18 12:24:13 -0700705};
706
Roland Dreier8a96b3f2005-07-07 17:57:12 -0700707#endif /* IB_USER_VERBS_H */