1 /* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */
3 * Copyright (c) 2005 Topspin Communications. All rights reserved.
4 * Copyright (c) 2005, 2006 Cisco Systems. All rights reserved.
5 * Copyright (c) 2005 PathScale, Inc. All rights reserved.
6 * Copyright (c) 2006 Mellanox Technologies. All rights reserved.
8 * This software is available to you under a choice of one of two
9 * licenses. You may choose to be licensed under the terms of the GNU
10 * General Public License (GPL) Version 2, available from the file
11 * COPYING in the main directory of this source tree, or the
12 * OpenIB.org BSD license below:
14 * Redistribution and use in source and binary forms, with or
15 * without modification, are permitted provided that the following
18 * - Redistributions of source code must retain the above
19 * copyright notice, this list of conditions and the following
22 * - Redistributions in binary form must reproduce the above
23 * copyright notice, this list of conditions and the following
24 * disclaimer in the documentation and/or other materials
25 * provided with the distribution.
27 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
28 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
29 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
30 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
31 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
32 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
33 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
37 #ifndef IB_USER_VERBS_H
38 #define IB_USER_VERBS_H
40 #include <linux/types.h>
43 * Increment this value if any changes that break userspace ABI
44 * compatibility are made.
46 #define IB_USER_VERBS_ABI_VERSION 6
47 #define IB_USER_VERBS_CMD_THRESHOLD 50
49 enum ib_uverbs_write_cmds {
50 IB_USER_VERBS_CMD_GET_CONTEXT,
51 IB_USER_VERBS_CMD_QUERY_DEVICE,
52 IB_USER_VERBS_CMD_QUERY_PORT,
53 IB_USER_VERBS_CMD_ALLOC_PD,
54 IB_USER_VERBS_CMD_DEALLOC_PD,
55 IB_USER_VERBS_CMD_CREATE_AH,
56 IB_USER_VERBS_CMD_MODIFY_AH,
57 IB_USER_VERBS_CMD_QUERY_AH,
58 IB_USER_VERBS_CMD_DESTROY_AH,
59 IB_USER_VERBS_CMD_REG_MR,
60 IB_USER_VERBS_CMD_REG_SMR,
61 IB_USER_VERBS_CMD_REREG_MR,
62 IB_USER_VERBS_CMD_QUERY_MR,
63 IB_USER_VERBS_CMD_DEREG_MR,
64 IB_USER_VERBS_CMD_ALLOC_MW,
65 IB_USER_VERBS_CMD_BIND_MW,
66 IB_USER_VERBS_CMD_DEALLOC_MW,
67 IB_USER_VERBS_CMD_CREATE_COMP_CHANNEL,
68 IB_USER_VERBS_CMD_CREATE_CQ,
69 IB_USER_VERBS_CMD_RESIZE_CQ,
70 IB_USER_VERBS_CMD_DESTROY_CQ,
71 IB_USER_VERBS_CMD_POLL_CQ,
72 IB_USER_VERBS_CMD_PEEK_CQ,
73 IB_USER_VERBS_CMD_REQ_NOTIFY_CQ,
74 IB_USER_VERBS_CMD_CREATE_QP,
75 IB_USER_VERBS_CMD_QUERY_QP,
76 IB_USER_VERBS_CMD_MODIFY_QP,
77 IB_USER_VERBS_CMD_DESTROY_QP,
78 IB_USER_VERBS_CMD_POST_SEND,
79 IB_USER_VERBS_CMD_POST_RECV,
80 IB_USER_VERBS_CMD_ATTACH_MCAST,
81 IB_USER_VERBS_CMD_DETACH_MCAST,
82 IB_USER_VERBS_CMD_CREATE_SRQ,
83 IB_USER_VERBS_CMD_MODIFY_SRQ,
84 IB_USER_VERBS_CMD_QUERY_SRQ,
85 IB_USER_VERBS_CMD_DESTROY_SRQ,
86 IB_USER_VERBS_CMD_POST_SRQ_RECV,
87 IB_USER_VERBS_CMD_OPEN_XRCD,
88 IB_USER_VERBS_CMD_CLOSE_XRCD,
89 IB_USER_VERBS_CMD_CREATE_XSRQ,
90 IB_USER_VERBS_CMD_OPEN_QP,
94 IB_USER_VERBS_EX_CMD_QUERY_DEVICE = IB_USER_VERBS_CMD_QUERY_DEVICE,
95 IB_USER_VERBS_EX_CMD_CREATE_CQ = IB_USER_VERBS_CMD_CREATE_CQ,
96 IB_USER_VERBS_EX_CMD_CREATE_QP = IB_USER_VERBS_CMD_CREATE_QP,
97 IB_USER_VERBS_EX_CMD_MODIFY_QP = IB_USER_VERBS_CMD_MODIFY_QP,
98 IB_USER_VERBS_EX_CMD_CREATE_FLOW = IB_USER_VERBS_CMD_THRESHOLD,
99 IB_USER_VERBS_EX_CMD_DESTROY_FLOW,
100 IB_USER_VERBS_EX_CMD_CREATE_WQ,
101 IB_USER_VERBS_EX_CMD_MODIFY_WQ,
102 IB_USER_VERBS_EX_CMD_DESTROY_WQ,
103 IB_USER_VERBS_EX_CMD_CREATE_RWQ_IND_TBL,
104 IB_USER_VERBS_EX_CMD_DESTROY_RWQ_IND_TBL,
105 IB_USER_VERBS_EX_CMD_MODIFY_CQ
109 * Make sure that all structs defined in this file remain laid out so
110 * that they pack the same way on 32-bit and 64-bit architectures (to
111 * avoid incompatibility between 32-bit userspace and 64-bit kernels).
113 * - Do not use pointer types -- pass pointers in __u64 instead.
114 * - Make sure that any structure larger than 4 bytes is padded to a
115 * multiple of 8 bytes. Otherwise the structure size will be
116 * different between 32-bit and 64-bit architectures.
119 struct ib_uverbs_async_event_desc {
120 __aligned_u64 element;
121 __u32 event_type; /* enum ib_event_type */
125 struct ib_uverbs_comp_event_desc {
126 __aligned_u64 cq_handle;
129 struct ib_uverbs_cq_moderation_caps {
130 __u16 max_cq_moderation_count;
131 __u16 max_cq_moderation_period;
136 * All commands from userspace should start with a __u32 command field
137 * followed by __u16 in_words and out_words fields (which give the
138 * length of the command block and response buffer if any in 32-bit
139 * words). The kernel driver will read these fields first and read
140 * the rest of the command struct based on these value.
143 #define IB_USER_VERBS_CMD_COMMAND_MASK 0xff
144 #define IB_USER_VERBS_CMD_FLAG_EXTENDED 0x80000000u
146 struct ib_uverbs_cmd_hdr {
152 struct ib_uverbs_ex_cmd_hdr {
153 __aligned_u64 response;
154 __u16 provider_in_words;
155 __u16 provider_out_words;
156 __u32 cmd_hdr_reserved;
159 struct ib_uverbs_get_context {
160 __aligned_u64 response;
161 __aligned_u64 driver_data[0];
164 struct ib_uverbs_get_context_resp {
166 __u32 num_comp_vectors;
167 __aligned_u64 driver_data[0];
170 struct ib_uverbs_query_device {
171 __aligned_u64 response;
172 __aligned_u64 driver_data[0];
175 struct ib_uverbs_query_device_resp {
176 __aligned_u64 fw_ver;
178 __be64 sys_image_guid;
179 __aligned_u64 max_mr_size;
180 __aligned_u64 page_size_cap;
182 __u32 vendor_part_id;
186 __u32 device_cap_flags;
193 __u32 max_qp_rd_atom;
194 __u32 max_ee_rd_atom;
195 __u32 max_res_rd_atom;
196 __u32 max_qp_init_rd_atom;
197 __u32 max_ee_init_rd_atom;
202 __u32 max_raw_ipv6_qp;
203 __u32 max_raw_ethy_qp;
205 __u32 max_mcast_qp_attach;
206 __u32 max_total_mcast_qp_attach;
209 __u32 max_map_per_fmr;
214 __u8 local_ca_ack_delay;
219 struct ib_uverbs_ex_query_device {
224 struct ib_uverbs_odp_caps {
225 __aligned_u64 general_caps;
230 } per_transport_caps;
234 struct ib_uverbs_rss_caps {
235 /* Corresponding bit will be set if qp type from
236 * 'enum ib_qp_type' is supported, e.g.
237 * supported_qpts |= 1 << IB_QPT_UD
239 __u32 supported_qpts;
240 __u32 max_rwq_indirection_tables;
241 __u32 max_rwq_indirection_table_size;
245 struct ib_uverbs_tm_caps {
246 /* Max size of rendezvous request message */
247 __u32 max_rndv_hdr_size;
248 /* Max number of entries in tag matching list */
252 /* Max number of outstanding list operations */
254 /* Max number of SGE in tag matching entry */
259 struct ib_uverbs_ex_query_device_resp {
260 struct ib_uverbs_query_device_resp base;
262 __u32 response_length;
263 struct ib_uverbs_odp_caps odp_caps;
264 __aligned_u64 timestamp_mask;
265 __aligned_u64 hca_core_clock; /* in KHZ */
266 __aligned_u64 device_cap_flags_ex;
267 struct ib_uverbs_rss_caps rss_caps;
268 __u32 max_wq_type_rq;
269 __u32 raw_packet_caps;
270 struct ib_uverbs_tm_caps tm_caps;
271 struct ib_uverbs_cq_moderation_caps cq_moderation_caps;
272 __aligned_u64 max_dm_size;
277 struct ib_uverbs_query_port {
278 __aligned_u64 response;
281 __aligned_u64 driver_data[0];
284 struct ib_uverbs_query_port_resp {
285 __u32 port_cap_flags; /* see ib_uverbs_query_port_cap_flags */
288 __u32 qkey_viol_cntr;
300 __u8 init_type_reply;
305 __u8 flags; /* see ib_uverbs_query_port_flags */
309 struct ib_uverbs_alloc_pd {
310 __aligned_u64 response;
311 __aligned_u64 driver_data[0];
314 struct ib_uverbs_alloc_pd_resp {
316 __u32 driver_data[0];
319 struct ib_uverbs_dealloc_pd {
323 struct ib_uverbs_open_xrcd {
324 __aligned_u64 response;
327 __aligned_u64 driver_data[0];
330 struct ib_uverbs_open_xrcd_resp {
332 __u32 driver_data[0];
335 struct ib_uverbs_close_xrcd {
339 struct ib_uverbs_reg_mr {
340 __aligned_u64 response;
342 __aligned_u64 length;
343 __aligned_u64 hca_va;
346 __aligned_u64 driver_data[0];
349 struct ib_uverbs_reg_mr_resp {
353 __u32 driver_data[0];
356 struct ib_uverbs_rereg_mr {
357 __aligned_u64 response;
361 __aligned_u64 length;
362 __aligned_u64 hca_va;
365 __aligned_u64 driver_data[0];
368 struct ib_uverbs_rereg_mr_resp {
371 __aligned_u64 driver_data[0];
374 struct ib_uverbs_dereg_mr {
378 struct ib_uverbs_alloc_mw {
379 __aligned_u64 response;
383 __aligned_u64 driver_data[0];
386 struct ib_uverbs_alloc_mw_resp {
389 __aligned_u64 driver_data[0];
392 struct ib_uverbs_dealloc_mw {
396 struct ib_uverbs_create_comp_channel {
397 __aligned_u64 response;
400 struct ib_uverbs_create_comp_channel_resp {
404 struct ib_uverbs_create_cq {
405 __aligned_u64 response;
406 __aligned_u64 user_handle;
411 __aligned_u64 driver_data[0];
414 enum ib_uverbs_ex_create_cq_flags {
415 IB_UVERBS_CQ_FLAGS_TIMESTAMP_COMPLETION = 1 << 0,
416 IB_UVERBS_CQ_FLAGS_IGNORE_OVERRUN = 1 << 1,
419 struct ib_uverbs_ex_create_cq {
420 __aligned_u64 user_handle;
425 __u32 flags; /* bitmask of ib_uverbs_ex_create_cq_flags */
429 struct ib_uverbs_create_cq_resp {
432 __aligned_u64 driver_data[0];
435 struct ib_uverbs_ex_create_cq_resp {
436 struct ib_uverbs_create_cq_resp base;
438 __u32 response_length;
441 struct ib_uverbs_resize_cq {
442 __aligned_u64 response;
445 __aligned_u64 driver_data[0];
448 struct ib_uverbs_resize_cq_resp {
451 __aligned_u64 driver_data[0];
454 struct ib_uverbs_poll_cq {
455 __aligned_u64 response;
460 struct ib_uverbs_wc {
468 __u32 invalidate_rkey;
481 struct ib_uverbs_poll_cq_resp {
484 struct ib_uverbs_wc wc[0];
487 struct ib_uverbs_req_notify_cq {
489 __u32 solicited_only;
492 struct ib_uverbs_destroy_cq {
493 __aligned_u64 response;
498 struct ib_uverbs_destroy_cq_resp {
499 __u32 comp_events_reported;
500 __u32 async_events_reported;
503 struct ib_uverbs_global_route {
512 struct ib_uverbs_ah_attr {
513 struct ib_uverbs_global_route grh;
523 struct ib_uverbs_qp_attr {
528 __u32 path_mig_state;
533 __u32 qp_access_flags;
535 struct ib_uverbs_ah_attr ah_attr;
536 struct ib_uverbs_ah_attr alt_ah_attr;
543 __u32 max_inline_data;
546 __u16 alt_pkey_index;
547 __u8 en_sqd_async_notify;
550 __u8 max_dest_rd_atomic;
561 struct ib_uverbs_create_qp {
562 __aligned_u64 response;
563 __aligned_u64 user_handle;
565 __u32 send_cq_handle;
566 __u32 recv_cq_handle;
572 __u32 max_inline_data;
577 __aligned_u64 driver_data[0];
580 enum ib_uverbs_create_qp_mask {
581 IB_UVERBS_CREATE_QP_MASK_IND_TABLE = 1UL << 0,
585 IB_UVERBS_CREATE_QP_SUP_COMP_MASK = IB_UVERBS_CREATE_QP_MASK_IND_TABLE,
590 * This value is equal to IB_QP_DEST_QPN.
592 IB_USER_LEGACY_LAST_QP_ATTR_MASK = 1ULL << 20,
597 * This value is equal to IB_QP_RATE_LIMIT.
599 IB_USER_LAST_QP_ATTR_MASK = 1ULL << 25,
602 struct ib_uverbs_ex_create_qp {
603 __aligned_u64 user_handle;
605 __u32 send_cq_handle;
606 __u32 recv_cq_handle;
612 __u32 max_inline_data;
619 __u32 rwq_ind_tbl_handle;
623 struct ib_uverbs_open_qp {
624 __aligned_u64 response;
625 __aligned_u64 user_handle;
630 __aligned_u64 driver_data[0];
633 /* also used for open response */
634 struct ib_uverbs_create_qp_resp {
641 __u32 max_inline_data;
643 __u32 driver_data[0];
646 struct ib_uverbs_ex_create_qp_resp {
647 struct ib_uverbs_create_qp_resp base;
649 __u32 response_length;
653 * This struct needs to remain a multiple of 8 bytes to keep the
654 * alignment of the modify QP parameters.
656 struct ib_uverbs_qp_dest {
671 struct ib_uverbs_query_qp {
672 __aligned_u64 response;
675 __aligned_u64 driver_data[0];
678 struct ib_uverbs_query_qp_resp {
679 struct ib_uverbs_qp_dest dest;
680 struct ib_uverbs_qp_dest alt_dest;
685 __u32 max_inline_data;
690 __u32 qp_access_flags;
692 __u16 alt_pkey_index;
699 __u8 max_dest_rd_atomic;
709 __aligned_u64 driver_data[0];
712 struct ib_uverbs_modify_qp {
713 struct ib_uverbs_qp_dest dest;
714 struct ib_uverbs_qp_dest alt_dest;
721 __u32 qp_access_flags;
723 __u16 alt_pkey_index;
728 __u8 en_sqd_async_notify;
730 __u8 max_dest_rd_atomic;
739 __aligned_u64 driver_data[0];
742 struct ib_uverbs_ex_modify_qp {
743 struct ib_uverbs_modify_qp base;
748 struct ib_uverbs_ex_modify_qp_resp {
750 __u32 response_length;
753 struct ib_uverbs_destroy_qp {
754 __aligned_u64 response;
759 struct ib_uverbs_destroy_qp_resp {
760 __u32 events_reported;
764 * The ib_uverbs_sge structure isn't used anywhere, since we assume
765 * the ib_sge structure is packed the same way on 32-bit and 64-bit
766 * architectures in both kernel and user space. It's just here to
769 struct ib_uverbs_sge {
775 enum ib_uverbs_wr_opcode {
776 IB_UVERBS_WR_RDMA_WRITE = 0,
777 IB_UVERBS_WR_RDMA_WRITE_WITH_IMM = 1,
778 IB_UVERBS_WR_SEND = 2,
779 IB_UVERBS_WR_SEND_WITH_IMM = 3,
780 IB_UVERBS_WR_RDMA_READ = 4,
781 IB_UVERBS_WR_ATOMIC_CMP_AND_SWP = 5,
782 IB_UVERBS_WR_ATOMIC_FETCH_AND_ADD = 6,
783 IB_UVERBS_WR_LOCAL_INV = 7,
784 IB_UVERBS_WR_BIND_MW = 8,
785 IB_UVERBS_WR_SEND_WITH_INV = 9,
786 IB_UVERBS_WR_TSO = 10,
787 IB_UVERBS_WR_RDMA_READ_WITH_INV = 11,
788 IB_UVERBS_WR_MASKED_ATOMIC_CMP_AND_SWP = 12,
789 IB_UVERBS_WR_MASKED_ATOMIC_FETCH_AND_ADD = 13,
790 /* Review enum ib_wr_opcode before modifying this */
793 struct ib_uverbs_send_wr {
796 __u32 opcode; /* see enum ib_uverbs_wr_opcode */
800 __u32 invalidate_rkey;
804 __aligned_u64 remote_addr;
809 __aligned_u64 remote_addr;
810 __aligned_u64 compare_add;
824 struct ib_uverbs_post_send {
825 __aligned_u64 response;
830 struct ib_uverbs_send_wr send_wr[0];
833 struct ib_uverbs_post_send_resp {
837 struct ib_uverbs_recv_wr {
843 struct ib_uverbs_post_recv {
844 __aligned_u64 response;
849 struct ib_uverbs_recv_wr recv_wr[0];
852 struct ib_uverbs_post_recv_resp {
856 struct ib_uverbs_post_srq_recv {
857 __aligned_u64 response;
862 struct ib_uverbs_recv_wr recv[0];
865 struct ib_uverbs_post_srq_recv_resp {
869 struct ib_uverbs_create_ah {
870 __aligned_u64 response;
871 __aligned_u64 user_handle;
874 struct ib_uverbs_ah_attr attr;
875 __aligned_u64 driver_data[0];
878 struct ib_uverbs_create_ah_resp {
880 __u32 driver_data[0];
883 struct ib_uverbs_destroy_ah {
887 struct ib_uverbs_attach_mcast {
892 __aligned_u64 driver_data[0];
895 struct ib_uverbs_detach_mcast {
900 __aligned_u64 driver_data[0];
903 struct ib_uverbs_flow_spec_hdr {
907 /* followed by flow_spec */
908 __aligned_u64 flow_spec_data[0];
911 struct ib_uverbs_flow_eth_filter {
918 struct ib_uverbs_flow_spec_eth {
920 struct ib_uverbs_flow_spec_hdr hdr;
927 struct ib_uverbs_flow_eth_filter val;
928 struct ib_uverbs_flow_eth_filter mask;
931 struct ib_uverbs_flow_ipv4_filter {
940 struct ib_uverbs_flow_spec_ipv4 {
942 struct ib_uverbs_flow_spec_hdr hdr;
949 struct ib_uverbs_flow_ipv4_filter val;
950 struct ib_uverbs_flow_ipv4_filter mask;
953 struct ib_uverbs_flow_tcp_udp_filter {
958 struct ib_uverbs_flow_spec_tcp_udp {
960 struct ib_uverbs_flow_spec_hdr hdr;
967 struct ib_uverbs_flow_tcp_udp_filter val;
968 struct ib_uverbs_flow_tcp_udp_filter mask;
971 struct ib_uverbs_flow_ipv6_filter {
981 struct ib_uverbs_flow_spec_ipv6 {
983 struct ib_uverbs_flow_spec_hdr hdr;
990 struct ib_uverbs_flow_ipv6_filter val;
991 struct ib_uverbs_flow_ipv6_filter mask;
994 struct ib_uverbs_flow_spec_action_tag {
996 struct ib_uverbs_flow_spec_hdr hdr;
1007 struct ib_uverbs_flow_spec_action_drop {
1009 struct ib_uverbs_flow_spec_hdr hdr;
1018 struct ib_uverbs_flow_spec_action_handle {
1020 struct ib_uverbs_flow_spec_hdr hdr;
1031 struct ib_uverbs_flow_spec_action_count {
1033 struct ib_uverbs_flow_spec_hdr hdr;
1044 struct ib_uverbs_flow_tunnel_filter {
1048 struct ib_uverbs_flow_spec_tunnel {
1050 struct ib_uverbs_flow_spec_hdr hdr;
1057 struct ib_uverbs_flow_tunnel_filter val;
1058 struct ib_uverbs_flow_tunnel_filter mask;
1061 struct ib_uverbs_flow_spec_esp_filter {
1066 struct ib_uverbs_flow_spec_esp {
1068 struct ib_uverbs_flow_spec_hdr hdr;
1075 struct ib_uverbs_flow_spec_esp_filter val;
1076 struct ib_uverbs_flow_spec_esp_filter mask;
1079 struct ib_uverbs_flow_gre_filter {
1080 /* c_ks_res0_ver field is bits 0-15 in offset 0 of a standard GRE header:
1081 * bit 0 - C - checksum bit.
1082 * bit 1 - reserved. set to 0.
1084 * bit 3 - sequence number bit.
1085 * bits 4:12 - reserved. set to 0.
1086 * bits 13:15 - GRE version.
1088 __be16 c_ks_res0_ver;
1093 struct ib_uverbs_flow_spec_gre {
1095 struct ib_uverbs_flow_spec_hdr hdr;
1102 struct ib_uverbs_flow_gre_filter val;
1103 struct ib_uverbs_flow_gre_filter mask;
1106 struct ib_uverbs_flow_mpls_filter {
1107 /* The field includes the entire MPLS label:
1108 * bits 0:19 - label field.
1109 * bits 20:22 - traffic class field.
1110 * bits 23 - bottom of stack bit.
1111 * bits 24:31 - ttl field.
1116 struct ib_uverbs_flow_spec_mpls {
1118 struct ib_uverbs_flow_spec_hdr hdr;
1125 struct ib_uverbs_flow_mpls_filter val;
1126 struct ib_uverbs_flow_mpls_filter mask;
1129 struct ib_uverbs_flow_attr {
1137 /* Following are the optional layers according to user request
1138 * struct ib_flow_spec_xxx
1139 * struct ib_flow_spec_yyy
1141 struct ib_uverbs_flow_spec_hdr flow_specs[0];
1144 struct ib_uverbs_create_flow {
1147 struct ib_uverbs_flow_attr flow_attr;
1150 struct ib_uverbs_create_flow_resp {
1155 struct ib_uverbs_destroy_flow {
1160 struct ib_uverbs_create_srq {
1161 __aligned_u64 response;
1162 __aligned_u64 user_handle;
1167 __aligned_u64 driver_data[0];
1170 struct ib_uverbs_create_xsrq {
1171 __aligned_u64 response;
1172 __aligned_u64 user_handle;
1181 __aligned_u64 driver_data[0];
1184 struct ib_uverbs_create_srq_resp {
1189 __u32 driver_data[0];
1192 struct ib_uverbs_modify_srq {
1197 __aligned_u64 driver_data[0];
1200 struct ib_uverbs_query_srq {
1201 __aligned_u64 response;
1204 __aligned_u64 driver_data[0];
1207 struct ib_uverbs_query_srq_resp {
1214 struct ib_uverbs_destroy_srq {
1215 __aligned_u64 response;
1220 struct ib_uverbs_destroy_srq_resp {
1221 __u32 events_reported;
1224 struct ib_uverbs_ex_create_wq {
1227 __aligned_u64 user_handle;
1232 __u32 create_flags; /* Use enum ib_wq_flags */
1236 struct ib_uverbs_ex_create_wq_resp {
1238 __u32 response_length;
1245 struct ib_uverbs_ex_destroy_wq {
1250 struct ib_uverbs_ex_destroy_wq_resp {
1252 __u32 response_length;
1253 __u32 events_reported;
1257 struct ib_uverbs_ex_modify_wq {
1261 __u32 curr_wq_state;
1262 __u32 flags; /* Use enum ib_wq_flags */
1263 __u32 flags_mask; /* Use enum ib_wq_flags */
1266 /* Prevent memory allocation rather than max expected size */
1267 #define IB_USER_VERBS_MAX_LOG_IND_TBL_SIZE 0x0d
1268 struct ib_uverbs_ex_create_rwq_ind_table {
1270 __u32 log_ind_tbl_size;
1271 /* Following are the wq handles according to log_ind_tbl_size
1275 __u32 wq_handles[0];
1278 struct ib_uverbs_ex_create_rwq_ind_table_resp {
1280 __u32 response_length;
1281 __u32 ind_tbl_handle;
1285 struct ib_uverbs_ex_destroy_rwq_ind_table {
1287 __u32 ind_tbl_handle;
1290 struct ib_uverbs_cq_moderation {
1295 struct ib_uverbs_ex_modify_cq {
1298 struct ib_uverbs_cq_moderation attr;
1302 #define IB_DEVICE_NAME_MAX 64
1304 #endif /* IB_USER_VERBS_H */