blob: 03a2fcde8592db6b0c6fd7737a4f696ba675b9a6 [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,
Christopher Ferris934ec942018-01-31 15:29:16 -080078 IB_USER_VERBS_EX_CMD_DESTROY_RWQ_IND_TBL,
79 IB_USER_VERBS_EX_CMD_MODIFY_CQ
Christopher Ferris48af7cb2017-02-21 12:35:09 -080080};
Christopher Ferris49f525c2016-12-12 14:55:36 -080081struct ib_uverbs_async_event_desc {
Tao Baod7db5942015-01-28 10:07:51 -080082 __u64 element;
83 __u32 event_type;
Christopher Ferris48af7cb2017-02-21 12:35:09 -080084 __u32 reserved;
Christopher Ferris49f525c2016-12-12 14:55:36 -080085};
Ben Cheng655a7c02013-10-16 16:09:24 -070086struct ib_uverbs_comp_event_desc {
Tao Baod7db5942015-01-28 10:07:51 -080087 __u64 cq_handle;
Christopher Ferris48af7cb2017-02-21 12:35:09 -080088};
Christopher Ferris934ec942018-01-31 15:29:16 -080089struct ib_uverbs_cq_moderation_caps {
90 __u16 max_cq_moderation_count;
91 __u16 max_cq_moderation_period;
92 __u32 reserved;
93};
Christopher Ferris49f525c2016-12-12 14:55:36 -080094#define IB_USER_VERBS_CMD_COMMAND_MASK 0xff
Christopher Ferris38062f92014-07-09 15:33:25 -070095#define IB_USER_VERBS_CMD_FLAGS_MASK 0xff000000u
96#define IB_USER_VERBS_CMD_FLAGS_SHIFT 24
Christopher Ferris48af7cb2017-02-21 12:35:09 -080097#define IB_USER_VERBS_CMD_FLAG_EXTENDED 0x80
Christopher Ferris49f525c2016-12-12 14:55:36 -080098struct ib_uverbs_cmd_hdr {
Tao Baod7db5942015-01-28 10:07:51 -080099 __u32 command;
100 __u16 in_words;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800101 __u16 out_words;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800102};
Christopher Ferris38062f92014-07-09 15:33:25 -0700103struct ib_uverbs_ex_cmd_hdr {
Tao Baod7db5942015-01-28 10:07:51 -0800104 __u64 response;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800105 __u16 provider_in_words;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800106 __u16 provider_out_words;
Tao Baod7db5942015-01-28 10:07:51 -0800107 __u32 cmd_hdr_reserved;
Christopher Ferris38062f92014-07-09 15:33:25 -0700108};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800109struct ib_uverbs_get_context {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800110 __u64 response;
Tao Baod7db5942015-01-28 10:07:51 -0800111 __u64 driver_data[0];
Ben Cheng655a7c02013-10-16 16:09:24 -0700112};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800113struct ib_uverbs_get_context_resp {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800114 __u32 async_fd;
Tao Baod7db5942015-01-28 10:07:51 -0800115 __u32 num_comp_vectors;
Ben Cheng655a7c02013-10-16 16:09:24 -0700116};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800117struct ib_uverbs_query_device {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800118 __u64 response;
Tao Baod7db5942015-01-28 10:07:51 -0800119 __u64 driver_data[0];
Ben Cheng655a7c02013-10-16 16:09:24 -0700120};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800121struct ib_uverbs_query_device_resp {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800122 __u64 fw_ver;
Tao Baod7db5942015-01-28 10:07:51 -0800123 __be64 node_guid;
124 __be64 sys_image_guid;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800125 __u64 max_mr_size;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800126 __u64 page_size_cap;
Tao Baod7db5942015-01-28 10:07:51 -0800127 __u32 vendor_id;
128 __u32 vendor_part_id;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800129 __u32 hw_ver;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800130 __u32 max_qp;
Tao Baod7db5942015-01-28 10:07:51 -0800131 __u32 max_qp_wr;
132 __u32 device_cap_flags;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800133 __u32 max_sge;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800134 __u32 max_sge_rd;
Tao Baod7db5942015-01-28 10:07:51 -0800135 __u32 max_cq;
136 __u32 max_cqe;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800137 __u32 max_mr;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800138 __u32 max_pd;
Tao Baod7db5942015-01-28 10:07:51 -0800139 __u32 max_qp_rd_atom;
140 __u32 max_ee_rd_atom;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800141 __u32 max_res_rd_atom;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800142 __u32 max_qp_init_rd_atom;
Tao Baod7db5942015-01-28 10:07:51 -0800143 __u32 max_ee_init_rd_atom;
144 __u32 atomic_cap;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800145 __u32 max_ee;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800146 __u32 max_rdd;
Tao Baod7db5942015-01-28 10:07:51 -0800147 __u32 max_mw;
148 __u32 max_raw_ipv6_qp;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800149 __u32 max_raw_ethy_qp;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800150 __u32 max_mcast_grp;
Tao Baod7db5942015-01-28 10:07:51 -0800151 __u32 max_mcast_qp_attach;
152 __u32 max_total_mcast_qp_attach;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800153 __u32 max_ah;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800154 __u32 max_fmr;
Tao Baod7db5942015-01-28 10:07:51 -0800155 __u32 max_map_per_fmr;
156 __u32 max_srq;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800157 __u32 max_srq_wr;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800158 __u32 max_srq_sge;
Tao Baod7db5942015-01-28 10:07:51 -0800159 __u16 max_pkeys;
160 __u8 local_ca_ack_delay;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800161 __u8 phys_port_cnt;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800162 __u8 reserved[4];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800163};
164struct ib_uverbs_ex_query_device {
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800165 __u32 comp_mask;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800166 __u32 reserved;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800167};
168struct ib_uverbs_odp_caps {
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800169 __u64 general_caps;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800170 struct {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800171 __u32 rc_odp_caps;
172 __u32 uc_odp_caps;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800173 __u32 ud_odp_caps;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800174 } per_transport_caps;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800175 __u32 reserved;
176};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800177struct ib_uverbs_rss_caps {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800178 __u32 supported_qpts;
179 __u32 max_rwq_indirection_tables;
180 __u32 max_rwq_indirection_table_size;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800181 __u32 reserved;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800182};
Christopher Ferris1308ad32017-11-14 17:32:13 -0800183struct ib_uverbs_tm_caps {
184 __u32 max_rndv_hdr_size;
185 __u32 max_num_tags;
186 __u32 flags;
187 __u32 max_ops;
188 __u32 max_sge;
189 __u32 reserved;
190};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800191struct ib_uverbs_ex_query_device_resp {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800192 struct ib_uverbs_query_device_resp base;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800193 __u32 comp_mask;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800194 __u32 response_length;
195 struct ib_uverbs_odp_caps odp_caps;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800196 __u64 timestamp_mask;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800197 __u64 hca_core_clock;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800198 __u64 device_cap_flags_ex;
199 struct ib_uverbs_rss_caps rss_caps;
200 __u32 max_wq_type_rq;
Christopher Ferris525ce912017-07-26 13:12:53 -0700201 __u32 raw_packet_caps;
Christopher Ferris1308ad32017-11-14 17:32:13 -0800202 struct ib_uverbs_tm_caps tm_caps;
Christopher Ferris934ec942018-01-31 15:29:16 -0800203 struct ib_uverbs_cq_moderation_caps cq_moderation_caps;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800204};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800205struct ib_uverbs_query_port {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700206 __u64 response;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800207 __u8 port_num;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800208 __u8 reserved[7];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800209 __u64 driver_data[0];
Christopher Ferris106b3a82016-08-24 12:15:38 -0700210};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800211struct ib_uverbs_query_port_resp {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800212 __u32 port_cap_flags;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800213 __u32 max_msg_sz;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700214 __u32 bad_pkey_cntr;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800215 __u32 qkey_viol_cntr;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800216 __u32 gid_tbl_len;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800217 __u16 pkey_tbl_len;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700218 __u16 lid;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800219 __u16 sm_lid;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800220 __u8 state;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800221 __u8 max_mtu;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700222 __u8 active_mtu;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800223 __u8 lmc;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800224 __u8 max_vl_num;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800225 __u8 sm_sl;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700226 __u8 subnet_timeout;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800227 __u8 init_type_reply;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800228 __u8 active_width;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800229 __u8 active_speed;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700230 __u8 phys_state;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800231 __u8 link_layer;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800232 __u8 reserved[2];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800233};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700234struct ib_uverbs_alloc_pd {
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800235 __u64 response;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800236 __u64 driver_data[0];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800237};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700238struct ib_uverbs_alloc_pd_resp {
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800239 __u32 pd_handle;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800240};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800241struct ib_uverbs_dealloc_pd {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700242 __u32 pd_handle;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800243};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800244struct ib_uverbs_open_xrcd {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800245 __u64 response;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700246 __u32 fd;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800247 __u32 oflags;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800248 __u64 driver_data[0];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800249};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700250struct ib_uverbs_open_xrcd_resp {
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800251 __u32 xrcd_handle;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800252};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800253struct ib_uverbs_close_xrcd {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700254 __u32 xrcd_handle;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800255};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800256struct ib_uverbs_reg_mr {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800257 __u64 response;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700258 __u64 start;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800259 __u64 length;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800260 __u64 hca_va;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800261 __u32 pd_handle;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700262 __u32 access_flags;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800263 __u64 driver_data[0];
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800264};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800265struct ib_uverbs_reg_mr_resp {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700266 __u32 mr_handle;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800267 __u32 lkey;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800268 __u32 rkey;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800269};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700270struct ib_uverbs_rereg_mr {
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800271 __u64 response;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800272 __u32 mr_handle;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800273 __u32 flags;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700274 __u64 start;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800275 __u64 length;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800276 __u64 hca_va;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800277 __u32 pd_handle;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700278 __u32 access_flags;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800279};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800280struct ib_uverbs_rereg_mr_resp {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800281 __u32 lkey;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700282 __u32 rkey;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800283};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800284struct ib_uverbs_dereg_mr {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800285 __u32 mr_handle;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700286};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800287struct ib_uverbs_alloc_mw {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800288 __u64 response;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800289 __u32 pd_handle;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700290 __u8 mw_type;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800291 __u8 reserved[3];
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800292};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800293struct ib_uverbs_alloc_mw_resp {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700294 __u32 mw_handle;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800295 __u32 rkey;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800296};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800297struct ib_uverbs_dealloc_mw {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700298 __u32 mw_handle;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800299};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800300struct ib_uverbs_create_comp_channel {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800301 __u64 response;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700302};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800303struct ib_uverbs_create_comp_channel_resp {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800304 __u32 fd;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800305};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700306struct ib_uverbs_create_cq {
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800307 __u64 response;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800308 __u64 user_handle;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800309 __u32 cqe;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700310 __u32 comp_vector;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800311 __s32 comp_channel;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800312 __u32 reserved;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800313 __u64 driver_data[0];
Christopher Ferris106b3a82016-08-24 12:15:38 -0700314};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800315struct ib_uverbs_ex_create_cq {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800316 __u64 user_handle;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800317 __u32 cqe;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700318 __u32 comp_vector;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800319 __s32 comp_channel;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800320 __u32 comp_mask;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800321 __u32 flags;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700322 __u32 reserved;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800323};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800324struct ib_uverbs_create_cq_resp {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800325 __u32 cq_handle;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700326 __u32 cqe;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800327};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800328struct ib_uverbs_ex_create_cq_resp {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800329 struct ib_uverbs_create_cq_resp base;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700330 __u32 comp_mask;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800331 __u32 response_length;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800332};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800333struct ib_uverbs_resize_cq {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700334 __u64 response;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800335 __u32 cq_handle;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800336 __u32 cqe;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800337 __u64 driver_data[0];
Christopher Ferris106b3a82016-08-24 12:15:38 -0700338};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800339struct ib_uverbs_resize_cq_resp {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800340 __u32 cqe;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800341 __u32 reserved;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700342 __u64 driver_data[0];
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800343};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800344struct ib_uverbs_poll_cq {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800345 __u64 response;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700346 __u32 cq_handle;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800347 __u32 ne;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800348};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800349struct ib_uverbs_wc {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700350 __u64 wr_id;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800351 __u32 status;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800352 __u32 opcode;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800353 __u32 vendor_err;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700354 __u32 byte_len;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800355 union {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800356 __u32 imm_data;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800357 __u32 invalidate_rkey;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700358 } ex;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800359 __u32 qp_num;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800360 __u32 src_qp;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800361 __u32 wc_flags;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700362 __u16 pkey_index;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800363 __u16 slid;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800364 __u8 sl;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800365 __u8 dlid_path_bits;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700366 __u8 port_num;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800367 __u8 reserved;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800368};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800369struct ib_uverbs_poll_cq_resp {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700370 __u32 count;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800371 __u32 reserved;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800372 struct ib_uverbs_wc wc[0];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800373};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700374struct ib_uverbs_req_notify_cq {
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800375 __u32 cq_handle;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800376 __u32 solicited_only;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800377};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700378struct ib_uverbs_destroy_cq {
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800379 __u64 response;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800380 __u32 cq_handle;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800381 __u32 reserved;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700382};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800383struct ib_uverbs_destroy_cq_resp {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800384 __u32 comp_events_reported;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800385 __u32 async_events_reported;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700386};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800387struct ib_uverbs_global_route {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800388 __u8 dgid[16];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800389 __u32 flow_label;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700390 __u8 sgid_index;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800391 __u8 hop_limit;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800392 __u8 traffic_class;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800393 __u8 reserved;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700394};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800395struct ib_uverbs_ah_attr {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800396 struct ib_uverbs_global_route grh;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800397 __u16 dlid;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700398 __u8 sl;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800399 __u8 src_path_bits;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800400 __u8 static_rate;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800401 __u8 is_global;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700402 __u8 port_num;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800403 __u8 reserved;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800404};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800405struct ib_uverbs_qp_attr {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700406 __u32 qp_attr_mask;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800407 __u32 qp_state;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800408 __u32 cur_qp_state;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800409 __u32 path_mtu;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700410 __u32 path_mig_state;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800411 __u32 qkey;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800412 __u32 rq_psn;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800413 __u32 sq_psn;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700414 __u32 dest_qp_num;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800415 __u32 qp_access_flags;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800416 struct ib_uverbs_ah_attr ah_attr;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800417 struct ib_uverbs_ah_attr alt_ah_attr;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700418 __u32 max_send_wr;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800419 __u32 max_recv_wr;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800420 __u32 max_send_sge;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800421 __u32 max_recv_sge;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700422 __u32 max_inline_data;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800423 __u16 pkey_index;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800424 __u16 alt_pkey_index;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800425 __u8 en_sqd_async_notify;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700426 __u8 sq_draining;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800427 __u8 max_rd_atomic;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800428 __u8 max_dest_rd_atomic;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800429 __u8 min_rnr_timer;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700430 __u8 port_num;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800431 __u8 timeout;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800432 __u8 retry_cnt;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800433 __u8 rnr_retry;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700434 __u8 alt_port_num;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800435 __u8 alt_timeout;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800436 __u8 reserved[5];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800437};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700438struct ib_uverbs_create_qp {
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800439 __u64 response;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800440 __u64 user_handle;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800441 __u32 pd_handle;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700442 __u32 send_cq_handle;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800443 __u32 recv_cq_handle;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800444 __u32 srq_handle;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800445 __u32 max_send_wr;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700446 __u32 max_recv_wr;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800447 __u32 max_send_sge;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800448 __u32 max_recv_sge;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800449 __u32 max_inline_data;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700450 __u8 sq_sig_all;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800451 __u8 qp_type;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800452 __u8 is_srq;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800453 __u8 reserved;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700454 __u64 driver_data[0];
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800455};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800456enum ib_uverbs_create_qp_mask {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800457 IB_UVERBS_CREATE_QP_MASK_IND_TABLE = 1UL << 0,
458};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800459enum {
460 IB_UVERBS_CREATE_QP_SUP_COMP_MASK = IB_UVERBS_CREATE_QP_MASK_IND_TABLE,
461};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800462enum {
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800463 IB_USER_LEGACY_LAST_QP_ATTR_MASK = 1ULL << 20,
464};
465enum {
466 IB_USER_LAST_QP_ATTR_MASK = 1ULL << 25,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800467};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800468struct ib_uverbs_ex_create_qp {
469 __u64 user_handle;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800470 __u32 pd_handle;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800471 __u32 send_cq_handle;
Tao Baod7db5942015-01-28 10:07:51 -0800472 __u32 recv_cq_handle;
473 __u32 srq_handle;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800474 __u32 max_send_wr;
Tao Baod7db5942015-01-28 10:07:51 -0800475 __u32 max_recv_wr;
476 __u32 max_send_sge;
477 __u32 max_recv_sge;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800478 __u32 max_inline_data;
Tao Baod7db5942015-01-28 10:07:51 -0800479 __u8 sq_sig_all;
480 __u8 qp_type;
481 __u8 is_srq;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800482 __u8 reserved;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800483 __u32 comp_mask;
484 __u32 create_flags;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800485 __u32 rwq_ind_tbl_handle;
Christopher Ferris1308ad32017-11-14 17:32:13 -0800486 __u32 source_qpn;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800487};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700488struct ib_uverbs_open_qp {
Tao Baod7db5942015-01-28 10:07:51 -0800489 __u64 response;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800490 __u64 user_handle;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800491 __u32 pd_handle;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700492 __u32 qpn;
Tao Baod7db5942015-01-28 10:07:51 -0800493 __u8 qp_type;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800494 __u8 reserved[7];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800495 __u64 driver_data[0];
Christopher Ferris106b3a82016-08-24 12:15:38 -0700496};
Ben Cheng655a7c02013-10-16 16:09:24 -0700497struct ib_uverbs_create_qp_resp {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800498 __u32 qp_handle;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800499 __u32 qpn;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700500 __u32 max_send_wr;
Tao Baod7db5942015-01-28 10:07:51 -0800501 __u32 max_recv_wr;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800502 __u32 max_send_sge;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800503 __u32 max_recv_sge;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700504 __u32 max_inline_data;
Tao Baod7db5942015-01-28 10:07:51 -0800505 __u32 reserved;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800506};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800507struct ib_uverbs_ex_create_qp_resp {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700508 struct ib_uverbs_create_qp_resp base;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800509 __u32 comp_mask;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800510 __u32 response_length;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800511};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700512struct ib_uverbs_qp_dest {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800513 __u8 dgid[16];
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800514 __u32 flow_label;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800515 __u16 dlid;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700516 __u16 reserved;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800517 __u8 sgid_index;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800518 __u8 hop_limit;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800519 __u8 traffic_class;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700520 __u8 sl;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800521 __u8 src_path_bits;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800522 __u8 static_rate;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800523 __u8 is_global;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700524 __u8 port_num;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800525};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800526struct ib_uverbs_query_qp {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800527 __u64 response;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700528 __u32 qp_handle;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800529 __u32 attr_mask;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800530 __u64 driver_data[0];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800531};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700532struct ib_uverbs_query_qp_resp {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800533 struct ib_uverbs_qp_dest dest;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800534 struct ib_uverbs_qp_dest alt_dest;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800535 __u32 max_send_wr;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700536 __u32 max_recv_wr;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800537 __u32 max_send_sge;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800538 __u32 max_recv_sge;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800539 __u32 max_inline_data;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700540 __u32 qkey;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800541 __u32 rq_psn;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800542 __u32 sq_psn;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800543 __u32 dest_qp_num;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700544 __u32 qp_access_flags;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800545 __u16 pkey_index;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800546 __u16 alt_pkey_index;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800547 __u8 qp_state;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700548 __u8 cur_qp_state;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800549 __u8 path_mtu;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800550 __u8 path_mig_state;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800551 __u8 sq_draining;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700552 __u8 max_rd_atomic;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800553 __u8 max_dest_rd_atomic;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800554 __u8 min_rnr_timer;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800555 __u8 port_num;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700556 __u8 timeout;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800557 __u8 retry_cnt;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800558 __u8 rnr_retry;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800559 __u8 alt_port_num;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700560 __u8 alt_timeout;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800561 __u8 sq_sig_all;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800562 __u8 reserved[5];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800563 __u64 driver_data[0];
Christopher Ferris106b3a82016-08-24 12:15:38 -0700564};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800565struct ib_uverbs_modify_qp {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800566 struct ib_uverbs_qp_dest dest;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800567 struct ib_uverbs_qp_dest alt_dest;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700568 __u32 qp_handle;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800569 __u32 attr_mask;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800570 __u32 qkey;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800571 __u32 rq_psn;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700572 __u32 sq_psn;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800573 __u32 dest_qp_num;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800574 __u32 qp_access_flags;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800575 __u16 pkey_index;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700576 __u16 alt_pkey_index;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800577 __u8 qp_state;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800578 __u8 cur_qp_state;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800579 __u8 path_mtu;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700580 __u8 path_mig_state;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800581 __u8 en_sqd_async_notify;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800582 __u8 max_rd_atomic;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800583 __u8 max_dest_rd_atomic;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700584 __u8 min_rnr_timer;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800585 __u8 port_num;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800586 __u8 timeout;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800587 __u8 retry_cnt;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700588 __u8 rnr_retry;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800589 __u8 alt_port_num;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800590 __u8 alt_timeout;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800591 __u8 reserved[2];
Christopher Ferris106b3a82016-08-24 12:15:38 -0700592 __u64 driver_data[0];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800593};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800594struct ib_uverbs_ex_modify_qp {
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800595 struct ib_uverbs_modify_qp base;
596 __u32 rate_limit;
597 __u32 reserved;
598};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800599struct ib_uverbs_modify_qp_resp {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800600};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800601struct ib_uverbs_ex_modify_qp_resp {
602 __u32 comp_mask;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800603 __u32 response_length;
604};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700605struct ib_uverbs_destroy_qp {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800606 __u64 response;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800607 __u32 qp_handle;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800608 __u32 reserved;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700609};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800610struct ib_uverbs_destroy_qp_resp {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800611 __u32 events_reported;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800612};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700613struct ib_uverbs_sge {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800614 __u64 addr;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800615 __u32 length;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800616 __u32 lkey;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700617};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800618struct ib_uverbs_send_wr {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800619 __u64 wr_id;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800620 __u32 num_sge;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700621 __u32 opcode;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800622 __u32 send_flags;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800623 union {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800624 __u32 imm_data;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700625 __u32 invalidate_rkey;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800626 } ex;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800627 union {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800628 struct {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700629 __u64 remote_addr;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800630 __u32 rkey;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800631 __u32 reserved;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800632 } rdma;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700633 struct {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800634 __u64 remote_addr;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800635 __u64 compare_add;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800636 __u64 swap;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700637 __u32 rkey;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800638 __u32 reserved;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800639 } atomic;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800640 struct {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700641 __u32 ah;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800642 __u32 remote_qpn;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800643 __u32 remote_qkey;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800644 __u32 reserved;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700645 } ud;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800646 } wr;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800647};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800648struct ib_uverbs_post_send {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700649 __u64 response;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800650 __u32 qp_handle;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800651 __u32 wr_count;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800652 __u32 sge_count;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700653 __u32 wqe_size;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800654 struct ib_uverbs_send_wr send_wr[0];
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800655};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800656struct ib_uverbs_post_send_resp {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700657 __u32 bad_wr;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800658};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800659struct ib_uverbs_recv_wr {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800660 __u64 wr_id;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700661 __u32 num_sge;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800662 __u32 reserved;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800663};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800664struct ib_uverbs_post_recv {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700665 __u64 response;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800666 __u32 qp_handle;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800667 __u32 wr_count;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800668 __u32 sge_count;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700669 __u32 wqe_size;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800670 struct ib_uverbs_recv_wr recv_wr[0];
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800671};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800672struct ib_uverbs_post_recv_resp {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700673 __u32 bad_wr;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800674};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800675struct ib_uverbs_post_srq_recv {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800676 __u64 response;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700677 __u32 srq_handle;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800678 __u32 wr_count;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800679 __u32 sge_count;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800680 __u32 wqe_size;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700681 struct ib_uverbs_recv_wr recv[0];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800682};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800683struct ib_uverbs_post_srq_recv_resp {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800684 __u32 bad_wr;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700685};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800686struct ib_uverbs_create_ah {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800687 __u64 response;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800688 __u64 user_handle;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700689 __u32 pd_handle;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800690 __u32 reserved;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800691 struct ib_uverbs_ah_attr attr;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800692};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700693struct ib_uverbs_create_ah_resp {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800694 __u32 ah_handle;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800695};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800696struct ib_uverbs_destroy_ah {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700697 __u32 ah_handle;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800698};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800699struct ib_uverbs_attach_mcast {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800700 __u8 gid[16];
Christopher Ferris106b3a82016-08-24 12:15:38 -0700701 __u32 qp_handle;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800702 __u16 mlid;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800703 __u16 reserved;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800704 __u64 driver_data[0];
Christopher Ferris106b3a82016-08-24 12:15:38 -0700705};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800706struct ib_uverbs_detach_mcast {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800707 __u8 gid[16];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800708 __u32 qp_handle;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700709 __u16 mlid;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800710 __u16 reserved;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800711 __u64 driver_data[0];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800712};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700713struct ib_uverbs_flow_spec_hdr {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800714 __u32 type;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800715 __u16 size;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800716 __u16 reserved;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700717 __u64 flow_spec_data[0];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800718};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800719struct ib_uverbs_flow_eth_filter {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800720 __u8 dst_mac[6];
Christopher Ferris106b3a82016-08-24 12:15:38 -0700721 __u8 src_mac[6];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800722 __be16 ether_type;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800723 __be16 vlan_tag;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800724};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700725struct ib_uverbs_flow_spec_eth {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800726 union {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800727 struct ib_uverbs_flow_spec_hdr hdr;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800728 struct {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700729 __u32 type;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800730 __u16 size;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800731 __u16 reserved;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800732 };
Christopher Ferris106b3a82016-08-24 12:15:38 -0700733 };
Christopher Ferris05d08e92016-02-04 13:16:38 -0800734 struct ib_uverbs_flow_eth_filter val;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800735 struct ib_uverbs_flow_eth_filter mask;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800736};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700737struct ib_uverbs_flow_ipv4_filter {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800738 __be32 src_ip;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800739 __be32 dst_ip;
740 __u8 proto;
741 __u8 tos;
742 __u8 ttl;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800743 __u8 flags;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800744};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700745struct ib_uverbs_flow_spec_ipv4 {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800746 union {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800747 struct ib_uverbs_flow_spec_hdr hdr;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800748 struct {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700749 __u32 type;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800750 __u16 size;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800751 __u16 reserved;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800752 };
Christopher Ferris106b3a82016-08-24 12:15:38 -0700753 };
Christopher Ferris05d08e92016-02-04 13:16:38 -0800754 struct ib_uverbs_flow_ipv4_filter val;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800755 struct ib_uverbs_flow_ipv4_filter mask;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800756};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700757struct ib_uverbs_flow_tcp_udp_filter {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800758 __be16 dst_port;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800759 __be16 src_port;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800760};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700761struct ib_uverbs_flow_spec_tcp_udp {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800762 union {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800763 struct ib_uverbs_flow_spec_hdr hdr;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800764 struct {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700765 __u32 type;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800766 __u16 size;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800767 __u16 reserved;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800768 };
Christopher Ferris106b3a82016-08-24 12:15:38 -0700769 };
Christopher Ferris05d08e92016-02-04 13:16:38 -0800770 struct ib_uverbs_flow_tcp_udp_filter val;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800771 struct ib_uverbs_flow_tcp_udp_filter mask;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800772};
773struct ib_uverbs_flow_ipv6_filter {
774 __u8 src_ip[16];
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800775 __u8 dst_ip[16];
776 __be32 flow_label;
777 __u8 next_hdr;
778 __u8 traffic_class;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800779 __u8 hop_limit;
780 __u8 reserved;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800781};
782struct ib_uverbs_flow_spec_ipv6 {
783 union {
784 struct ib_uverbs_flow_spec_hdr hdr;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800785 struct {
786 __u32 type;
787 __u16 size;
788 __u16 reserved;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800789 };
790 };
791 struct ib_uverbs_flow_ipv6_filter val;
792 struct ib_uverbs_flow_ipv6_filter mask;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800793};
Christopher Ferris525ce912017-07-26 13:12:53 -0700794struct ib_uverbs_flow_spec_action_tag {
795 union {
796 struct ib_uverbs_flow_spec_hdr hdr;
797 struct {
798 __u32 type;
799 __u16 size;
800 __u16 reserved;
801 };
802 };
803 __u32 tag_id;
804 __u32 reserved1;
805};
806struct ib_uverbs_flow_spec_action_drop {
807 union {
808 struct ib_uverbs_flow_spec_hdr hdr;
809 struct {
810 __u32 type;
811 __u16 size;
812 __u16 reserved;
813 };
814 };
815};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800816struct ib_uverbs_flow_tunnel_filter {
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800817 __be32 tunnel_id;
818};
819struct ib_uverbs_flow_spec_tunnel {
820 union {
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800821 struct ib_uverbs_flow_spec_hdr hdr;
822 struct {
823 __u32 type;
824 __u16 size;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800825 __u16 reserved;
826 };
827 };
828 struct ib_uverbs_flow_tunnel_filter val;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800829 struct ib_uverbs_flow_tunnel_filter mask;
830};
831struct ib_uverbs_flow_attr {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800832 __u32 type;
Tao Baod7db5942015-01-28 10:07:51 -0800833 __u16 size;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800834 __u16 priority;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700835 __u8 num_of_specs;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800836 __u8 reserved[2];
Tao Baod7db5942015-01-28 10:07:51 -0800837 __u8 port;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800838 __u32 flags;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700839 struct ib_uverbs_flow_spec_hdr flow_specs[0];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800840};
Christopher Ferris38062f92014-07-09 15:33:25 -0700841struct ib_uverbs_create_flow {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800842 __u32 comp_mask;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700843 __u32 qp_handle;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800844 struct ib_uverbs_flow_attr flow_attr;
Christopher Ferris38062f92014-07-09 15:33:25 -0700845};
846struct ib_uverbs_create_flow_resp {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700847 __u32 comp_mask;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800848 __u32 flow_handle;
Christopher Ferris38062f92014-07-09 15:33:25 -0700849};
850struct ib_uverbs_destroy_flow {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700851 __u32 comp_mask;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800852 __u32 flow_handle;
Ben Cheng655a7c02013-10-16 16:09:24 -0700853};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800854struct ib_uverbs_create_srq {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700855 __u64 response;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800856 __u64 user_handle;
Tao Baod7db5942015-01-28 10:07:51 -0800857 __u32 pd_handle;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800858 __u32 max_wr;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700859 __u32 max_sge;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800860 __u32 srq_limit;
Tao Baod7db5942015-01-28 10:07:51 -0800861 __u64 driver_data[0];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800862};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700863struct ib_uverbs_create_xsrq {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800864 __u64 response;
Tao Baod7db5942015-01-28 10:07:51 -0800865 __u64 user_handle;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800866 __u32 srq_type;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700867 __u32 pd_handle;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800868 __u32 max_wr;
Tao Baod7db5942015-01-28 10:07:51 -0800869 __u32 max_sge;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800870 __u32 srq_limit;
Christopher Ferris1308ad32017-11-14 17:32:13 -0800871 __u32 max_num_tags;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800872 __u32 xrcd_handle;
Tao Baod7db5942015-01-28 10:07:51 -0800873 __u32 cq_handle;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800874 __u64 driver_data[0];
Christopher Ferris106b3a82016-08-24 12:15:38 -0700875};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800876struct ib_uverbs_create_srq_resp {
Tao Baod7db5942015-01-28 10:07:51 -0800877 __u32 srq_handle;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800878 __u32 max_wr;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700879 __u32 max_sge;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800880 __u32 srqn;
Ben Cheng655a7c02013-10-16 16:09:24 -0700881};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800882struct ib_uverbs_modify_srq {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700883 __u32 srq_handle;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800884 __u32 attr_mask;
Tao Baod7db5942015-01-28 10:07:51 -0800885 __u32 max_wr;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800886 __u32 srq_limit;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700887 __u64 driver_data[0];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800888};
Ben Cheng655a7c02013-10-16 16:09:24 -0700889struct ib_uverbs_query_srq {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800890 __u64 response;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700891 __u32 srq_handle;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800892 __u32 reserved;
Tao Baod7db5942015-01-28 10:07:51 -0800893 __u64 driver_data[0];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800894};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700895struct ib_uverbs_query_srq_resp {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800896 __u32 max_wr;
Tao Baod7db5942015-01-28 10:07:51 -0800897 __u32 max_sge;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800898 __u32 srq_limit;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700899 __u32 reserved;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800900};
Ben Cheng655a7c02013-10-16 16:09:24 -0700901struct ib_uverbs_destroy_srq {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800902 __u64 response;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700903 __u32 srq_handle;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800904 __u32 reserved;
Ben Cheng655a7c02013-10-16 16:09:24 -0700905};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800906struct ib_uverbs_destroy_srq_resp {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700907 __u32 events_reported;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800908};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800909struct ib_uverbs_ex_create_wq {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800910 __u32 comp_mask;
911 __u32 wq_type;
912 __u64 user_handle;
913 __u32 pd_handle;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800914 __u32 cq_handle;
915 __u32 max_wr;
916 __u32 max_sge;
Christopher Ferris525ce912017-07-26 13:12:53 -0700917 __u32 create_flags;
918 __u32 reserved;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800919};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800920struct ib_uverbs_ex_create_wq_resp {
921 __u32 comp_mask;
922 __u32 response_length;
923 __u32 wq_handle;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800924 __u32 max_wr;
925 __u32 max_sge;
926 __u32 wqn;
927};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800928struct ib_uverbs_ex_destroy_wq {
929 __u32 comp_mask;
930 __u32 wq_handle;
931};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800932struct ib_uverbs_ex_destroy_wq_resp {
933 __u32 comp_mask;
934 __u32 response_length;
935 __u32 events_reported;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800936 __u32 reserved;
937};
938struct ib_uverbs_ex_modify_wq {
939 __u32 attr_mask;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800940 __u32 wq_handle;
941 __u32 wq_state;
942 __u32 curr_wq_state;
Christopher Ferris525ce912017-07-26 13:12:53 -0700943 __u32 flags;
944 __u32 flags_mask;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800945};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800946#define IB_USER_VERBS_MAX_LOG_IND_TBL_SIZE 0x0d
947struct ib_uverbs_ex_create_rwq_ind_table {
948 __u32 comp_mask;
949 __u32 log_ind_tbl_size;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800950 __u32 wq_handles[0];
951};
952struct ib_uverbs_ex_create_rwq_ind_table_resp {
953 __u32 comp_mask;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800954 __u32 response_length;
955 __u32 ind_tbl_handle;
956 __u32 ind_tbl_num;
957};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800958struct ib_uverbs_ex_destroy_rwq_ind_table {
959 __u32 comp_mask;
960 __u32 ind_tbl_handle;
961};
Christopher Ferris934ec942018-01-31 15:29:16 -0800962struct ib_uverbs_cq_moderation {
963 __u16 cq_count;
964 __u16 cq_period;
965};
966struct ib_uverbs_ex_modify_cq {
967 __u32 cq_handle;
968 __u32 attr_mask;
969 struct ib_uverbs_cq_moderation attr;
970 __u32 reserved;
971};
Christopher Ferris525ce912017-07-26 13:12:53 -0700972#define IB_DEVICE_NAME_MAX 64
Ben Cheng655a7c02013-10-16 16:09:24 -0700973#endif