blob: 805711ea200596d3bba291f7a06902963316510b [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,
Sean Hefty42849b22011-08-11 13:57:43 -070087 IB_USER_VERBS_CMD_CREATE_XSRQ,
88 IB_USER_VERBS_CMD_OPEN_QP
Roland Dreier8a96b3f2005-07-07 17:57:12 -070089};
90
91/*
92 * Make sure that all structs defined in this file remain laid out so
93 * that they pack the same way on 32-bit and 64-bit architectures (to
94 * avoid incompatibility between 32-bit userspace and 64-bit kernels).
Roland Dreier91ecd4a2005-10-14 15:21:44 -070095 * Specifically:
96 * - Do not use pointer types -- pass pointers in __u64 instead.
97 * - Make sure that any structure larger than 4 bytes is padded to a
98 * multiple of 8 bytes. Otherwise the structure size will be
99 * different between 32-bit and 64-bit architectures.
Roland Dreier8a96b3f2005-07-07 17:57:12 -0700100 */
101
102struct ib_uverbs_async_event_desc {
103 __u64 element;
104 __u32 event_type; /* enum ib_event_type */
105 __u32 reserved;
106};
107
108struct ib_uverbs_comp_event_desc {
109 __u64 cq_handle;
110};
111
112/*
113 * All commands from userspace should start with a __u32 command field
114 * followed by __u16 in_words and out_words fields (which give the
115 * length of the command block and response buffer if any in 32-bit
116 * words). The kernel driver will read these fields first and read
117 * the rest of the command struct based on these value.
118 */
119
120struct ib_uverbs_cmd_hdr {
121 __u32 command;
122 __u16 in_words;
123 __u16 out_words;
124};
125
Roland Dreier8a96b3f2005-07-07 17:57:12 -0700126struct ib_uverbs_get_context {
127 __u64 response;
Roland Dreier8a96b3f2005-07-07 17:57:12 -0700128 __u64 driver_data[0];
129};
130
131struct ib_uverbs_get_context_resp {
132 __u32 async_fd;
Roland Dreier6b73597e2005-09-26 13:53:25 -0700133 __u32 num_comp_vectors;
Roland Dreier8a96b3f2005-07-07 17:57:12 -0700134};
135
136struct ib_uverbs_query_device {
137 __u64 response;
138 __u64 driver_data[0];
139};
140
141struct ib_uverbs_query_device_resp {
142 __u64 fw_ver;
Sean Hefty97f52eb2005-08-13 21:05:57 -0700143 __be64 node_guid;
144 __be64 sys_image_guid;
Roland Dreier8a96b3f2005-07-07 17:57:12 -0700145 __u64 max_mr_size;
146 __u64 page_size_cap;
147 __u32 vendor_id;
148 __u32 vendor_part_id;
149 __u32 hw_ver;
150 __u32 max_qp;
151 __u32 max_qp_wr;
152 __u32 device_cap_flags;
153 __u32 max_sge;
154 __u32 max_sge_rd;
155 __u32 max_cq;
156 __u32 max_cqe;
157 __u32 max_mr;
158 __u32 max_pd;
159 __u32 max_qp_rd_atom;
160 __u32 max_ee_rd_atom;
161 __u32 max_res_rd_atom;
162 __u32 max_qp_init_rd_atom;
163 __u32 max_ee_init_rd_atom;
164 __u32 atomic_cap;
165 __u32 max_ee;
166 __u32 max_rdd;
167 __u32 max_mw;
168 __u32 max_raw_ipv6_qp;
169 __u32 max_raw_ethy_qp;
170 __u32 max_mcast_grp;
171 __u32 max_mcast_qp_attach;
172 __u32 max_total_mcast_qp_attach;
173 __u32 max_ah;
174 __u32 max_fmr;
175 __u32 max_map_per_fmr;
176 __u32 max_srq;
177 __u32 max_srq_wr;
178 __u32 max_srq_sge;
179 __u16 max_pkeys;
180 __u8 local_ca_ack_delay;
181 __u8 phys_port_cnt;
182 __u8 reserved[4];
183};
184
185struct ib_uverbs_query_port {
186 __u64 response;
187 __u8 port_num;
188 __u8 reserved[7];
189 __u64 driver_data[0];
190};
191
192struct ib_uverbs_query_port_resp {
193 __u32 port_cap_flags;
194 __u32 max_msg_sz;
195 __u32 bad_pkey_cntr;
196 __u32 qkey_viol_cntr;
197 __u32 gid_tbl_len;
198 __u16 pkey_tbl_len;
199 __u16 lid;
200 __u16 sm_lid;
201 __u8 state;
202 __u8 max_mtu;
203 __u8 active_mtu;
204 __u8 lmc;
205 __u8 max_vl_num;
206 __u8 sm_sl;
207 __u8 subnet_timeout;
208 __u8 init_type_reply;
209 __u8 active_width;
210 __u8 active_speed;
211 __u8 phys_state;
Eli Cohen2420b602010-10-18 14:45:20 -0700212 __u8 link_layer;
213 __u8 reserved[2];
Roland Dreier8a96b3f2005-07-07 17:57:12 -0700214};
215
Roland Dreier8a96b3f2005-07-07 17:57:12 -0700216struct ib_uverbs_alloc_pd {
217 __u64 response;
218 __u64 driver_data[0];
219};
220
221struct ib_uverbs_alloc_pd_resp {
222 __u32 pd_handle;
223};
224
225struct ib_uverbs_dealloc_pd {
226 __u32 pd_handle;
227};
228
Sean Hefty53d0bd12011-05-24 08:33:46 -0700229struct ib_uverbs_open_xrcd {
230 __u64 response;
231 __u32 fd;
232 __u32 oflags;
233 __u64 driver_data[0];
234};
235
236struct ib_uverbs_open_xrcd_resp {
237 __u32 xrcd_handle;
238};
239
240struct ib_uverbs_close_xrcd {
241 __u32 xrcd_handle;
242};
243
Roland Dreier8a96b3f2005-07-07 17:57:12 -0700244struct ib_uverbs_reg_mr {
245 __u64 response;
246 __u64 start;
247 __u64 length;
248 __u64 hca_va;
249 __u32 pd_handle;
250 __u32 access_flags;
251 __u64 driver_data[0];
252};
253
254struct ib_uverbs_reg_mr_resp {
255 __u32 mr_handle;
256 __u32 lkey;
257 __u32 rkey;
258};
259
260struct ib_uverbs_dereg_mr {
261 __u32 mr_handle;
262};
263
Shani Michaeli6b52a122013-02-06 16:19:13 +0000264struct ib_uverbs_alloc_mw {
265 __u64 response;
266 __u32 pd_handle;
267 __u8 mw_type;
268 __u8 reserved[3];
269};
270
271struct ib_uverbs_alloc_mw_resp {
272 __u32 mw_handle;
273 __u32 rkey;
274};
275
276struct ib_uverbs_dealloc_mw {
277 __u32 mw_handle;
278};
279
Roland Dreier6b73597e2005-09-26 13:53:25 -0700280struct ib_uverbs_create_comp_channel {
281 __u64 response;
282};
283
284struct ib_uverbs_create_comp_channel_resp {
285 __u32 fd;
286};
287
Roland Dreier8a96b3f2005-07-07 17:57:12 -0700288struct ib_uverbs_create_cq {
289 __u64 response;
290 __u64 user_handle;
291 __u32 cqe;
Roland Dreier6b73597e2005-09-26 13:53:25 -0700292 __u32 comp_vector;
293 __s32 comp_channel;
294 __u32 reserved;
Roland Dreier8a96b3f2005-07-07 17:57:12 -0700295 __u64 driver_data[0];
296};
297
298struct ib_uverbs_create_cq_resp {
299 __u32 cq_handle;
300 __u32 cqe;
301};
302
Roland Dreier33b9b3e2006-01-30 14:29:21 -0800303struct ib_uverbs_resize_cq {
304 __u64 response;
305 __u32 cq_handle;
306 __u32 cqe;
307 __u64 driver_data[0];
308};
309
310struct ib_uverbs_resize_cq_resp {
311 __u32 cqe;
Ralph Campbell64f817b2006-09-22 15:22:24 -0700312 __u32 reserved;
313 __u64 driver_data[0];
Roland Dreier33b9b3e2006-01-30 14:29:21 -0800314};
315
Roland Dreier91ecd4a2005-10-14 15:21:44 -0700316struct ib_uverbs_poll_cq {
317 __u64 response;
318 __u32 cq_handle;
319 __u32 ne;
320};
321
322struct ib_uverbs_wc {
323 __u64 wr_id;
324 __u32 status;
325 __u32 opcode;
326 __u32 vendor_err;
327 __u32 byte_len;
Steve Wise00f7ec32008-07-14 23:48:45 -0700328 union {
329 __u32 imm_data;
330 __u32 invalidate_rkey;
331 } ex;
Roland Dreier91ecd4a2005-10-14 15:21:44 -0700332 __u32 qp_num;
333 __u32 src_qp;
334 __u32 wc_flags;
335 __u16 pkey_index;
336 __u16 slid;
337 __u8 sl;
338 __u8 dlid_path_bits;
339 __u8 port_num;
340 __u8 reserved;
341};
342
343struct ib_uverbs_poll_cq_resp {
344 __u32 count;
345 __u32 reserved;
346 struct ib_uverbs_wc wc[0];
347};
348
349struct ib_uverbs_req_notify_cq {
350 __u32 cq_handle;
351 __u32 solicited_only;
352};
353
Roland Dreier8a96b3f2005-07-07 17:57:12 -0700354struct ib_uverbs_destroy_cq {
Roland Dreier63aaf642005-09-09 15:55:08 -0700355 __u64 response;
Roland Dreier8a96b3f2005-07-07 17:57:12 -0700356 __u32 cq_handle;
Roland Dreier63aaf642005-09-09 15:55:08 -0700357 __u32 reserved;
358};
359
360struct ib_uverbs_destroy_cq_resp {
361 __u32 comp_events_reported;
362 __u32 async_events_reported;
Roland Dreier8a96b3f2005-07-07 17:57:12 -0700363};
364
Sean Hefty6a9af2e2006-06-17 20:37:27 -0700365struct ib_uverbs_global_route {
366 __u8 dgid[16];
367 __u32 flow_label;
368 __u8 sgid_index;
369 __u8 hop_limit;
370 __u8 traffic_class;
371 __u8 reserved;
372};
373
374struct ib_uverbs_ah_attr {
375 struct ib_uverbs_global_route grh;
376 __u16 dlid;
377 __u8 sl;
378 __u8 src_path_bits;
379 __u8 static_rate;
380 __u8 is_global;
381 __u8 port_num;
382 __u8 reserved;
383};
384
385struct ib_uverbs_qp_attr {
386 __u32 qp_attr_mask;
387 __u32 qp_state;
388 __u32 cur_qp_state;
389 __u32 path_mtu;
390 __u32 path_mig_state;
391 __u32 qkey;
392 __u32 rq_psn;
393 __u32 sq_psn;
394 __u32 dest_qp_num;
395 __u32 qp_access_flags;
396
397 struct ib_uverbs_ah_attr ah_attr;
398 struct ib_uverbs_ah_attr alt_ah_attr;
399
400 /* ib_qp_cap */
401 __u32 max_send_wr;
402 __u32 max_recv_wr;
403 __u32 max_send_sge;
404 __u32 max_recv_sge;
405 __u32 max_inline_data;
406
407 __u16 pkey_index;
408 __u16 alt_pkey_index;
409 __u8 en_sqd_async_notify;
410 __u8 sq_draining;
411 __u8 max_rd_atomic;
412 __u8 max_dest_rd_atomic;
413 __u8 min_rnr_timer;
414 __u8 port_num;
415 __u8 timeout;
416 __u8 retry_cnt;
417 __u8 rnr_retry;
418 __u8 alt_port_num;
419 __u8 alt_timeout;
420 __u8 reserved[5];
421};
422
Roland Dreier8a96b3f2005-07-07 17:57:12 -0700423struct ib_uverbs_create_qp {
424 __u64 response;
425 __u64 user_handle;
426 __u32 pd_handle;
427 __u32 send_cq_handle;
428 __u32 recv_cq_handle;
429 __u32 srq_handle;
430 __u32 max_send_wr;
431 __u32 max_recv_wr;
432 __u32 max_send_sge;
433 __u32 max_recv_sge;
434 __u32 max_inline_data;
435 __u8 sq_sig_all;
436 __u8 qp_type;
437 __u8 is_srq;
438 __u8 reserved;
439 __u64 driver_data[0];
440};
441
Sean Hefty42849b22011-08-11 13:57:43 -0700442struct ib_uverbs_open_qp {
443 __u64 response;
444 __u64 user_handle;
445 __u32 pd_handle;
446 __u32 qpn;
447 __u8 qp_type;
448 __u8 reserved[7];
449 __u64 driver_data[0];
450};
451
452/* also used for open response */
Roland Dreier8a96b3f2005-07-07 17:57:12 -0700453struct ib_uverbs_create_qp_resp {
454 __u32 qp_handle;
455 __u32 qpn;
Jack Morgenstein77369ed2005-11-09 11:26:07 -0800456 __u32 max_send_wr;
457 __u32 max_recv_wr;
458 __u32 max_send_sge;
459 __u32 max_recv_sge;
460 __u32 max_inline_data;
Roland Dreier4d9781c2006-02-16 09:26:19 -0800461 __u32 reserved;
Roland Dreier8a96b3f2005-07-07 17:57:12 -0700462};
463
464/*
465 * This struct needs to remain a multiple of 8 bytes to keep the
466 * alignment of the modify QP parameters.
467 */
468struct ib_uverbs_qp_dest {
469 __u8 dgid[16];
470 __u32 flow_label;
471 __u16 dlid;
472 __u16 reserved;
473 __u8 sgid_index;
474 __u8 hop_limit;
475 __u8 traffic_class;
476 __u8 sl;
477 __u8 src_path_bits;
478 __u8 static_rate;
479 __u8 is_global;
480 __u8 port_num;
481};
482
Dotan Barak7ccc9a22006-02-13 16:31:25 -0800483struct ib_uverbs_query_qp {
484 __u64 response;
485 __u32 qp_handle;
486 __u32 attr_mask;
487 __u64 driver_data[0];
488};
489
490struct ib_uverbs_query_qp_resp {
491 struct ib_uverbs_qp_dest dest;
492 struct ib_uverbs_qp_dest alt_dest;
493 __u32 max_send_wr;
494 __u32 max_recv_wr;
495 __u32 max_send_sge;
496 __u32 max_recv_sge;
497 __u32 max_inline_data;
498 __u32 qkey;
499 __u32 rq_psn;
500 __u32 sq_psn;
501 __u32 dest_qp_num;
502 __u32 qp_access_flags;
503 __u16 pkey_index;
504 __u16 alt_pkey_index;
505 __u8 qp_state;
506 __u8 cur_qp_state;
507 __u8 path_mtu;
508 __u8 path_mig_state;
Jack Morgenstein0b26c882006-10-25 12:54:20 +0200509 __u8 sq_draining;
Dotan Barak7ccc9a22006-02-13 16:31:25 -0800510 __u8 max_rd_atomic;
511 __u8 max_dest_rd_atomic;
512 __u8 min_rnr_timer;
513 __u8 port_num;
514 __u8 timeout;
515 __u8 retry_cnt;
516 __u8 rnr_retry;
517 __u8 alt_port_num;
518 __u8 alt_timeout;
519 __u8 sq_sig_all;
520 __u8 reserved[5];
521 __u64 driver_data[0];
522};
523
Roland Dreier8a96b3f2005-07-07 17:57:12 -0700524struct ib_uverbs_modify_qp {
525 struct ib_uverbs_qp_dest dest;
526 struct ib_uverbs_qp_dest alt_dest;
527 __u32 qp_handle;
528 __u32 attr_mask;
529 __u32 qkey;
530 __u32 rq_psn;
531 __u32 sq_psn;
532 __u32 dest_qp_num;
533 __u32 qp_access_flags;
534 __u16 pkey_index;
535 __u16 alt_pkey_index;
536 __u8 qp_state;
537 __u8 cur_qp_state;
538 __u8 path_mtu;
539 __u8 path_mig_state;
540 __u8 en_sqd_async_notify;
541 __u8 max_rd_atomic;
542 __u8 max_dest_rd_atomic;
543 __u8 min_rnr_timer;
544 __u8 port_num;
545 __u8 timeout;
546 __u8 retry_cnt;
547 __u8 rnr_retry;
548 __u8 alt_port_num;
549 __u8 alt_timeout;
550 __u8 reserved[2];
551 __u64 driver_data[0];
552};
553
554struct ib_uverbs_modify_qp_resp {
555};
556
557struct ib_uverbs_destroy_qp {
Roland Dreier63aaf642005-09-09 15:55:08 -0700558 __u64 response;
Roland Dreier8a96b3f2005-07-07 17:57:12 -0700559 __u32 qp_handle;
Roland Dreier63aaf642005-09-09 15:55:08 -0700560 __u32 reserved;
561};
562
563struct ib_uverbs_destroy_qp_resp {
564 __u32 events_reported;
Roland Dreier8a96b3f2005-07-07 17:57:12 -0700565};
566
Roland Dreier91ecd4a2005-10-14 15:21:44 -0700567/*
568 * The ib_uverbs_sge structure isn't used anywhere, since we assume
569 * the ib_sge structure is packed the same way on 32-bit and 64-bit
570 * architectures in both kernel and user space. It's just here to
571 * document the ABI.
572 */
573struct ib_uverbs_sge {
574 __u64 addr;
575 __u32 length;
576 __u32 lkey;
577};
578
579struct ib_uverbs_send_wr {
Roland Dreiera74cd4a2006-02-13 16:30:49 -0800580 __u64 wr_id;
Roland Dreier91ecd4a2005-10-14 15:21:44 -0700581 __u32 num_sge;
582 __u32 opcode;
583 __u32 send_flags;
Roland Dreier0f39cf32008-04-16 21:09:32 -0700584 union {
585 __u32 imm_data;
586 __u32 invalidate_rkey;
587 } ex;
Roland Dreier91ecd4a2005-10-14 15:21:44 -0700588 union {
589 struct {
590 __u64 remote_addr;
591 __u32 rkey;
592 __u32 reserved;
593 } rdma;
594 struct {
595 __u64 remote_addr;
596 __u64 compare_add;
597 __u64 swap;
598 __u32 rkey;
599 __u32 reserved;
600 } atomic;
601 struct {
602 __u32 ah;
603 __u32 remote_qpn;
604 __u32 remote_qkey;
605 __u32 reserved;
606 } ud;
607 } wr;
608};
609
610struct ib_uverbs_post_send {
611 __u64 response;
612 __u32 qp_handle;
613 __u32 wr_count;
614 __u32 sge_count;
615 __u32 wqe_size;
616 struct ib_uverbs_send_wr send_wr[0];
617};
618
619struct ib_uverbs_post_send_resp {
620 __u32 bad_wr;
621};
622
623struct ib_uverbs_recv_wr {
624 __u64 wr_id;
625 __u32 num_sge;
626 __u32 reserved;
627};
628
629struct ib_uverbs_post_recv {
630 __u64 response;
631 __u32 qp_handle;
632 __u32 wr_count;
633 __u32 sge_count;
634 __u32 wqe_size;
635 struct ib_uverbs_recv_wr recv_wr[0];
636};
637
638struct ib_uverbs_post_recv_resp {
639 __u32 bad_wr;
640};
641
642struct ib_uverbs_post_srq_recv {
643 __u64 response;
644 __u32 srq_handle;
645 __u32 wr_count;
646 __u32 sge_count;
647 __u32 wqe_size;
648 struct ib_uverbs_recv_wr recv[0];
649};
650
651struct ib_uverbs_post_srq_recv_resp {
652 __u32 bad_wr;
653};
654
Roland Dreier91ecd4a2005-10-14 15:21:44 -0700655struct ib_uverbs_create_ah {
656 __u64 response;
657 __u64 user_handle;
658 __u32 pd_handle;
659 __u32 reserved;
660 struct ib_uverbs_ah_attr attr;
661};
662
663struct ib_uverbs_create_ah_resp {
664 __u32 ah_handle;
665};
666
667struct ib_uverbs_destroy_ah {
668 __u32 ah_handle;
669};
670
Roland Dreier8a96b3f2005-07-07 17:57:12 -0700671struct ib_uverbs_attach_mcast {
672 __u8 gid[16];
673 __u32 qp_handle;
674 __u16 mlid;
675 __u16 reserved;
676 __u64 driver_data[0];
677};
678
679struct ib_uverbs_detach_mcast {
680 __u8 gid[16];
681 __u32 qp_handle;
682 __u16 mlid;
683 __u16 reserved;
684 __u64 driver_data[0];
685};
686
Roland Dreierf520ba52005-08-18 12:24:13 -0700687struct ib_uverbs_create_srq {
688 __u64 response;
689 __u64 user_handle;
690 __u32 pd_handle;
691 __u32 max_wr;
692 __u32 max_sge;
693 __u32 srq_limit;
694 __u64 driver_data[0];
695};
696
Sean Hefty8541f8d2011-05-25 17:08:38 -0700697struct ib_uverbs_create_xsrq {
698 __u64 response;
699 __u64 user_handle;
700 __u32 srq_type;
701 __u32 pd_handle;
702 __u32 max_wr;
703 __u32 max_sge;
704 __u32 srq_limit;
705 __u32 reserved;
706 __u32 xrcd_handle;
707 __u32 cq_handle;
708 __u64 driver_data[0];
709};
710
Roland Dreierf520ba52005-08-18 12:24:13 -0700711struct ib_uverbs_create_srq_resp {
712 __u32 srq_handle;
Dotan Barakea88fd12006-02-23 12:36:18 -0800713 __u32 max_wr;
714 __u32 max_sge;
Sean Hefty8541f8d2011-05-25 17:08:38 -0700715 __u32 srqn;
Roland Dreierf520ba52005-08-18 12:24:13 -0700716};
717
718struct ib_uverbs_modify_srq {
719 __u32 srq_handle;
720 __u32 attr_mask;
721 __u32 max_wr;
Roland Dreierf520ba52005-08-18 12:24:13 -0700722 __u32 srq_limit;
Roland Dreierf520ba52005-08-18 12:24:13 -0700723 __u64 driver_data[0];
724};
725
Dotan Barak8bdb0e82006-02-13 16:31:57 -0800726struct ib_uverbs_query_srq {
727 __u64 response;
728 __u32 srq_handle;
729 __u32 reserved;
730 __u64 driver_data[0];
731};
732
733struct ib_uverbs_query_srq_resp {
734 __u32 max_wr;
735 __u32 max_sge;
736 __u32 srq_limit;
737 __u32 reserved;
738};
739
Roland Dreierf520ba52005-08-18 12:24:13 -0700740struct ib_uverbs_destroy_srq {
Roland Dreier63aaf642005-09-09 15:55:08 -0700741 __u64 response;
Roland Dreierf520ba52005-08-18 12:24:13 -0700742 __u32 srq_handle;
Roland Dreier63aaf642005-09-09 15:55:08 -0700743 __u32 reserved;
744};
745
746struct ib_uverbs_destroy_srq_resp {
747 __u32 events_reported;
Roland Dreierf520ba52005-08-18 12:24:13 -0700748};
749
Roland Dreier8a96b3f2005-07-07 17:57:12 -0700750#endif /* IB_USER_VERBS_H */