blob: ff3ebcb57c2c7395dd93218c6490d5dd60557715 [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
10 *** To edit the content of this header, modify the corresponding
11 *** source file (e.g. under external/kernel-headers/original/) then
12 *** run bionic/libc/kernel/tools/update_all.py
13 ***
14 *** Any manual change here will be lost the next time this script will
15 *** be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef IB_USER_VERBS_H
20#define IB_USER_VERBS_H
21#include <linux/types.h>
22#define IB_USER_VERBS_ABI_VERSION 6
Christopher Ferris38062f92014-07-09 15:33:25 -070023#define IB_USER_VERBS_CMD_THRESHOLD 50
Ben Cheng655a7c02013-10-16 16:09:24 -070024enum {
Tao Baod7db5942015-01-28 10:07:51 -080025 IB_USER_VERBS_CMD_GET_CONTEXT,
26 IB_USER_VERBS_CMD_QUERY_DEVICE,
Tao Baod7db5942015-01-28 10:07:51 -080027 IB_USER_VERBS_CMD_QUERY_PORT,
28 IB_USER_VERBS_CMD_ALLOC_PD,
29 IB_USER_VERBS_CMD_DEALLOC_PD,
30 IB_USER_VERBS_CMD_CREATE_AH,
Tao Baod7db5942015-01-28 10:07:51 -080031 IB_USER_VERBS_CMD_MODIFY_AH,
32 IB_USER_VERBS_CMD_QUERY_AH,
33 IB_USER_VERBS_CMD_DESTROY_AH,
34 IB_USER_VERBS_CMD_REG_MR,
Tao Baod7db5942015-01-28 10:07:51 -080035 IB_USER_VERBS_CMD_REG_SMR,
36 IB_USER_VERBS_CMD_REREG_MR,
37 IB_USER_VERBS_CMD_QUERY_MR,
38 IB_USER_VERBS_CMD_DEREG_MR,
Tao Baod7db5942015-01-28 10:07:51 -080039 IB_USER_VERBS_CMD_ALLOC_MW,
40 IB_USER_VERBS_CMD_BIND_MW,
41 IB_USER_VERBS_CMD_DEALLOC_MW,
42 IB_USER_VERBS_CMD_CREATE_COMP_CHANNEL,
Tao Baod7db5942015-01-28 10:07:51 -080043 IB_USER_VERBS_CMD_CREATE_CQ,
44 IB_USER_VERBS_CMD_RESIZE_CQ,
45 IB_USER_VERBS_CMD_DESTROY_CQ,
46 IB_USER_VERBS_CMD_POLL_CQ,
Tao Baod7db5942015-01-28 10:07:51 -080047 IB_USER_VERBS_CMD_PEEK_CQ,
48 IB_USER_VERBS_CMD_REQ_NOTIFY_CQ,
49 IB_USER_VERBS_CMD_CREATE_QP,
50 IB_USER_VERBS_CMD_QUERY_QP,
Tao Baod7db5942015-01-28 10:07:51 -080051 IB_USER_VERBS_CMD_MODIFY_QP,
52 IB_USER_VERBS_CMD_DESTROY_QP,
53 IB_USER_VERBS_CMD_POST_SEND,
54 IB_USER_VERBS_CMD_POST_RECV,
Tao Baod7db5942015-01-28 10:07:51 -080055 IB_USER_VERBS_CMD_ATTACH_MCAST,
56 IB_USER_VERBS_CMD_DETACH_MCAST,
57 IB_USER_VERBS_CMD_CREATE_SRQ,
58 IB_USER_VERBS_CMD_MODIFY_SRQ,
Tao Baod7db5942015-01-28 10:07:51 -080059 IB_USER_VERBS_CMD_QUERY_SRQ,
60 IB_USER_VERBS_CMD_DESTROY_SRQ,
61 IB_USER_VERBS_CMD_POST_SRQ_RECV,
62 IB_USER_VERBS_CMD_OPEN_XRCD,
Tao Baod7db5942015-01-28 10:07:51 -080063 IB_USER_VERBS_CMD_CLOSE_XRCD,
64 IB_USER_VERBS_CMD_CREATE_XSRQ,
65 IB_USER_VERBS_CMD_OPEN_QP,
Ben Cheng655a7c02013-10-16 16:09:24 -070066};
Christopher Ferris38062f92014-07-09 15:33:25 -070067enum {
Christopher Ferris05d08e92016-02-04 13:16:38 -080068 IB_USER_VERBS_EX_CMD_QUERY_DEVICE = IB_USER_VERBS_CMD_QUERY_DEVICE,
69 IB_USER_VERBS_EX_CMD_CREATE_CQ = IB_USER_VERBS_CMD_CREATE_CQ,
70 IB_USER_VERBS_EX_CMD_CREATE_QP = IB_USER_VERBS_CMD_CREATE_QP,
Christopher Ferris48af7cb2017-02-21 12:35:09 -080071 IB_USER_VERBS_EX_CMD_MODIFY_QP = IB_USER_VERBS_CMD_MODIFY_QP,
Christopher Ferris05d08e92016-02-04 13:16:38 -080072 IB_USER_VERBS_EX_CMD_CREATE_FLOW = IB_USER_VERBS_CMD_THRESHOLD,
73 IB_USER_VERBS_EX_CMD_DESTROY_FLOW,
Christopher Ferris49f525c2016-12-12 14:55:36 -080074 IB_USER_VERBS_EX_CMD_CREATE_WQ,
Christopher Ferris48af7cb2017-02-21 12:35:09 -080075 IB_USER_VERBS_EX_CMD_MODIFY_WQ,
Christopher Ferris49f525c2016-12-12 14:55:36 -080076 IB_USER_VERBS_EX_CMD_DESTROY_WQ,
77 IB_USER_VERBS_EX_CMD_CREATE_RWQ_IND_TBL,
78 IB_USER_VERBS_EX_CMD_DESTROY_RWQ_IND_TBL
Christopher Ferris48af7cb2017-02-21 12:35:09 -080079};
Christopher Ferris49f525c2016-12-12 14:55:36 -080080struct ib_uverbs_async_event_desc {
Tao Baod7db5942015-01-28 10:07:51 -080081 __u64 element;
82 __u32 event_type;
Christopher Ferris48af7cb2017-02-21 12:35:09 -080083 __u32 reserved;
Christopher Ferris49f525c2016-12-12 14:55:36 -080084};
Ben Cheng655a7c02013-10-16 16:09:24 -070085struct ib_uverbs_comp_event_desc {
Tao Baod7db5942015-01-28 10:07:51 -080086 __u64 cq_handle;
Christopher Ferris48af7cb2017-02-21 12:35:09 -080087};
Christopher Ferris49f525c2016-12-12 14:55:36 -080088#define IB_USER_VERBS_CMD_COMMAND_MASK 0xff
Christopher Ferris38062f92014-07-09 15:33:25 -070089#define IB_USER_VERBS_CMD_FLAGS_MASK 0xff000000u
90#define IB_USER_VERBS_CMD_FLAGS_SHIFT 24
Christopher Ferris48af7cb2017-02-21 12:35:09 -080091#define IB_USER_VERBS_CMD_FLAG_EXTENDED 0x80
Christopher Ferris49f525c2016-12-12 14:55:36 -080092struct ib_uverbs_cmd_hdr {
Tao Baod7db5942015-01-28 10:07:51 -080093 __u32 command;
94 __u16 in_words;
Christopher Ferris48af7cb2017-02-21 12:35:09 -080095 __u16 out_words;
Christopher Ferris49f525c2016-12-12 14:55:36 -080096};
Christopher Ferris38062f92014-07-09 15:33:25 -070097struct ib_uverbs_ex_cmd_hdr {
Tao Baod7db5942015-01-28 10:07:51 -080098 __u64 response;
Christopher Ferris48af7cb2017-02-21 12:35:09 -080099 __u16 provider_in_words;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800100 __u16 provider_out_words;
Tao Baod7db5942015-01-28 10:07:51 -0800101 __u32 cmd_hdr_reserved;
Christopher Ferris38062f92014-07-09 15:33:25 -0700102};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800103struct ib_uverbs_get_context {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800104 __u64 response;
Tao Baod7db5942015-01-28 10:07:51 -0800105 __u64 driver_data[0];
Ben Cheng655a7c02013-10-16 16:09:24 -0700106};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800107struct ib_uverbs_get_context_resp {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800108 __u32 async_fd;
Tao Baod7db5942015-01-28 10:07:51 -0800109 __u32 num_comp_vectors;
Ben Cheng655a7c02013-10-16 16:09:24 -0700110};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800111struct ib_uverbs_query_device {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800112 __u64 response;
Tao Baod7db5942015-01-28 10:07:51 -0800113 __u64 driver_data[0];
Ben Cheng655a7c02013-10-16 16:09:24 -0700114};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800115struct ib_uverbs_query_device_resp {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800116 __u64 fw_ver;
Tao Baod7db5942015-01-28 10:07:51 -0800117 __be64 node_guid;
118 __be64 sys_image_guid;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800119 __u64 max_mr_size;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800120 __u64 page_size_cap;
Tao Baod7db5942015-01-28 10:07:51 -0800121 __u32 vendor_id;
122 __u32 vendor_part_id;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800123 __u32 hw_ver;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800124 __u32 max_qp;
Tao Baod7db5942015-01-28 10:07:51 -0800125 __u32 max_qp_wr;
126 __u32 device_cap_flags;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800127 __u32 max_sge;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800128 __u32 max_sge_rd;
Tao Baod7db5942015-01-28 10:07:51 -0800129 __u32 max_cq;
130 __u32 max_cqe;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800131 __u32 max_mr;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800132 __u32 max_pd;
Tao Baod7db5942015-01-28 10:07:51 -0800133 __u32 max_qp_rd_atom;
134 __u32 max_ee_rd_atom;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800135 __u32 max_res_rd_atom;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800136 __u32 max_qp_init_rd_atom;
Tao Baod7db5942015-01-28 10:07:51 -0800137 __u32 max_ee_init_rd_atom;
138 __u32 atomic_cap;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800139 __u32 max_ee;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800140 __u32 max_rdd;
Tao Baod7db5942015-01-28 10:07:51 -0800141 __u32 max_mw;
142 __u32 max_raw_ipv6_qp;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800143 __u32 max_raw_ethy_qp;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800144 __u32 max_mcast_grp;
Tao Baod7db5942015-01-28 10:07:51 -0800145 __u32 max_mcast_qp_attach;
146 __u32 max_total_mcast_qp_attach;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800147 __u32 max_ah;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800148 __u32 max_fmr;
Tao Baod7db5942015-01-28 10:07:51 -0800149 __u32 max_map_per_fmr;
150 __u32 max_srq;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800151 __u32 max_srq_wr;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800152 __u32 max_srq_sge;
Tao Baod7db5942015-01-28 10:07:51 -0800153 __u16 max_pkeys;
154 __u8 local_ca_ack_delay;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800155 __u8 phys_port_cnt;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800156 __u8 reserved[4];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800157};
158struct ib_uverbs_ex_query_device {
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800159 __u32 comp_mask;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800160 __u32 reserved;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800161};
162struct ib_uverbs_odp_caps {
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800163 __u64 general_caps;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800164 struct {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800165 __u32 rc_odp_caps;
166 __u32 uc_odp_caps;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800167 __u32 ud_odp_caps;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800168 } per_transport_caps;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800169 __u32 reserved;
170};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800171struct ib_uverbs_rss_caps {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800172 __u32 supported_qpts;
173 __u32 max_rwq_indirection_tables;
174 __u32 max_rwq_indirection_table_size;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800175 __u32 reserved;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800176};
Christopher Ferris1308ad32017-11-14 17:32:13 -0800177struct ib_uverbs_tm_caps {
178 __u32 max_rndv_hdr_size;
179 __u32 max_num_tags;
180 __u32 flags;
181 __u32 max_ops;
182 __u32 max_sge;
183 __u32 reserved;
184};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800185struct ib_uverbs_ex_query_device_resp {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800186 struct ib_uverbs_query_device_resp base;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800187 __u32 comp_mask;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800188 __u32 response_length;
189 struct ib_uverbs_odp_caps odp_caps;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800190 __u64 timestamp_mask;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800191 __u64 hca_core_clock;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800192 __u64 device_cap_flags_ex;
193 struct ib_uverbs_rss_caps rss_caps;
194 __u32 max_wq_type_rq;
Christopher Ferris525ce912017-07-26 13:12:53 -0700195 __u32 raw_packet_caps;
Christopher Ferris1308ad32017-11-14 17:32:13 -0800196 struct ib_uverbs_tm_caps tm_caps;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800197};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800198struct ib_uverbs_query_port {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700199 __u64 response;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800200 __u8 port_num;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800201 __u8 reserved[7];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800202 __u64 driver_data[0];
Christopher Ferris106b3a82016-08-24 12:15:38 -0700203};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800204struct ib_uverbs_query_port_resp {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800205 __u32 port_cap_flags;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800206 __u32 max_msg_sz;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700207 __u32 bad_pkey_cntr;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800208 __u32 qkey_viol_cntr;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800209 __u32 gid_tbl_len;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800210 __u16 pkey_tbl_len;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700211 __u16 lid;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800212 __u16 sm_lid;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800213 __u8 state;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800214 __u8 max_mtu;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700215 __u8 active_mtu;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800216 __u8 lmc;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800217 __u8 max_vl_num;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800218 __u8 sm_sl;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700219 __u8 subnet_timeout;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800220 __u8 init_type_reply;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800221 __u8 active_width;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800222 __u8 active_speed;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700223 __u8 phys_state;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800224 __u8 link_layer;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800225 __u8 reserved[2];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800226};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700227struct ib_uverbs_alloc_pd {
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800228 __u64 response;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800229 __u64 driver_data[0];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800230};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700231struct ib_uverbs_alloc_pd_resp {
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800232 __u32 pd_handle;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800233};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800234struct ib_uverbs_dealloc_pd {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700235 __u32 pd_handle;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800236};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800237struct ib_uverbs_open_xrcd {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800238 __u64 response;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700239 __u32 fd;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800240 __u32 oflags;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800241 __u64 driver_data[0];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800242};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700243struct ib_uverbs_open_xrcd_resp {
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800244 __u32 xrcd_handle;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800245};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800246struct ib_uverbs_close_xrcd {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700247 __u32 xrcd_handle;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800248};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800249struct ib_uverbs_reg_mr {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800250 __u64 response;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700251 __u64 start;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800252 __u64 length;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800253 __u64 hca_va;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800254 __u32 pd_handle;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700255 __u32 access_flags;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800256 __u64 driver_data[0];
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800257};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800258struct ib_uverbs_reg_mr_resp {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700259 __u32 mr_handle;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800260 __u32 lkey;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800261 __u32 rkey;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800262};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700263struct ib_uverbs_rereg_mr {
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800264 __u64 response;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800265 __u32 mr_handle;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800266 __u32 flags;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700267 __u64 start;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800268 __u64 length;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800269 __u64 hca_va;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800270 __u32 pd_handle;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700271 __u32 access_flags;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800272};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800273struct ib_uverbs_rereg_mr_resp {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800274 __u32 lkey;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700275 __u32 rkey;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800276};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800277struct ib_uverbs_dereg_mr {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800278 __u32 mr_handle;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700279};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800280struct ib_uverbs_alloc_mw {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800281 __u64 response;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800282 __u32 pd_handle;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700283 __u8 mw_type;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800284 __u8 reserved[3];
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800285};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800286struct ib_uverbs_alloc_mw_resp {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700287 __u32 mw_handle;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800288 __u32 rkey;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800289};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800290struct ib_uverbs_dealloc_mw {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700291 __u32 mw_handle;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800292};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800293struct ib_uverbs_create_comp_channel {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800294 __u64 response;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700295};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800296struct ib_uverbs_create_comp_channel_resp {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800297 __u32 fd;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800298};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700299struct ib_uverbs_create_cq {
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800300 __u64 response;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800301 __u64 user_handle;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800302 __u32 cqe;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700303 __u32 comp_vector;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800304 __s32 comp_channel;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800305 __u32 reserved;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800306 __u64 driver_data[0];
Christopher Ferris106b3a82016-08-24 12:15:38 -0700307};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800308struct ib_uverbs_ex_create_cq {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800309 __u64 user_handle;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800310 __u32 cqe;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700311 __u32 comp_vector;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800312 __s32 comp_channel;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800313 __u32 comp_mask;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800314 __u32 flags;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700315 __u32 reserved;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800316};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800317struct ib_uverbs_create_cq_resp {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800318 __u32 cq_handle;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700319 __u32 cqe;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800320};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800321struct ib_uverbs_ex_create_cq_resp {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800322 struct ib_uverbs_create_cq_resp base;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700323 __u32 comp_mask;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800324 __u32 response_length;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800325};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800326struct ib_uverbs_resize_cq {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700327 __u64 response;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800328 __u32 cq_handle;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800329 __u32 cqe;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800330 __u64 driver_data[0];
Christopher Ferris106b3a82016-08-24 12:15:38 -0700331};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800332struct ib_uverbs_resize_cq_resp {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800333 __u32 cqe;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800334 __u32 reserved;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700335 __u64 driver_data[0];
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800336};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800337struct ib_uverbs_poll_cq {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800338 __u64 response;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700339 __u32 cq_handle;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800340 __u32 ne;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800341};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800342struct ib_uverbs_wc {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700343 __u64 wr_id;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800344 __u32 status;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800345 __u32 opcode;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800346 __u32 vendor_err;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700347 __u32 byte_len;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800348 union {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800349 __u32 imm_data;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800350 __u32 invalidate_rkey;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700351 } ex;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800352 __u32 qp_num;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800353 __u32 src_qp;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800354 __u32 wc_flags;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700355 __u16 pkey_index;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800356 __u16 slid;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800357 __u8 sl;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800358 __u8 dlid_path_bits;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700359 __u8 port_num;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800360 __u8 reserved;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800361};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800362struct ib_uverbs_poll_cq_resp {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700363 __u32 count;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800364 __u32 reserved;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800365 struct ib_uverbs_wc wc[0];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800366};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700367struct ib_uverbs_req_notify_cq {
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800368 __u32 cq_handle;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800369 __u32 solicited_only;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800370};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700371struct ib_uverbs_destroy_cq {
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800372 __u64 response;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800373 __u32 cq_handle;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800374 __u32 reserved;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700375};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800376struct ib_uverbs_destroy_cq_resp {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800377 __u32 comp_events_reported;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800378 __u32 async_events_reported;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700379};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800380struct ib_uverbs_global_route {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800381 __u8 dgid[16];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800382 __u32 flow_label;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700383 __u8 sgid_index;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800384 __u8 hop_limit;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800385 __u8 traffic_class;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800386 __u8 reserved;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700387};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800388struct ib_uverbs_ah_attr {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800389 struct ib_uverbs_global_route grh;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800390 __u16 dlid;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700391 __u8 sl;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800392 __u8 src_path_bits;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800393 __u8 static_rate;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800394 __u8 is_global;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700395 __u8 port_num;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800396 __u8 reserved;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800397};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800398struct ib_uverbs_qp_attr {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700399 __u32 qp_attr_mask;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800400 __u32 qp_state;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800401 __u32 cur_qp_state;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800402 __u32 path_mtu;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700403 __u32 path_mig_state;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800404 __u32 qkey;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800405 __u32 rq_psn;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800406 __u32 sq_psn;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700407 __u32 dest_qp_num;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800408 __u32 qp_access_flags;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800409 struct ib_uverbs_ah_attr ah_attr;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800410 struct ib_uverbs_ah_attr alt_ah_attr;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700411 __u32 max_send_wr;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800412 __u32 max_recv_wr;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800413 __u32 max_send_sge;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800414 __u32 max_recv_sge;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700415 __u32 max_inline_data;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800416 __u16 pkey_index;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800417 __u16 alt_pkey_index;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800418 __u8 en_sqd_async_notify;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700419 __u8 sq_draining;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800420 __u8 max_rd_atomic;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800421 __u8 max_dest_rd_atomic;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800422 __u8 min_rnr_timer;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700423 __u8 port_num;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800424 __u8 timeout;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800425 __u8 retry_cnt;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800426 __u8 rnr_retry;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700427 __u8 alt_port_num;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800428 __u8 alt_timeout;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800429 __u8 reserved[5];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800430};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700431struct ib_uverbs_create_qp {
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800432 __u64 response;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800433 __u64 user_handle;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800434 __u32 pd_handle;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700435 __u32 send_cq_handle;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800436 __u32 recv_cq_handle;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800437 __u32 srq_handle;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800438 __u32 max_send_wr;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700439 __u32 max_recv_wr;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800440 __u32 max_send_sge;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800441 __u32 max_recv_sge;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800442 __u32 max_inline_data;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700443 __u8 sq_sig_all;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800444 __u8 qp_type;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800445 __u8 is_srq;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800446 __u8 reserved;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700447 __u64 driver_data[0];
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800448};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800449enum ib_uverbs_create_qp_mask {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800450 IB_UVERBS_CREATE_QP_MASK_IND_TABLE = 1UL << 0,
451};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800452enum {
453 IB_UVERBS_CREATE_QP_SUP_COMP_MASK = IB_UVERBS_CREATE_QP_MASK_IND_TABLE,
454};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800455enum {
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800456 IB_USER_LEGACY_LAST_QP_ATTR_MASK = 1ULL << 20,
457};
458enum {
459 IB_USER_LAST_QP_ATTR_MASK = 1ULL << 25,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800460};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800461struct ib_uverbs_ex_create_qp {
462 __u64 user_handle;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800463 __u32 pd_handle;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800464 __u32 send_cq_handle;
Tao Baod7db5942015-01-28 10:07:51 -0800465 __u32 recv_cq_handle;
466 __u32 srq_handle;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800467 __u32 max_send_wr;
Tao Baod7db5942015-01-28 10:07:51 -0800468 __u32 max_recv_wr;
469 __u32 max_send_sge;
470 __u32 max_recv_sge;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800471 __u32 max_inline_data;
Tao Baod7db5942015-01-28 10:07:51 -0800472 __u8 sq_sig_all;
473 __u8 qp_type;
474 __u8 is_srq;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800475 __u8 reserved;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800476 __u32 comp_mask;
477 __u32 create_flags;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800478 __u32 rwq_ind_tbl_handle;
Christopher Ferris1308ad32017-11-14 17:32:13 -0800479 __u32 source_qpn;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800480};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700481struct ib_uverbs_open_qp {
Tao Baod7db5942015-01-28 10:07:51 -0800482 __u64 response;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800483 __u64 user_handle;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800484 __u32 pd_handle;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700485 __u32 qpn;
Tao Baod7db5942015-01-28 10:07:51 -0800486 __u8 qp_type;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800487 __u8 reserved[7];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800488 __u64 driver_data[0];
Christopher Ferris106b3a82016-08-24 12:15:38 -0700489};
Ben Cheng655a7c02013-10-16 16:09:24 -0700490struct ib_uverbs_create_qp_resp {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800491 __u32 qp_handle;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800492 __u32 qpn;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700493 __u32 max_send_wr;
Tao Baod7db5942015-01-28 10:07:51 -0800494 __u32 max_recv_wr;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800495 __u32 max_send_sge;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800496 __u32 max_recv_sge;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700497 __u32 max_inline_data;
Tao Baod7db5942015-01-28 10:07:51 -0800498 __u32 reserved;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800499};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800500struct ib_uverbs_ex_create_qp_resp {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700501 struct ib_uverbs_create_qp_resp base;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800502 __u32 comp_mask;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800503 __u32 response_length;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800504};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700505struct ib_uverbs_qp_dest {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800506 __u8 dgid[16];
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800507 __u32 flow_label;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800508 __u16 dlid;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700509 __u16 reserved;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800510 __u8 sgid_index;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800511 __u8 hop_limit;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800512 __u8 traffic_class;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700513 __u8 sl;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800514 __u8 src_path_bits;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800515 __u8 static_rate;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800516 __u8 is_global;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700517 __u8 port_num;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800518};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800519struct ib_uverbs_query_qp {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800520 __u64 response;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700521 __u32 qp_handle;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800522 __u32 attr_mask;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800523 __u64 driver_data[0];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800524};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700525struct ib_uverbs_query_qp_resp {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800526 struct ib_uverbs_qp_dest dest;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800527 struct ib_uverbs_qp_dest alt_dest;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800528 __u32 max_send_wr;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700529 __u32 max_recv_wr;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800530 __u32 max_send_sge;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800531 __u32 max_recv_sge;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800532 __u32 max_inline_data;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700533 __u32 qkey;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800534 __u32 rq_psn;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800535 __u32 sq_psn;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800536 __u32 dest_qp_num;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700537 __u32 qp_access_flags;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800538 __u16 pkey_index;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800539 __u16 alt_pkey_index;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800540 __u8 qp_state;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700541 __u8 cur_qp_state;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800542 __u8 path_mtu;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800543 __u8 path_mig_state;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800544 __u8 sq_draining;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700545 __u8 max_rd_atomic;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800546 __u8 max_dest_rd_atomic;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800547 __u8 min_rnr_timer;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800548 __u8 port_num;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700549 __u8 timeout;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800550 __u8 retry_cnt;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800551 __u8 rnr_retry;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800552 __u8 alt_port_num;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700553 __u8 alt_timeout;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800554 __u8 sq_sig_all;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800555 __u8 reserved[5];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800556 __u64 driver_data[0];
Christopher Ferris106b3a82016-08-24 12:15:38 -0700557};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800558struct ib_uverbs_modify_qp {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800559 struct ib_uverbs_qp_dest dest;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800560 struct ib_uverbs_qp_dest alt_dest;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700561 __u32 qp_handle;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800562 __u32 attr_mask;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800563 __u32 qkey;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800564 __u32 rq_psn;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700565 __u32 sq_psn;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800566 __u32 dest_qp_num;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800567 __u32 qp_access_flags;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800568 __u16 pkey_index;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700569 __u16 alt_pkey_index;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800570 __u8 qp_state;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800571 __u8 cur_qp_state;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800572 __u8 path_mtu;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700573 __u8 path_mig_state;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800574 __u8 en_sqd_async_notify;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800575 __u8 max_rd_atomic;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800576 __u8 max_dest_rd_atomic;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700577 __u8 min_rnr_timer;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800578 __u8 port_num;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800579 __u8 timeout;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800580 __u8 retry_cnt;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700581 __u8 rnr_retry;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800582 __u8 alt_port_num;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800583 __u8 alt_timeout;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800584 __u8 reserved[2];
Christopher Ferris106b3a82016-08-24 12:15:38 -0700585 __u64 driver_data[0];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800586};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800587struct ib_uverbs_ex_modify_qp {
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800588 struct ib_uverbs_modify_qp base;
589 __u32 rate_limit;
590 __u32 reserved;
591};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800592struct ib_uverbs_modify_qp_resp {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800593};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800594struct ib_uverbs_ex_modify_qp_resp {
595 __u32 comp_mask;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800596 __u32 response_length;
597};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700598struct ib_uverbs_destroy_qp {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800599 __u64 response;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800600 __u32 qp_handle;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800601 __u32 reserved;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700602};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800603struct ib_uverbs_destroy_qp_resp {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800604 __u32 events_reported;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800605};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700606struct ib_uverbs_sge {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800607 __u64 addr;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800608 __u32 length;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800609 __u32 lkey;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700610};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800611struct ib_uverbs_send_wr {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800612 __u64 wr_id;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800613 __u32 num_sge;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700614 __u32 opcode;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800615 __u32 send_flags;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800616 union {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800617 __u32 imm_data;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700618 __u32 invalidate_rkey;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800619 } ex;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800620 union {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800621 struct {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700622 __u64 remote_addr;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800623 __u32 rkey;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800624 __u32 reserved;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800625 } rdma;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700626 struct {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800627 __u64 remote_addr;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800628 __u64 compare_add;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800629 __u64 swap;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700630 __u32 rkey;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800631 __u32 reserved;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800632 } atomic;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800633 struct {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700634 __u32 ah;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800635 __u32 remote_qpn;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800636 __u32 remote_qkey;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800637 __u32 reserved;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700638 } ud;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800639 } wr;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800640};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800641struct ib_uverbs_post_send {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700642 __u64 response;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800643 __u32 qp_handle;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800644 __u32 wr_count;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800645 __u32 sge_count;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700646 __u32 wqe_size;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800647 struct ib_uverbs_send_wr send_wr[0];
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800648};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800649struct ib_uverbs_post_send_resp {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700650 __u32 bad_wr;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800651};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800652struct ib_uverbs_recv_wr {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800653 __u64 wr_id;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700654 __u32 num_sge;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800655 __u32 reserved;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800656};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800657struct ib_uverbs_post_recv {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700658 __u64 response;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800659 __u32 qp_handle;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800660 __u32 wr_count;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800661 __u32 sge_count;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700662 __u32 wqe_size;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800663 struct ib_uverbs_recv_wr recv_wr[0];
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800664};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800665struct ib_uverbs_post_recv_resp {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700666 __u32 bad_wr;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800667};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800668struct ib_uverbs_post_srq_recv {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800669 __u64 response;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700670 __u32 srq_handle;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800671 __u32 wr_count;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800672 __u32 sge_count;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800673 __u32 wqe_size;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700674 struct ib_uverbs_recv_wr recv[0];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800675};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800676struct ib_uverbs_post_srq_recv_resp {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800677 __u32 bad_wr;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700678};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800679struct ib_uverbs_create_ah {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800680 __u64 response;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800681 __u64 user_handle;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700682 __u32 pd_handle;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800683 __u32 reserved;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800684 struct ib_uverbs_ah_attr attr;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800685};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700686struct ib_uverbs_create_ah_resp {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800687 __u32 ah_handle;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800688};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800689struct ib_uverbs_destroy_ah {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700690 __u32 ah_handle;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800691};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800692struct ib_uverbs_attach_mcast {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800693 __u8 gid[16];
Christopher Ferris106b3a82016-08-24 12:15:38 -0700694 __u32 qp_handle;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800695 __u16 mlid;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800696 __u16 reserved;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800697 __u64 driver_data[0];
Christopher Ferris106b3a82016-08-24 12:15:38 -0700698};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800699struct ib_uverbs_detach_mcast {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800700 __u8 gid[16];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800701 __u32 qp_handle;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700702 __u16 mlid;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800703 __u16 reserved;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800704 __u64 driver_data[0];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800705};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700706struct ib_uverbs_flow_spec_hdr {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800707 __u32 type;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800708 __u16 size;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800709 __u16 reserved;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700710 __u64 flow_spec_data[0];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800711};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800712struct ib_uverbs_flow_eth_filter {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800713 __u8 dst_mac[6];
Christopher Ferris106b3a82016-08-24 12:15:38 -0700714 __u8 src_mac[6];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800715 __be16 ether_type;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800716 __be16 vlan_tag;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800717};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700718struct ib_uverbs_flow_spec_eth {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800719 union {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800720 struct ib_uverbs_flow_spec_hdr hdr;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800721 struct {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700722 __u32 type;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800723 __u16 size;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800724 __u16 reserved;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800725 };
Christopher Ferris106b3a82016-08-24 12:15:38 -0700726 };
Christopher Ferris05d08e92016-02-04 13:16:38 -0800727 struct ib_uverbs_flow_eth_filter val;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800728 struct ib_uverbs_flow_eth_filter mask;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800729};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700730struct ib_uverbs_flow_ipv4_filter {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800731 __be32 src_ip;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800732 __be32 dst_ip;
733 __u8 proto;
734 __u8 tos;
735 __u8 ttl;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800736 __u8 flags;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800737};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700738struct ib_uverbs_flow_spec_ipv4 {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800739 union {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800740 struct ib_uverbs_flow_spec_hdr hdr;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800741 struct {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700742 __u32 type;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800743 __u16 size;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800744 __u16 reserved;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800745 };
Christopher Ferris106b3a82016-08-24 12:15:38 -0700746 };
Christopher Ferris05d08e92016-02-04 13:16:38 -0800747 struct ib_uverbs_flow_ipv4_filter val;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800748 struct ib_uverbs_flow_ipv4_filter mask;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800749};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700750struct ib_uverbs_flow_tcp_udp_filter {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800751 __be16 dst_port;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800752 __be16 src_port;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800753};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700754struct ib_uverbs_flow_spec_tcp_udp {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800755 union {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800756 struct ib_uverbs_flow_spec_hdr hdr;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800757 struct {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700758 __u32 type;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800759 __u16 size;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800760 __u16 reserved;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800761 };
Christopher Ferris106b3a82016-08-24 12:15:38 -0700762 };
Christopher Ferris05d08e92016-02-04 13:16:38 -0800763 struct ib_uverbs_flow_tcp_udp_filter val;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800764 struct ib_uverbs_flow_tcp_udp_filter mask;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800765};
766struct ib_uverbs_flow_ipv6_filter {
767 __u8 src_ip[16];
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800768 __u8 dst_ip[16];
769 __be32 flow_label;
770 __u8 next_hdr;
771 __u8 traffic_class;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800772 __u8 hop_limit;
773 __u8 reserved;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800774};
775struct ib_uverbs_flow_spec_ipv6 {
776 union {
777 struct ib_uverbs_flow_spec_hdr hdr;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800778 struct {
779 __u32 type;
780 __u16 size;
781 __u16 reserved;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800782 };
783 };
784 struct ib_uverbs_flow_ipv6_filter val;
785 struct ib_uverbs_flow_ipv6_filter mask;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800786};
Christopher Ferris525ce912017-07-26 13:12:53 -0700787struct ib_uverbs_flow_spec_action_tag {
788 union {
789 struct ib_uverbs_flow_spec_hdr hdr;
790 struct {
791 __u32 type;
792 __u16 size;
793 __u16 reserved;
794 };
795 };
796 __u32 tag_id;
797 __u32 reserved1;
798};
799struct ib_uverbs_flow_spec_action_drop {
800 union {
801 struct ib_uverbs_flow_spec_hdr hdr;
802 struct {
803 __u32 type;
804 __u16 size;
805 __u16 reserved;
806 };
807 };
808};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800809struct ib_uverbs_flow_tunnel_filter {
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800810 __be32 tunnel_id;
811};
812struct ib_uverbs_flow_spec_tunnel {
813 union {
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800814 struct ib_uverbs_flow_spec_hdr hdr;
815 struct {
816 __u32 type;
817 __u16 size;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800818 __u16 reserved;
819 };
820 };
821 struct ib_uverbs_flow_tunnel_filter val;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800822 struct ib_uverbs_flow_tunnel_filter mask;
823};
824struct ib_uverbs_flow_attr {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800825 __u32 type;
Tao Baod7db5942015-01-28 10:07:51 -0800826 __u16 size;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800827 __u16 priority;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700828 __u8 num_of_specs;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800829 __u8 reserved[2];
Tao Baod7db5942015-01-28 10:07:51 -0800830 __u8 port;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800831 __u32 flags;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700832 struct ib_uverbs_flow_spec_hdr flow_specs[0];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800833};
Christopher Ferris38062f92014-07-09 15:33:25 -0700834struct ib_uverbs_create_flow {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800835 __u32 comp_mask;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700836 __u32 qp_handle;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800837 struct ib_uverbs_flow_attr flow_attr;
Christopher Ferris38062f92014-07-09 15:33:25 -0700838};
839struct ib_uverbs_create_flow_resp {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700840 __u32 comp_mask;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800841 __u32 flow_handle;
Christopher Ferris38062f92014-07-09 15:33:25 -0700842};
843struct ib_uverbs_destroy_flow {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700844 __u32 comp_mask;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800845 __u32 flow_handle;
Ben Cheng655a7c02013-10-16 16:09:24 -0700846};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800847struct ib_uverbs_create_srq {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700848 __u64 response;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800849 __u64 user_handle;
Tao Baod7db5942015-01-28 10:07:51 -0800850 __u32 pd_handle;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800851 __u32 max_wr;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700852 __u32 max_sge;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800853 __u32 srq_limit;
Tao Baod7db5942015-01-28 10:07:51 -0800854 __u64 driver_data[0];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800855};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700856struct ib_uverbs_create_xsrq {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800857 __u64 response;
Tao Baod7db5942015-01-28 10:07:51 -0800858 __u64 user_handle;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800859 __u32 srq_type;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700860 __u32 pd_handle;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800861 __u32 max_wr;
Tao Baod7db5942015-01-28 10:07:51 -0800862 __u32 max_sge;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800863 __u32 srq_limit;
Christopher Ferris1308ad32017-11-14 17:32:13 -0800864 __u32 max_num_tags;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800865 __u32 xrcd_handle;
Tao Baod7db5942015-01-28 10:07:51 -0800866 __u32 cq_handle;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800867 __u64 driver_data[0];
Christopher Ferris106b3a82016-08-24 12:15:38 -0700868};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800869struct ib_uverbs_create_srq_resp {
Tao Baod7db5942015-01-28 10:07:51 -0800870 __u32 srq_handle;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800871 __u32 max_wr;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700872 __u32 max_sge;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800873 __u32 srqn;
Ben Cheng655a7c02013-10-16 16:09:24 -0700874};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800875struct ib_uverbs_modify_srq {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700876 __u32 srq_handle;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800877 __u32 attr_mask;
Tao Baod7db5942015-01-28 10:07:51 -0800878 __u32 max_wr;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800879 __u32 srq_limit;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700880 __u64 driver_data[0];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800881};
Ben Cheng655a7c02013-10-16 16:09:24 -0700882struct ib_uverbs_query_srq {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800883 __u64 response;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700884 __u32 srq_handle;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800885 __u32 reserved;
Tao Baod7db5942015-01-28 10:07:51 -0800886 __u64 driver_data[0];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800887};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700888struct ib_uverbs_query_srq_resp {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800889 __u32 max_wr;
Tao Baod7db5942015-01-28 10:07:51 -0800890 __u32 max_sge;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800891 __u32 srq_limit;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700892 __u32 reserved;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800893};
Ben Cheng655a7c02013-10-16 16:09:24 -0700894struct ib_uverbs_destroy_srq {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800895 __u64 response;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700896 __u32 srq_handle;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800897 __u32 reserved;
Ben Cheng655a7c02013-10-16 16:09:24 -0700898};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800899struct ib_uverbs_destroy_srq_resp {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700900 __u32 events_reported;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800901};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800902struct ib_uverbs_ex_create_wq {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800903 __u32 comp_mask;
904 __u32 wq_type;
905 __u64 user_handle;
906 __u32 pd_handle;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800907 __u32 cq_handle;
908 __u32 max_wr;
909 __u32 max_sge;
Christopher Ferris525ce912017-07-26 13:12:53 -0700910 __u32 create_flags;
911 __u32 reserved;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800912};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800913struct ib_uverbs_ex_create_wq_resp {
914 __u32 comp_mask;
915 __u32 response_length;
916 __u32 wq_handle;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800917 __u32 max_wr;
918 __u32 max_sge;
919 __u32 wqn;
920};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800921struct ib_uverbs_ex_destroy_wq {
922 __u32 comp_mask;
923 __u32 wq_handle;
924};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800925struct ib_uverbs_ex_destroy_wq_resp {
926 __u32 comp_mask;
927 __u32 response_length;
928 __u32 events_reported;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800929 __u32 reserved;
930};
931struct ib_uverbs_ex_modify_wq {
932 __u32 attr_mask;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800933 __u32 wq_handle;
934 __u32 wq_state;
935 __u32 curr_wq_state;
Christopher Ferris525ce912017-07-26 13:12:53 -0700936 __u32 flags;
937 __u32 flags_mask;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800938};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800939#define IB_USER_VERBS_MAX_LOG_IND_TBL_SIZE 0x0d
940struct ib_uverbs_ex_create_rwq_ind_table {
941 __u32 comp_mask;
942 __u32 log_ind_tbl_size;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800943 __u32 wq_handles[0];
944};
945struct ib_uverbs_ex_create_rwq_ind_table_resp {
946 __u32 comp_mask;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800947 __u32 response_length;
948 __u32 ind_tbl_handle;
949 __u32 ind_tbl_num;
950};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800951struct ib_uverbs_ex_destroy_rwq_ind_table {
952 __u32 comp_mask;
953 __u32 ind_tbl_handle;
954};
Christopher Ferris525ce912017-07-26 13:12:53 -0700955#define IB_DEVICE_NAME_MAX 64
Ben Cheng655a7c02013-10-16 16:09:24 -0700956#endif