blob: 53e47256b69de3f4f389e40cbc0ffa433c4a9cb7 [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 {
Christopher Ferris76a1d452018-06-27 14:12:29 -070082 __aligned_u64 element;
Tao Baod7db5942015-01-28 10:07:51 -080083 __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 {
Christopher Ferris76a1d452018-06-27 14:12:29 -070087 __aligned_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 Ferris76a1d452018-06-27 14:12:29 -070095#define IB_USER_VERBS_CMD_FLAG_EXTENDED 0x80000000u
Christopher Ferris49f525c2016-12-12 14:55:36 -080096struct ib_uverbs_cmd_hdr {
Tao Baod7db5942015-01-28 10:07:51 -080097 __u32 command;
98 __u16 in_words;
Christopher Ferris48af7cb2017-02-21 12:35:09 -080099 __u16 out_words;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800100};
Christopher Ferris38062f92014-07-09 15:33:25 -0700101struct ib_uverbs_ex_cmd_hdr {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700102 __aligned_u64 response;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800103 __u16 provider_in_words;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800104 __u16 provider_out_words;
Tao Baod7db5942015-01-28 10:07:51 -0800105 __u32 cmd_hdr_reserved;
Christopher Ferris38062f92014-07-09 15:33:25 -0700106};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800107struct ib_uverbs_get_context {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700108 __aligned_u64 response;
109 __aligned_u64 driver_data[0];
Ben Cheng655a7c02013-10-16 16:09:24 -0700110};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800111struct ib_uverbs_get_context_resp {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800112 __u32 async_fd;
Tao Baod7db5942015-01-28 10:07:51 -0800113 __u32 num_comp_vectors;
Ben Cheng655a7c02013-10-16 16:09:24 -0700114};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800115struct ib_uverbs_query_device {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700116 __aligned_u64 response;
117 __aligned_u64 driver_data[0];
Ben Cheng655a7c02013-10-16 16:09:24 -0700118};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800119struct ib_uverbs_query_device_resp {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700120 __aligned_u64 fw_ver;
Tao Baod7db5942015-01-28 10:07:51 -0800121 __be64 node_guid;
122 __be64 sys_image_guid;
Christopher Ferris76a1d452018-06-27 14:12:29 -0700123 __aligned_u64 max_mr_size;
124 __aligned_u64 page_size_cap;
Tao Baod7db5942015-01-28 10:07:51 -0800125 __u32 vendor_id;
126 __u32 vendor_part_id;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800127 __u32 hw_ver;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800128 __u32 max_qp;
Tao Baod7db5942015-01-28 10:07:51 -0800129 __u32 max_qp_wr;
130 __u32 device_cap_flags;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800131 __u32 max_sge;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800132 __u32 max_sge_rd;
Tao Baod7db5942015-01-28 10:07:51 -0800133 __u32 max_cq;
134 __u32 max_cqe;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800135 __u32 max_mr;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800136 __u32 max_pd;
Tao Baod7db5942015-01-28 10:07:51 -0800137 __u32 max_qp_rd_atom;
138 __u32 max_ee_rd_atom;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800139 __u32 max_res_rd_atom;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800140 __u32 max_qp_init_rd_atom;
Tao Baod7db5942015-01-28 10:07:51 -0800141 __u32 max_ee_init_rd_atom;
142 __u32 atomic_cap;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800143 __u32 max_ee;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800144 __u32 max_rdd;
Tao Baod7db5942015-01-28 10:07:51 -0800145 __u32 max_mw;
146 __u32 max_raw_ipv6_qp;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800147 __u32 max_raw_ethy_qp;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800148 __u32 max_mcast_grp;
Tao Baod7db5942015-01-28 10:07:51 -0800149 __u32 max_mcast_qp_attach;
150 __u32 max_total_mcast_qp_attach;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800151 __u32 max_ah;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800152 __u32 max_fmr;
Tao Baod7db5942015-01-28 10:07:51 -0800153 __u32 max_map_per_fmr;
154 __u32 max_srq;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800155 __u32 max_srq_wr;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800156 __u32 max_srq_sge;
Tao Baod7db5942015-01-28 10:07:51 -0800157 __u16 max_pkeys;
158 __u8 local_ca_ack_delay;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800159 __u8 phys_port_cnt;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800160 __u8 reserved[4];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800161};
162struct ib_uverbs_ex_query_device {
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800163 __u32 comp_mask;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800164 __u32 reserved;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800165};
166struct ib_uverbs_odp_caps {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700167 __aligned_u64 general_caps;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800168 struct {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800169 __u32 rc_odp_caps;
170 __u32 uc_odp_caps;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800171 __u32 ud_odp_caps;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800172 } per_transport_caps;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800173 __u32 reserved;
174};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800175struct ib_uverbs_rss_caps {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800176 __u32 supported_qpts;
177 __u32 max_rwq_indirection_tables;
178 __u32 max_rwq_indirection_table_size;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800179 __u32 reserved;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800180};
Christopher Ferris1308ad32017-11-14 17:32:13 -0800181struct ib_uverbs_tm_caps {
182 __u32 max_rndv_hdr_size;
183 __u32 max_num_tags;
184 __u32 flags;
185 __u32 max_ops;
186 __u32 max_sge;
187 __u32 reserved;
188};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800189struct ib_uverbs_ex_query_device_resp {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800190 struct ib_uverbs_query_device_resp base;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800191 __u32 comp_mask;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800192 __u32 response_length;
193 struct ib_uverbs_odp_caps odp_caps;
Christopher Ferris76a1d452018-06-27 14:12:29 -0700194 __aligned_u64 timestamp_mask;
195 __aligned_u64 hca_core_clock;
196 __aligned_u64 device_cap_flags_ex;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800197 struct ib_uverbs_rss_caps rss_caps;
198 __u32 max_wq_type_rq;
Christopher Ferris525ce912017-07-26 13:12:53 -0700199 __u32 raw_packet_caps;
Christopher Ferris1308ad32017-11-14 17:32:13 -0800200 struct ib_uverbs_tm_caps tm_caps;
Christopher Ferris934ec942018-01-31 15:29:16 -0800201 struct ib_uverbs_cq_moderation_caps cq_moderation_caps;
Christopher Ferris76a1d452018-06-27 14:12:29 -0700202 __aligned_u64 max_dm_size;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800203};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800204struct ib_uverbs_query_port {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700205 __aligned_u64 response;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800206 __u8 port_num;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800207 __u8 reserved[7];
Christopher Ferris76a1d452018-06-27 14:12:29 -0700208 __aligned_u64 driver_data[0];
Christopher Ferris106b3a82016-08-24 12:15:38 -0700209};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800210struct ib_uverbs_query_port_resp {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800211 __u32 port_cap_flags;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800212 __u32 max_msg_sz;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700213 __u32 bad_pkey_cntr;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800214 __u32 qkey_viol_cntr;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800215 __u32 gid_tbl_len;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800216 __u16 pkey_tbl_len;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700217 __u16 lid;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800218 __u16 sm_lid;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800219 __u8 state;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800220 __u8 max_mtu;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700221 __u8 active_mtu;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800222 __u8 lmc;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800223 __u8 max_vl_num;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800224 __u8 sm_sl;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700225 __u8 subnet_timeout;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800226 __u8 init_type_reply;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800227 __u8 active_width;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800228 __u8 active_speed;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700229 __u8 phys_state;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800230 __u8 link_layer;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800231 __u8 reserved[2];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800232};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700233struct ib_uverbs_alloc_pd {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700234 __aligned_u64 response;
235 __aligned_u64 driver_data[0];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800236};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700237struct ib_uverbs_alloc_pd_resp {
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800238 __u32 pd_handle;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800239};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800240struct ib_uverbs_dealloc_pd {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700241 __u32 pd_handle;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800242};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800243struct ib_uverbs_open_xrcd {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700244 __aligned_u64 response;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700245 __u32 fd;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800246 __u32 oflags;
Christopher Ferris76a1d452018-06-27 14:12:29 -0700247 __aligned_u64 driver_data[0];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800248};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700249struct ib_uverbs_open_xrcd_resp {
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800250 __u32 xrcd_handle;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800251};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800252struct ib_uverbs_close_xrcd {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700253 __u32 xrcd_handle;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800254};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800255struct ib_uverbs_reg_mr {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700256 __aligned_u64 response;
257 __aligned_u64 start;
258 __aligned_u64 length;
259 __aligned_u64 hca_va;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800260 __u32 pd_handle;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700261 __u32 access_flags;
Christopher Ferris76a1d452018-06-27 14:12:29 -0700262 __aligned_u64 driver_data[0];
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800263};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800264struct ib_uverbs_reg_mr_resp {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700265 __u32 mr_handle;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800266 __u32 lkey;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800267 __u32 rkey;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800268};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700269struct ib_uverbs_rereg_mr {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700270 __aligned_u64 response;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800271 __u32 mr_handle;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800272 __u32 flags;
Christopher Ferris76a1d452018-06-27 14:12:29 -0700273 __aligned_u64 start;
274 __aligned_u64 length;
275 __aligned_u64 hca_va;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800276 __u32 pd_handle;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700277 __u32 access_flags;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800278};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800279struct ib_uverbs_rereg_mr_resp {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800280 __u32 lkey;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700281 __u32 rkey;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800282};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800283struct ib_uverbs_dereg_mr {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800284 __u32 mr_handle;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700285};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800286struct ib_uverbs_alloc_mw {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700287 __aligned_u64 response;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800288 __u32 pd_handle;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700289 __u8 mw_type;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800290 __u8 reserved[3];
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800291};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800292struct ib_uverbs_alloc_mw_resp {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700293 __u32 mw_handle;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800294 __u32 rkey;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800295};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800296struct ib_uverbs_dealloc_mw {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700297 __u32 mw_handle;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800298};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800299struct ib_uverbs_create_comp_channel {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700300 __aligned_u64 response;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700301};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800302struct ib_uverbs_create_comp_channel_resp {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800303 __u32 fd;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800304};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700305struct ib_uverbs_create_cq {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700306 __aligned_u64 response;
307 __aligned_u64 user_handle;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800308 __u32 cqe;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700309 __u32 comp_vector;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800310 __s32 comp_channel;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800311 __u32 reserved;
Christopher Ferris76a1d452018-06-27 14:12:29 -0700312 __aligned_u64 driver_data[0];
313};
314enum ib_uverbs_ex_create_cq_flags {
315 IB_UVERBS_CQ_FLAGS_TIMESTAMP_COMPLETION = 1 << 0,
316 IB_UVERBS_CQ_FLAGS_IGNORE_OVERRUN = 1 << 1,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700317};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800318struct ib_uverbs_ex_create_cq {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700319 __aligned_u64 user_handle;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800320 __u32 cqe;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700321 __u32 comp_vector;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800322 __s32 comp_channel;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800323 __u32 comp_mask;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800324 __u32 flags;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700325 __u32 reserved;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800326};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800327struct ib_uverbs_create_cq_resp {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800328 __u32 cq_handle;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700329 __u32 cqe;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800330};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800331struct ib_uverbs_ex_create_cq_resp {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800332 struct ib_uverbs_create_cq_resp base;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700333 __u32 comp_mask;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800334 __u32 response_length;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800335};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800336struct ib_uverbs_resize_cq {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700337 __aligned_u64 response;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800338 __u32 cq_handle;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800339 __u32 cqe;
Christopher Ferris76a1d452018-06-27 14:12:29 -0700340 __aligned_u64 driver_data[0];
Christopher Ferris106b3a82016-08-24 12:15:38 -0700341};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800342struct ib_uverbs_resize_cq_resp {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800343 __u32 cqe;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800344 __u32 reserved;
Christopher Ferris76a1d452018-06-27 14:12:29 -0700345 __aligned_u64 driver_data[0];
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800346};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800347struct ib_uverbs_poll_cq {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700348 __aligned_u64 response;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700349 __u32 cq_handle;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800350 __u32 ne;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800351};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800352struct ib_uverbs_wc {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700353 __aligned_u64 wr_id;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800354 __u32 status;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800355 __u32 opcode;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800356 __u32 vendor_err;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700357 __u32 byte_len;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800358 union {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700359 __be32 imm_data;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800360 __u32 invalidate_rkey;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700361 } ex;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800362 __u32 qp_num;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800363 __u32 src_qp;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800364 __u32 wc_flags;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700365 __u16 pkey_index;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800366 __u16 slid;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800367 __u8 sl;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800368 __u8 dlid_path_bits;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700369 __u8 port_num;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800370 __u8 reserved;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800371};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800372struct ib_uverbs_poll_cq_resp {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700373 __u32 count;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800374 __u32 reserved;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800375 struct ib_uverbs_wc wc[0];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800376};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700377struct ib_uverbs_req_notify_cq {
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800378 __u32 cq_handle;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800379 __u32 solicited_only;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800380};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700381struct ib_uverbs_destroy_cq {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700382 __aligned_u64 response;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800383 __u32 cq_handle;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800384 __u32 reserved;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700385};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800386struct ib_uverbs_destroy_cq_resp {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800387 __u32 comp_events_reported;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800388 __u32 async_events_reported;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700389};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800390struct ib_uverbs_global_route {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800391 __u8 dgid[16];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800392 __u32 flow_label;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700393 __u8 sgid_index;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800394 __u8 hop_limit;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800395 __u8 traffic_class;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800396 __u8 reserved;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700397};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800398struct ib_uverbs_ah_attr {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800399 struct ib_uverbs_global_route grh;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800400 __u16 dlid;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700401 __u8 sl;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800402 __u8 src_path_bits;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800403 __u8 static_rate;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800404 __u8 is_global;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700405 __u8 port_num;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800406 __u8 reserved;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800407};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800408struct ib_uverbs_qp_attr {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700409 __u32 qp_attr_mask;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800410 __u32 qp_state;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800411 __u32 cur_qp_state;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800412 __u32 path_mtu;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700413 __u32 path_mig_state;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800414 __u32 qkey;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800415 __u32 rq_psn;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800416 __u32 sq_psn;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700417 __u32 dest_qp_num;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800418 __u32 qp_access_flags;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800419 struct ib_uverbs_ah_attr ah_attr;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800420 struct ib_uverbs_ah_attr alt_ah_attr;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700421 __u32 max_send_wr;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800422 __u32 max_recv_wr;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800423 __u32 max_send_sge;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800424 __u32 max_recv_sge;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700425 __u32 max_inline_data;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800426 __u16 pkey_index;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800427 __u16 alt_pkey_index;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800428 __u8 en_sqd_async_notify;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700429 __u8 sq_draining;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800430 __u8 max_rd_atomic;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800431 __u8 max_dest_rd_atomic;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800432 __u8 min_rnr_timer;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700433 __u8 port_num;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800434 __u8 timeout;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800435 __u8 retry_cnt;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800436 __u8 rnr_retry;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700437 __u8 alt_port_num;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800438 __u8 alt_timeout;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800439 __u8 reserved[5];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800440};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700441struct ib_uverbs_create_qp {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700442 __aligned_u64 response;
443 __aligned_u64 user_handle;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800444 __u32 pd_handle;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700445 __u32 send_cq_handle;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800446 __u32 recv_cq_handle;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800447 __u32 srq_handle;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800448 __u32 max_send_wr;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700449 __u32 max_recv_wr;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800450 __u32 max_send_sge;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800451 __u32 max_recv_sge;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800452 __u32 max_inline_data;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700453 __u8 sq_sig_all;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800454 __u8 qp_type;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800455 __u8 is_srq;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800456 __u8 reserved;
Christopher Ferris76a1d452018-06-27 14:12:29 -0700457 __aligned_u64 driver_data[0];
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800458};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800459enum ib_uverbs_create_qp_mask {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800460 IB_UVERBS_CREATE_QP_MASK_IND_TABLE = 1UL << 0,
461};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800462enum {
463 IB_UVERBS_CREATE_QP_SUP_COMP_MASK = IB_UVERBS_CREATE_QP_MASK_IND_TABLE,
464};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800465enum {
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800466 IB_USER_LEGACY_LAST_QP_ATTR_MASK = 1ULL << 20,
467};
468enum {
469 IB_USER_LAST_QP_ATTR_MASK = 1ULL << 25,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800470};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800471struct ib_uverbs_ex_create_qp {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700472 __aligned_u64 user_handle;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800473 __u32 pd_handle;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800474 __u32 send_cq_handle;
Tao Baod7db5942015-01-28 10:07:51 -0800475 __u32 recv_cq_handle;
476 __u32 srq_handle;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800477 __u32 max_send_wr;
Tao Baod7db5942015-01-28 10:07:51 -0800478 __u32 max_recv_wr;
479 __u32 max_send_sge;
480 __u32 max_recv_sge;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800481 __u32 max_inline_data;
Tao Baod7db5942015-01-28 10:07:51 -0800482 __u8 sq_sig_all;
483 __u8 qp_type;
484 __u8 is_srq;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800485 __u8 reserved;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800486 __u32 comp_mask;
487 __u32 create_flags;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800488 __u32 rwq_ind_tbl_handle;
Christopher Ferris1308ad32017-11-14 17:32:13 -0800489 __u32 source_qpn;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800490};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700491struct ib_uverbs_open_qp {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700492 __aligned_u64 response;
493 __aligned_u64 user_handle;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800494 __u32 pd_handle;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700495 __u32 qpn;
Tao Baod7db5942015-01-28 10:07:51 -0800496 __u8 qp_type;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800497 __u8 reserved[7];
Christopher Ferris76a1d452018-06-27 14:12:29 -0700498 __aligned_u64 driver_data[0];
Christopher Ferris106b3a82016-08-24 12:15:38 -0700499};
Ben Cheng655a7c02013-10-16 16:09:24 -0700500struct ib_uverbs_create_qp_resp {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800501 __u32 qp_handle;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800502 __u32 qpn;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700503 __u32 max_send_wr;
Tao Baod7db5942015-01-28 10:07:51 -0800504 __u32 max_recv_wr;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800505 __u32 max_send_sge;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800506 __u32 max_recv_sge;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700507 __u32 max_inline_data;
Tao Baod7db5942015-01-28 10:07:51 -0800508 __u32 reserved;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800509};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800510struct ib_uverbs_ex_create_qp_resp {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700511 struct ib_uverbs_create_qp_resp base;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800512 __u32 comp_mask;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800513 __u32 response_length;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800514};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700515struct ib_uverbs_qp_dest {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800516 __u8 dgid[16];
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800517 __u32 flow_label;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800518 __u16 dlid;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700519 __u16 reserved;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800520 __u8 sgid_index;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800521 __u8 hop_limit;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800522 __u8 traffic_class;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700523 __u8 sl;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800524 __u8 src_path_bits;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800525 __u8 static_rate;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800526 __u8 is_global;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700527 __u8 port_num;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800528};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800529struct ib_uverbs_query_qp {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700530 __aligned_u64 response;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700531 __u32 qp_handle;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800532 __u32 attr_mask;
Christopher Ferris76a1d452018-06-27 14:12:29 -0700533 __aligned_u64 driver_data[0];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800534};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700535struct ib_uverbs_query_qp_resp {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800536 struct ib_uverbs_qp_dest dest;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800537 struct ib_uverbs_qp_dest alt_dest;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800538 __u32 max_send_wr;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700539 __u32 max_recv_wr;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800540 __u32 max_send_sge;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800541 __u32 max_recv_sge;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800542 __u32 max_inline_data;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700543 __u32 qkey;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800544 __u32 rq_psn;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800545 __u32 sq_psn;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800546 __u32 dest_qp_num;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700547 __u32 qp_access_flags;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800548 __u16 pkey_index;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800549 __u16 alt_pkey_index;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800550 __u8 qp_state;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700551 __u8 cur_qp_state;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800552 __u8 path_mtu;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800553 __u8 path_mig_state;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800554 __u8 sq_draining;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700555 __u8 max_rd_atomic;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800556 __u8 max_dest_rd_atomic;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800557 __u8 min_rnr_timer;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800558 __u8 port_num;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700559 __u8 timeout;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800560 __u8 retry_cnt;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800561 __u8 rnr_retry;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800562 __u8 alt_port_num;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700563 __u8 alt_timeout;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800564 __u8 sq_sig_all;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800565 __u8 reserved[5];
Christopher Ferris76a1d452018-06-27 14:12:29 -0700566 __aligned_u64 driver_data[0];
Christopher Ferris106b3a82016-08-24 12:15:38 -0700567};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800568struct ib_uverbs_modify_qp {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800569 struct ib_uverbs_qp_dest dest;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800570 struct ib_uverbs_qp_dest alt_dest;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700571 __u32 qp_handle;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800572 __u32 attr_mask;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800573 __u32 qkey;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800574 __u32 rq_psn;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700575 __u32 sq_psn;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800576 __u32 dest_qp_num;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800577 __u32 qp_access_flags;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800578 __u16 pkey_index;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700579 __u16 alt_pkey_index;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800580 __u8 qp_state;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800581 __u8 cur_qp_state;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800582 __u8 path_mtu;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700583 __u8 path_mig_state;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800584 __u8 en_sqd_async_notify;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800585 __u8 max_rd_atomic;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800586 __u8 max_dest_rd_atomic;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700587 __u8 min_rnr_timer;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800588 __u8 port_num;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800589 __u8 timeout;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800590 __u8 retry_cnt;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700591 __u8 rnr_retry;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800592 __u8 alt_port_num;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800593 __u8 alt_timeout;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800594 __u8 reserved[2];
Christopher Ferris76a1d452018-06-27 14:12:29 -0700595 __aligned_u64 driver_data[0];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800596};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800597struct ib_uverbs_ex_modify_qp {
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800598 struct ib_uverbs_modify_qp base;
599 __u32 rate_limit;
600 __u32 reserved;
601};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800602struct ib_uverbs_modify_qp_resp {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800603};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800604struct ib_uverbs_ex_modify_qp_resp {
605 __u32 comp_mask;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800606 __u32 response_length;
607};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700608struct ib_uverbs_destroy_qp {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700609 __aligned_u64 response;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800610 __u32 qp_handle;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800611 __u32 reserved;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700612};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800613struct ib_uverbs_destroy_qp_resp {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800614 __u32 events_reported;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800615};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700616struct ib_uverbs_sge {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700617 __aligned_u64 addr;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800618 __u32 length;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800619 __u32 lkey;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700620};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800621struct ib_uverbs_send_wr {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700622 __aligned_u64 wr_id;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800623 __u32 num_sge;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700624 __u32 opcode;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800625 __u32 send_flags;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800626 union {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700627 __be32 imm_data;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700628 __u32 invalidate_rkey;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800629 } ex;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800630 union {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800631 struct {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700632 __aligned_u64 remote_addr;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800633 __u32 rkey;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800634 __u32 reserved;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800635 } rdma;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700636 struct {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700637 __aligned_u64 remote_addr;
638 __aligned_u64 compare_add;
639 __aligned_u64 swap;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700640 __u32 rkey;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800641 __u32 reserved;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800642 } atomic;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800643 struct {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700644 __u32 ah;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800645 __u32 remote_qpn;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800646 __u32 remote_qkey;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800647 __u32 reserved;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700648 } ud;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800649 } wr;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800650};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800651struct ib_uverbs_post_send {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700652 __aligned_u64 response;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800653 __u32 qp_handle;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800654 __u32 wr_count;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800655 __u32 sge_count;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700656 __u32 wqe_size;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800657 struct ib_uverbs_send_wr send_wr[0];
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800658};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800659struct ib_uverbs_post_send_resp {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700660 __u32 bad_wr;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800661};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800662struct ib_uverbs_recv_wr {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700663 __aligned_u64 wr_id;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700664 __u32 num_sge;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800665 __u32 reserved;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800666};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800667struct ib_uverbs_post_recv {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700668 __aligned_u64 response;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800669 __u32 qp_handle;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800670 __u32 wr_count;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800671 __u32 sge_count;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700672 __u32 wqe_size;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800673 struct ib_uverbs_recv_wr recv_wr[0];
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800674};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800675struct ib_uverbs_post_recv_resp {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700676 __u32 bad_wr;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800677};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800678struct ib_uverbs_post_srq_recv {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700679 __aligned_u64 response;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700680 __u32 srq_handle;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800681 __u32 wr_count;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800682 __u32 sge_count;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800683 __u32 wqe_size;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700684 struct ib_uverbs_recv_wr recv[0];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800685};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800686struct ib_uverbs_post_srq_recv_resp {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800687 __u32 bad_wr;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700688};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800689struct ib_uverbs_create_ah {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700690 __aligned_u64 response;
691 __aligned_u64 user_handle;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700692 __u32 pd_handle;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800693 __u32 reserved;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800694 struct ib_uverbs_ah_attr attr;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800695};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700696struct ib_uverbs_create_ah_resp {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800697 __u32 ah_handle;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800698};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800699struct ib_uverbs_destroy_ah {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700700 __u32 ah_handle;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800701};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800702struct ib_uverbs_attach_mcast {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800703 __u8 gid[16];
Christopher Ferris106b3a82016-08-24 12:15:38 -0700704 __u32 qp_handle;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800705 __u16 mlid;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800706 __u16 reserved;
Christopher Ferris76a1d452018-06-27 14:12:29 -0700707 __aligned_u64 driver_data[0];
Christopher Ferris106b3a82016-08-24 12:15:38 -0700708};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800709struct ib_uverbs_detach_mcast {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800710 __u8 gid[16];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800711 __u32 qp_handle;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700712 __u16 mlid;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800713 __u16 reserved;
Christopher Ferris76a1d452018-06-27 14:12:29 -0700714 __aligned_u64 driver_data[0];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800715};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700716struct ib_uverbs_flow_spec_hdr {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800717 __u32 type;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800718 __u16 size;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800719 __u16 reserved;
Christopher Ferris76a1d452018-06-27 14:12:29 -0700720 __aligned_u64 flow_spec_data[0];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800721};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800722struct ib_uverbs_flow_eth_filter {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800723 __u8 dst_mac[6];
Christopher Ferris106b3a82016-08-24 12:15:38 -0700724 __u8 src_mac[6];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800725 __be16 ether_type;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800726 __be16 vlan_tag;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800727};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700728struct ib_uverbs_flow_spec_eth {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800729 union {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800730 struct ib_uverbs_flow_spec_hdr hdr;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800731 struct {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700732 __u32 type;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800733 __u16 size;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800734 __u16 reserved;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800735 };
Christopher Ferris106b3a82016-08-24 12:15:38 -0700736 };
Christopher Ferris05d08e92016-02-04 13:16:38 -0800737 struct ib_uverbs_flow_eth_filter val;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800738 struct ib_uverbs_flow_eth_filter mask;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800739};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700740struct ib_uverbs_flow_ipv4_filter {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800741 __be32 src_ip;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800742 __be32 dst_ip;
743 __u8 proto;
744 __u8 tos;
745 __u8 ttl;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800746 __u8 flags;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800747};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700748struct ib_uverbs_flow_spec_ipv4 {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800749 union {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800750 struct ib_uverbs_flow_spec_hdr hdr;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800751 struct {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700752 __u32 type;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800753 __u16 size;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800754 __u16 reserved;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800755 };
Christopher Ferris106b3a82016-08-24 12:15:38 -0700756 };
Christopher Ferris05d08e92016-02-04 13:16:38 -0800757 struct ib_uverbs_flow_ipv4_filter val;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800758 struct ib_uverbs_flow_ipv4_filter mask;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800759};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700760struct ib_uverbs_flow_tcp_udp_filter {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800761 __be16 dst_port;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800762 __be16 src_port;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800763};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700764struct ib_uverbs_flow_spec_tcp_udp {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800765 union {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800766 struct ib_uverbs_flow_spec_hdr hdr;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800767 struct {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700768 __u32 type;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800769 __u16 size;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800770 __u16 reserved;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800771 };
Christopher Ferris106b3a82016-08-24 12:15:38 -0700772 };
Christopher Ferris05d08e92016-02-04 13:16:38 -0800773 struct ib_uverbs_flow_tcp_udp_filter val;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800774 struct ib_uverbs_flow_tcp_udp_filter mask;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800775};
776struct ib_uverbs_flow_ipv6_filter {
777 __u8 src_ip[16];
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800778 __u8 dst_ip[16];
779 __be32 flow_label;
780 __u8 next_hdr;
781 __u8 traffic_class;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800782 __u8 hop_limit;
783 __u8 reserved;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800784};
785struct ib_uverbs_flow_spec_ipv6 {
786 union {
787 struct ib_uverbs_flow_spec_hdr hdr;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800788 struct {
789 __u32 type;
790 __u16 size;
791 __u16 reserved;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800792 };
793 };
794 struct ib_uverbs_flow_ipv6_filter val;
795 struct ib_uverbs_flow_ipv6_filter mask;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800796};
Christopher Ferris525ce912017-07-26 13:12:53 -0700797struct ib_uverbs_flow_spec_action_tag {
798 union {
799 struct ib_uverbs_flow_spec_hdr hdr;
800 struct {
801 __u32 type;
802 __u16 size;
803 __u16 reserved;
804 };
805 };
806 __u32 tag_id;
807 __u32 reserved1;
808};
809struct ib_uverbs_flow_spec_action_drop {
810 union {
811 struct ib_uverbs_flow_spec_hdr hdr;
812 struct {
813 __u32 type;
814 __u16 size;
815 __u16 reserved;
816 };
817 };
818};
Christopher Ferris76a1d452018-06-27 14:12:29 -0700819struct ib_uverbs_flow_spec_action_handle {
820 union {
821 struct ib_uverbs_flow_spec_hdr hdr;
822 struct {
823 __u32 type;
824 __u16 size;
825 __u16 reserved;
826 };
827 };
828 __u32 handle;
829 __u32 reserved1;
830};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800831struct ib_uverbs_flow_tunnel_filter {
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800832 __be32 tunnel_id;
833};
834struct ib_uverbs_flow_spec_tunnel {
835 union {
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800836 struct ib_uverbs_flow_spec_hdr hdr;
837 struct {
838 __u32 type;
839 __u16 size;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800840 __u16 reserved;
841 };
842 };
843 struct ib_uverbs_flow_tunnel_filter val;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800844 struct ib_uverbs_flow_tunnel_filter mask;
845};
Christopher Ferris76a1d452018-06-27 14:12:29 -0700846struct ib_uverbs_flow_spec_esp_filter {
847 __u32 spi;
848 __u32 seq;
849};
850struct ib_uverbs_flow_spec_esp {
851 union {
852 struct ib_uverbs_flow_spec_hdr hdr;
853 struct {
854 __u32 type;
855 __u16 size;
856 __u16 reserved;
857 };
858 };
859 struct ib_uverbs_flow_spec_esp_filter val;
860 struct ib_uverbs_flow_spec_esp_filter mask;
861};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800862struct ib_uverbs_flow_attr {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800863 __u32 type;
Tao Baod7db5942015-01-28 10:07:51 -0800864 __u16 size;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800865 __u16 priority;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700866 __u8 num_of_specs;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800867 __u8 reserved[2];
Tao Baod7db5942015-01-28 10:07:51 -0800868 __u8 port;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800869 __u32 flags;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700870 struct ib_uverbs_flow_spec_hdr flow_specs[0];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800871};
Christopher Ferris38062f92014-07-09 15:33:25 -0700872struct ib_uverbs_create_flow {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800873 __u32 comp_mask;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700874 __u32 qp_handle;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800875 struct ib_uverbs_flow_attr flow_attr;
Christopher Ferris38062f92014-07-09 15:33:25 -0700876};
877struct ib_uverbs_create_flow_resp {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700878 __u32 comp_mask;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800879 __u32 flow_handle;
Christopher Ferris38062f92014-07-09 15:33:25 -0700880};
881struct ib_uverbs_destroy_flow {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700882 __u32 comp_mask;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800883 __u32 flow_handle;
Ben Cheng655a7c02013-10-16 16:09:24 -0700884};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800885struct ib_uverbs_create_srq {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700886 __aligned_u64 response;
887 __aligned_u64 user_handle;
Tao Baod7db5942015-01-28 10:07:51 -0800888 __u32 pd_handle;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800889 __u32 max_wr;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700890 __u32 max_sge;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800891 __u32 srq_limit;
Christopher Ferris76a1d452018-06-27 14:12:29 -0700892 __aligned_u64 driver_data[0];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800893};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700894struct ib_uverbs_create_xsrq {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700895 __aligned_u64 response;
896 __aligned_u64 user_handle;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800897 __u32 srq_type;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700898 __u32 pd_handle;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800899 __u32 max_wr;
Tao Baod7db5942015-01-28 10:07:51 -0800900 __u32 max_sge;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800901 __u32 srq_limit;
Christopher Ferris1308ad32017-11-14 17:32:13 -0800902 __u32 max_num_tags;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800903 __u32 xrcd_handle;
Tao Baod7db5942015-01-28 10:07:51 -0800904 __u32 cq_handle;
Christopher Ferris76a1d452018-06-27 14:12:29 -0700905 __aligned_u64 driver_data[0];
Christopher Ferris106b3a82016-08-24 12:15:38 -0700906};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800907struct ib_uverbs_create_srq_resp {
Tao Baod7db5942015-01-28 10:07:51 -0800908 __u32 srq_handle;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800909 __u32 max_wr;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700910 __u32 max_sge;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800911 __u32 srqn;
Ben Cheng655a7c02013-10-16 16:09:24 -0700912};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800913struct ib_uverbs_modify_srq {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700914 __u32 srq_handle;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800915 __u32 attr_mask;
Tao Baod7db5942015-01-28 10:07:51 -0800916 __u32 max_wr;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800917 __u32 srq_limit;
Christopher Ferris76a1d452018-06-27 14:12:29 -0700918 __aligned_u64 driver_data[0];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800919};
Ben Cheng655a7c02013-10-16 16:09:24 -0700920struct ib_uverbs_query_srq {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700921 __aligned_u64 response;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700922 __u32 srq_handle;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800923 __u32 reserved;
Christopher Ferris76a1d452018-06-27 14:12:29 -0700924 __aligned_u64 driver_data[0];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800925};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700926struct ib_uverbs_query_srq_resp {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800927 __u32 max_wr;
Tao Baod7db5942015-01-28 10:07:51 -0800928 __u32 max_sge;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800929 __u32 srq_limit;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700930 __u32 reserved;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800931};
Ben Cheng655a7c02013-10-16 16:09:24 -0700932struct ib_uverbs_destroy_srq {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700933 __aligned_u64 response;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700934 __u32 srq_handle;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800935 __u32 reserved;
Ben Cheng655a7c02013-10-16 16:09:24 -0700936};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800937struct ib_uverbs_destroy_srq_resp {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700938 __u32 events_reported;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800939};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800940struct ib_uverbs_ex_create_wq {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800941 __u32 comp_mask;
942 __u32 wq_type;
Christopher Ferris76a1d452018-06-27 14:12:29 -0700943 __aligned_u64 user_handle;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800944 __u32 pd_handle;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800945 __u32 cq_handle;
946 __u32 max_wr;
947 __u32 max_sge;
Christopher Ferris525ce912017-07-26 13:12:53 -0700948 __u32 create_flags;
949 __u32 reserved;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800950};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800951struct ib_uverbs_ex_create_wq_resp {
952 __u32 comp_mask;
953 __u32 response_length;
954 __u32 wq_handle;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800955 __u32 max_wr;
956 __u32 max_sge;
957 __u32 wqn;
958};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800959struct ib_uverbs_ex_destroy_wq {
960 __u32 comp_mask;
961 __u32 wq_handle;
962};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800963struct ib_uverbs_ex_destroy_wq_resp {
964 __u32 comp_mask;
965 __u32 response_length;
966 __u32 events_reported;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800967 __u32 reserved;
968};
969struct ib_uverbs_ex_modify_wq {
970 __u32 attr_mask;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800971 __u32 wq_handle;
972 __u32 wq_state;
973 __u32 curr_wq_state;
Christopher Ferris525ce912017-07-26 13:12:53 -0700974 __u32 flags;
975 __u32 flags_mask;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800976};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800977#define IB_USER_VERBS_MAX_LOG_IND_TBL_SIZE 0x0d
978struct ib_uverbs_ex_create_rwq_ind_table {
979 __u32 comp_mask;
980 __u32 log_ind_tbl_size;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800981 __u32 wq_handles[0];
982};
983struct ib_uverbs_ex_create_rwq_ind_table_resp {
984 __u32 comp_mask;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800985 __u32 response_length;
986 __u32 ind_tbl_handle;
987 __u32 ind_tbl_num;
988};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800989struct ib_uverbs_ex_destroy_rwq_ind_table {
990 __u32 comp_mask;
991 __u32 ind_tbl_handle;
992};
Christopher Ferris934ec942018-01-31 15:29:16 -0800993struct ib_uverbs_cq_moderation {
994 __u16 cq_count;
995 __u16 cq_period;
996};
997struct ib_uverbs_ex_modify_cq {
998 __u32 cq_handle;
999 __u32 attr_mask;
1000 struct ib_uverbs_cq_moderation attr;
1001 __u32 reserved;
1002};
Christopher Ferris525ce912017-07-26 13:12:53 -07001003#define IB_DEVICE_NAME_MAX 64
Ben Cheng655a7c02013-10-16 16:09:24 -07001004#endif