blob: 2f13ca48a2601fb47ed00ee046876b55c6343639 [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
Christopher Ferrisd842e432019-03-07 10:21:59 -080024enum ib_uverbs_write_cmds {
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;
Christopher Ferrisd842e432019-03-07 10:21:59 -0800114 __aligned_u64 driver_data[0];
Ben Cheng655a7c02013-10-16 16:09:24 -0700115};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800116struct ib_uverbs_query_device {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700117 __aligned_u64 response;
118 __aligned_u64 driver_data[0];
Ben Cheng655a7c02013-10-16 16:09:24 -0700119};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800120struct ib_uverbs_query_device_resp {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700121 __aligned_u64 fw_ver;
Tao Baod7db5942015-01-28 10:07:51 -0800122 __be64 node_guid;
123 __be64 sys_image_guid;
Christopher Ferris76a1d452018-06-27 14:12:29 -0700124 __aligned_u64 max_mr_size;
125 __aligned_u64 page_size_cap;
Tao Baod7db5942015-01-28 10:07:51 -0800126 __u32 vendor_id;
127 __u32 vendor_part_id;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800128 __u32 hw_ver;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800129 __u32 max_qp;
Tao Baod7db5942015-01-28 10:07:51 -0800130 __u32 max_qp_wr;
131 __u32 device_cap_flags;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800132 __u32 max_sge;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800133 __u32 max_sge_rd;
Tao Baod7db5942015-01-28 10:07:51 -0800134 __u32 max_cq;
135 __u32 max_cqe;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800136 __u32 max_mr;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800137 __u32 max_pd;
Tao Baod7db5942015-01-28 10:07:51 -0800138 __u32 max_qp_rd_atom;
139 __u32 max_ee_rd_atom;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800140 __u32 max_res_rd_atom;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800141 __u32 max_qp_init_rd_atom;
Tao Baod7db5942015-01-28 10:07:51 -0800142 __u32 max_ee_init_rd_atom;
143 __u32 atomic_cap;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800144 __u32 max_ee;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800145 __u32 max_rdd;
Tao Baod7db5942015-01-28 10:07:51 -0800146 __u32 max_mw;
147 __u32 max_raw_ipv6_qp;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800148 __u32 max_raw_ethy_qp;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800149 __u32 max_mcast_grp;
Tao Baod7db5942015-01-28 10:07:51 -0800150 __u32 max_mcast_qp_attach;
151 __u32 max_total_mcast_qp_attach;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800152 __u32 max_ah;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800153 __u32 max_fmr;
Tao Baod7db5942015-01-28 10:07:51 -0800154 __u32 max_map_per_fmr;
155 __u32 max_srq;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800156 __u32 max_srq_wr;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800157 __u32 max_srq_sge;
Tao Baod7db5942015-01-28 10:07:51 -0800158 __u16 max_pkeys;
159 __u8 local_ca_ack_delay;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800160 __u8 phys_port_cnt;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800161 __u8 reserved[4];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800162};
163struct ib_uverbs_ex_query_device {
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800164 __u32 comp_mask;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800165 __u32 reserved;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800166};
167struct ib_uverbs_odp_caps {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700168 __aligned_u64 general_caps;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800169 struct {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800170 __u32 rc_odp_caps;
171 __u32 uc_odp_caps;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800172 __u32 ud_odp_caps;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800173 } per_transport_caps;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800174 __u32 reserved;
175};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800176struct ib_uverbs_rss_caps {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800177 __u32 supported_qpts;
178 __u32 max_rwq_indirection_tables;
179 __u32 max_rwq_indirection_table_size;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800180 __u32 reserved;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800181};
Christopher Ferris1308ad32017-11-14 17:32:13 -0800182struct ib_uverbs_tm_caps {
183 __u32 max_rndv_hdr_size;
184 __u32 max_num_tags;
185 __u32 flags;
186 __u32 max_ops;
187 __u32 max_sge;
188 __u32 reserved;
189};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800190struct ib_uverbs_ex_query_device_resp {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800191 struct ib_uverbs_query_device_resp base;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800192 __u32 comp_mask;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800193 __u32 response_length;
194 struct ib_uverbs_odp_caps odp_caps;
Christopher Ferris76a1d452018-06-27 14:12:29 -0700195 __aligned_u64 timestamp_mask;
196 __aligned_u64 hca_core_clock;
197 __aligned_u64 device_cap_flags_ex;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800198 struct ib_uverbs_rss_caps rss_caps;
199 __u32 max_wq_type_rq;
Christopher Ferris525ce912017-07-26 13:12:53 -0700200 __u32 raw_packet_caps;
Christopher Ferris1308ad32017-11-14 17:32:13 -0800201 struct ib_uverbs_tm_caps tm_caps;
Christopher Ferris934ec942018-01-31 15:29:16 -0800202 struct ib_uverbs_cq_moderation_caps cq_moderation_caps;
Christopher Ferris76a1d452018-06-27 14:12:29 -0700203 __aligned_u64 max_dm_size;
Christopher Ferris24f97eb2019-05-20 12:58:13 -0700204 __u32 xrc_odp_caps;
205 __u32 reserved;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800206};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800207struct ib_uverbs_query_port {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700208 __aligned_u64 response;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800209 __u8 port_num;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800210 __u8 reserved[7];
Christopher Ferris76a1d452018-06-27 14:12:29 -0700211 __aligned_u64 driver_data[0];
Christopher Ferris106b3a82016-08-24 12:15:38 -0700212};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800213struct ib_uverbs_query_port_resp {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800214 __u32 port_cap_flags;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800215 __u32 max_msg_sz;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700216 __u32 bad_pkey_cntr;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800217 __u32 qkey_viol_cntr;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800218 __u32 gid_tbl_len;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800219 __u16 pkey_tbl_len;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700220 __u16 lid;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800221 __u16 sm_lid;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800222 __u8 state;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800223 __u8 max_mtu;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700224 __u8 active_mtu;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800225 __u8 lmc;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800226 __u8 max_vl_num;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800227 __u8 sm_sl;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700228 __u8 subnet_timeout;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800229 __u8 init_type_reply;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800230 __u8 active_width;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800231 __u8 active_speed;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700232 __u8 phys_state;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800233 __u8 link_layer;
Christopher Ferris9ce28842018-10-25 12:11:39 -0700234 __u8 flags;
235 __u8 reserved;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800236};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700237struct ib_uverbs_alloc_pd {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700238 __aligned_u64 response;
239 __aligned_u64 driver_data[0];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800240};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700241struct ib_uverbs_alloc_pd_resp {
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800242 __u32 pd_handle;
Christopher Ferrisd842e432019-03-07 10:21:59 -0800243 __u32 driver_data[0];
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800244};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800245struct ib_uverbs_dealloc_pd {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700246 __u32 pd_handle;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800247};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800248struct ib_uverbs_open_xrcd {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700249 __aligned_u64 response;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700250 __u32 fd;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800251 __u32 oflags;
Christopher Ferris76a1d452018-06-27 14:12:29 -0700252 __aligned_u64 driver_data[0];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800253};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700254struct ib_uverbs_open_xrcd_resp {
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800255 __u32 xrcd_handle;
Christopher Ferrisd842e432019-03-07 10:21:59 -0800256 __u32 driver_data[0];
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800257};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800258struct ib_uverbs_close_xrcd {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700259 __u32 xrcd_handle;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800260};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800261struct ib_uverbs_reg_mr {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700262 __aligned_u64 response;
263 __aligned_u64 start;
264 __aligned_u64 length;
265 __aligned_u64 hca_va;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800266 __u32 pd_handle;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700267 __u32 access_flags;
Christopher Ferris76a1d452018-06-27 14:12:29 -0700268 __aligned_u64 driver_data[0];
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800269};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800270struct ib_uverbs_reg_mr_resp {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700271 __u32 mr_handle;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800272 __u32 lkey;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800273 __u32 rkey;
Christopher Ferrisd842e432019-03-07 10:21:59 -0800274 __u32 driver_data[0];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800275};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700276struct ib_uverbs_rereg_mr {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700277 __aligned_u64 response;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800278 __u32 mr_handle;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800279 __u32 flags;
Christopher Ferris76a1d452018-06-27 14:12:29 -0700280 __aligned_u64 start;
281 __aligned_u64 length;
282 __aligned_u64 hca_va;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800283 __u32 pd_handle;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700284 __u32 access_flags;
Christopher Ferrisd842e432019-03-07 10:21:59 -0800285 __aligned_u64 driver_data[0];
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800286};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800287struct ib_uverbs_rereg_mr_resp {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800288 __u32 lkey;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700289 __u32 rkey;
Christopher Ferrisd842e432019-03-07 10:21:59 -0800290 __aligned_u64 driver_data[0];
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800291};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800292struct ib_uverbs_dereg_mr {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800293 __u32 mr_handle;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700294};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800295struct ib_uverbs_alloc_mw {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700296 __aligned_u64 response;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800297 __u32 pd_handle;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700298 __u8 mw_type;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800299 __u8 reserved[3];
Christopher Ferrisd842e432019-03-07 10:21:59 -0800300 __aligned_u64 driver_data[0];
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800301};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800302struct ib_uverbs_alloc_mw_resp {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700303 __u32 mw_handle;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800304 __u32 rkey;
Christopher Ferrisd842e432019-03-07 10:21:59 -0800305 __aligned_u64 driver_data[0];
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800306};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800307struct ib_uverbs_dealloc_mw {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700308 __u32 mw_handle;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800309};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800310struct ib_uverbs_create_comp_channel {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700311 __aligned_u64 response;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700312};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800313struct ib_uverbs_create_comp_channel_resp {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800314 __u32 fd;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800315};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700316struct ib_uverbs_create_cq {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700317 __aligned_u64 response;
318 __aligned_u64 user_handle;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800319 __u32 cqe;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700320 __u32 comp_vector;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800321 __s32 comp_channel;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800322 __u32 reserved;
Christopher Ferris76a1d452018-06-27 14:12:29 -0700323 __aligned_u64 driver_data[0];
324};
325enum ib_uverbs_ex_create_cq_flags {
326 IB_UVERBS_CQ_FLAGS_TIMESTAMP_COMPLETION = 1 << 0,
327 IB_UVERBS_CQ_FLAGS_IGNORE_OVERRUN = 1 << 1,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700328};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800329struct ib_uverbs_ex_create_cq {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700330 __aligned_u64 user_handle;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800331 __u32 cqe;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700332 __u32 comp_vector;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800333 __s32 comp_channel;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800334 __u32 comp_mask;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800335 __u32 flags;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700336 __u32 reserved;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800337};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800338struct ib_uverbs_create_cq_resp {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800339 __u32 cq_handle;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700340 __u32 cqe;
Christopher Ferrisd842e432019-03-07 10:21:59 -0800341 __aligned_u64 driver_data[0];
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800342};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800343struct ib_uverbs_ex_create_cq_resp {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800344 struct ib_uverbs_create_cq_resp base;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700345 __u32 comp_mask;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800346 __u32 response_length;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800347};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800348struct ib_uverbs_resize_cq {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700349 __aligned_u64 response;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800350 __u32 cq_handle;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800351 __u32 cqe;
Christopher Ferris76a1d452018-06-27 14:12:29 -0700352 __aligned_u64 driver_data[0];
Christopher Ferris106b3a82016-08-24 12:15:38 -0700353};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800354struct ib_uverbs_resize_cq_resp {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800355 __u32 cqe;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800356 __u32 reserved;
Christopher Ferris76a1d452018-06-27 14:12:29 -0700357 __aligned_u64 driver_data[0];
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800358};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800359struct ib_uverbs_poll_cq {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700360 __aligned_u64 response;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700361 __u32 cq_handle;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800362 __u32 ne;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800363};
Christopher Ferris32ff3f82020-12-14 13:10:04 -0800364enum ib_uverbs_wc_opcode {
365 IB_UVERBS_WC_SEND = 0,
366 IB_UVERBS_WC_RDMA_WRITE = 1,
367 IB_UVERBS_WC_RDMA_READ = 2,
368 IB_UVERBS_WC_COMP_SWAP = 3,
369 IB_UVERBS_WC_FETCH_ADD = 4,
370 IB_UVERBS_WC_BIND_MW = 5,
371 IB_UVERBS_WC_LOCAL_INV = 6,
372 IB_UVERBS_WC_TSO = 7,
373};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800374struct ib_uverbs_wc {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700375 __aligned_u64 wr_id;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800376 __u32 status;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800377 __u32 opcode;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800378 __u32 vendor_err;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700379 __u32 byte_len;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800380 union {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700381 __be32 imm_data;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800382 __u32 invalidate_rkey;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700383 } ex;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800384 __u32 qp_num;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800385 __u32 src_qp;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800386 __u32 wc_flags;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700387 __u16 pkey_index;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800388 __u16 slid;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800389 __u8 sl;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800390 __u8 dlid_path_bits;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700391 __u8 port_num;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800392 __u8 reserved;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800393};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800394struct ib_uverbs_poll_cq_resp {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700395 __u32 count;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800396 __u32 reserved;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800397 struct ib_uverbs_wc wc[0];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800398};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700399struct ib_uverbs_req_notify_cq {
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800400 __u32 cq_handle;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800401 __u32 solicited_only;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800402};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700403struct ib_uverbs_destroy_cq {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700404 __aligned_u64 response;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800405 __u32 cq_handle;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800406 __u32 reserved;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700407};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800408struct ib_uverbs_destroy_cq_resp {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800409 __u32 comp_events_reported;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800410 __u32 async_events_reported;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700411};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800412struct ib_uverbs_global_route {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800413 __u8 dgid[16];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800414 __u32 flow_label;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700415 __u8 sgid_index;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800416 __u8 hop_limit;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800417 __u8 traffic_class;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800418 __u8 reserved;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700419};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800420struct ib_uverbs_ah_attr {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800421 struct ib_uverbs_global_route grh;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800422 __u16 dlid;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700423 __u8 sl;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800424 __u8 src_path_bits;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800425 __u8 static_rate;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800426 __u8 is_global;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700427 __u8 port_num;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800428 __u8 reserved;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800429};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800430struct ib_uverbs_qp_attr {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700431 __u32 qp_attr_mask;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800432 __u32 qp_state;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800433 __u32 cur_qp_state;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800434 __u32 path_mtu;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700435 __u32 path_mig_state;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800436 __u32 qkey;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800437 __u32 rq_psn;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800438 __u32 sq_psn;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700439 __u32 dest_qp_num;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800440 __u32 qp_access_flags;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800441 struct ib_uverbs_ah_attr ah_attr;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800442 struct ib_uverbs_ah_attr alt_ah_attr;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700443 __u32 max_send_wr;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800444 __u32 max_recv_wr;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800445 __u32 max_send_sge;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800446 __u32 max_recv_sge;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700447 __u32 max_inline_data;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800448 __u16 pkey_index;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800449 __u16 alt_pkey_index;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800450 __u8 en_sqd_async_notify;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700451 __u8 sq_draining;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800452 __u8 max_rd_atomic;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800453 __u8 max_dest_rd_atomic;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800454 __u8 min_rnr_timer;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700455 __u8 port_num;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800456 __u8 timeout;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800457 __u8 retry_cnt;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800458 __u8 rnr_retry;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700459 __u8 alt_port_num;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800460 __u8 alt_timeout;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800461 __u8 reserved[5];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800462};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700463struct ib_uverbs_create_qp {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700464 __aligned_u64 response;
465 __aligned_u64 user_handle;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800466 __u32 pd_handle;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700467 __u32 send_cq_handle;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800468 __u32 recv_cq_handle;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800469 __u32 srq_handle;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800470 __u32 max_send_wr;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700471 __u32 max_recv_wr;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800472 __u32 max_send_sge;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800473 __u32 max_recv_sge;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800474 __u32 max_inline_data;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700475 __u8 sq_sig_all;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800476 __u8 qp_type;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800477 __u8 is_srq;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800478 __u8 reserved;
Christopher Ferris76a1d452018-06-27 14:12:29 -0700479 __aligned_u64 driver_data[0];
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800480};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800481enum ib_uverbs_create_qp_mask {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800482 IB_UVERBS_CREATE_QP_MASK_IND_TABLE = 1UL << 0,
483};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800484enum {
485 IB_UVERBS_CREATE_QP_SUP_COMP_MASK = IB_UVERBS_CREATE_QP_MASK_IND_TABLE,
486};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800487enum {
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800488 IB_USER_LEGACY_LAST_QP_ATTR_MASK = 1ULL << 20,
489};
490enum {
491 IB_USER_LAST_QP_ATTR_MASK = 1ULL << 25,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800492};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800493struct ib_uverbs_ex_create_qp {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700494 __aligned_u64 user_handle;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800495 __u32 pd_handle;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800496 __u32 send_cq_handle;
Tao Baod7db5942015-01-28 10:07:51 -0800497 __u32 recv_cq_handle;
498 __u32 srq_handle;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800499 __u32 max_send_wr;
Tao Baod7db5942015-01-28 10:07:51 -0800500 __u32 max_recv_wr;
501 __u32 max_send_sge;
502 __u32 max_recv_sge;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800503 __u32 max_inline_data;
Tao Baod7db5942015-01-28 10:07:51 -0800504 __u8 sq_sig_all;
505 __u8 qp_type;
506 __u8 is_srq;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800507 __u8 reserved;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800508 __u32 comp_mask;
509 __u32 create_flags;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800510 __u32 rwq_ind_tbl_handle;
Christopher Ferris1308ad32017-11-14 17:32:13 -0800511 __u32 source_qpn;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800512};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700513struct ib_uverbs_open_qp {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700514 __aligned_u64 response;
515 __aligned_u64 user_handle;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800516 __u32 pd_handle;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700517 __u32 qpn;
Tao Baod7db5942015-01-28 10:07:51 -0800518 __u8 qp_type;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800519 __u8 reserved[7];
Christopher Ferris76a1d452018-06-27 14:12:29 -0700520 __aligned_u64 driver_data[0];
Christopher Ferris106b3a82016-08-24 12:15:38 -0700521};
Ben Cheng655a7c02013-10-16 16:09:24 -0700522struct ib_uverbs_create_qp_resp {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800523 __u32 qp_handle;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800524 __u32 qpn;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700525 __u32 max_send_wr;
Tao Baod7db5942015-01-28 10:07:51 -0800526 __u32 max_recv_wr;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800527 __u32 max_send_sge;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800528 __u32 max_recv_sge;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700529 __u32 max_inline_data;
Tao Baod7db5942015-01-28 10:07:51 -0800530 __u32 reserved;
Christopher Ferrisd842e432019-03-07 10:21:59 -0800531 __u32 driver_data[0];
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800532};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800533struct ib_uverbs_ex_create_qp_resp {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700534 struct ib_uverbs_create_qp_resp base;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800535 __u32 comp_mask;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800536 __u32 response_length;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800537};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700538struct ib_uverbs_qp_dest {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800539 __u8 dgid[16];
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800540 __u32 flow_label;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800541 __u16 dlid;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700542 __u16 reserved;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800543 __u8 sgid_index;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800544 __u8 hop_limit;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800545 __u8 traffic_class;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700546 __u8 sl;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800547 __u8 src_path_bits;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800548 __u8 static_rate;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800549 __u8 is_global;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700550 __u8 port_num;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800551};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800552struct ib_uverbs_query_qp {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700553 __aligned_u64 response;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700554 __u32 qp_handle;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800555 __u32 attr_mask;
Christopher Ferris76a1d452018-06-27 14:12:29 -0700556 __aligned_u64 driver_data[0];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800557};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700558struct ib_uverbs_query_qp_resp {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800559 struct ib_uverbs_qp_dest dest;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800560 struct ib_uverbs_qp_dest alt_dest;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800561 __u32 max_send_wr;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700562 __u32 max_recv_wr;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800563 __u32 max_send_sge;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800564 __u32 max_recv_sge;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800565 __u32 max_inline_data;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700566 __u32 qkey;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800567 __u32 rq_psn;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800568 __u32 sq_psn;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800569 __u32 dest_qp_num;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700570 __u32 qp_access_flags;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800571 __u16 pkey_index;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800572 __u16 alt_pkey_index;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800573 __u8 qp_state;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700574 __u8 cur_qp_state;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800575 __u8 path_mtu;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800576 __u8 path_mig_state;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800577 __u8 sq_draining;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700578 __u8 max_rd_atomic;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800579 __u8 max_dest_rd_atomic;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800580 __u8 min_rnr_timer;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800581 __u8 port_num;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700582 __u8 timeout;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800583 __u8 retry_cnt;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800584 __u8 rnr_retry;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800585 __u8 alt_port_num;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700586 __u8 alt_timeout;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800587 __u8 sq_sig_all;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800588 __u8 reserved[5];
Christopher Ferris76a1d452018-06-27 14:12:29 -0700589 __aligned_u64 driver_data[0];
Christopher Ferris106b3a82016-08-24 12:15:38 -0700590};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800591struct ib_uverbs_modify_qp {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800592 struct ib_uverbs_qp_dest dest;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800593 struct ib_uverbs_qp_dest alt_dest;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700594 __u32 qp_handle;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800595 __u32 attr_mask;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800596 __u32 qkey;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800597 __u32 rq_psn;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700598 __u32 sq_psn;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800599 __u32 dest_qp_num;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800600 __u32 qp_access_flags;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800601 __u16 pkey_index;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700602 __u16 alt_pkey_index;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800603 __u8 qp_state;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800604 __u8 cur_qp_state;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800605 __u8 path_mtu;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700606 __u8 path_mig_state;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800607 __u8 en_sqd_async_notify;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800608 __u8 max_rd_atomic;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800609 __u8 max_dest_rd_atomic;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700610 __u8 min_rnr_timer;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800611 __u8 port_num;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800612 __u8 timeout;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800613 __u8 retry_cnt;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700614 __u8 rnr_retry;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800615 __u8 alt_port_num;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800616 __u8 alt_timeout;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800617 __u8 reserved[2];
Christopher Ferris76a1d452018-06-27 14:12:29 -0700618 __aligned_u64 driver_data[0];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800619};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800620struct ib_uverbs_ex_modify_qp {
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800621 struct ib_uverbs_modify_qp base;
622 __u32 rate_limit;
623 __u32 reserved;
624};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800625struct ib_uverbs_ex_modify_qp_resp {
626 __u32 comp_mask;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800627 __u32 response_length;
628};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700629struct ib_uverbs_destroy_qp {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700630 __aligned_u64 response;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800631 __u32 qp_handle;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800632 __u32 reserved;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700633};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800634struct ib_uverbs_destroy_qp_resp {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800635 __u32 events_reported;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800636};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700637struct ib_uverbs_sge {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700638 __aligned_u64 addr;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800639 __u32 length;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800640 __u32 lkey;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700641};
Christopher Ferris86a48372019-01-10 14:14:59 -0800642enum ib_uverbs_wr_opcode {
643 IB_UVERBS_WR_RDMA_WRITE = 0,
644 IB_UVERBS_WR_RDMA_WRITE_WITH_IMM = 1,
645 IB_UVERBS_WR_SEND = 2,
646 IB_UVERBS_WR_SEND_WITH_IMM = 3,
647 IB_UVERBS_WR_RDMA_READ = 4,
648 IB_UVERBS_WR_ATOMIC_CMP_AND_SWP = 5,
649 IB_UVERBS_WR_ATOMIC_FETCH_AND_ADD = 6,
650 IB_UVERBS_WR_LOCAL_INV = 7,
651 IB_UVERBS_WR_BIND_MW = 8,
652 IB_UVERBS_WR_SEND_WITH_INV = 9,
653 IB_UVERBS_WR_TSO = 10,
654 IB_UVERBS_WR_RDMA_READ_WITH_INV = 11,
655 IB_UVERBS_WR_MASKED_ATOMIC_CMP_AND_SWP = 12,
656 IB_UVERBS_WR_MASKED_ATOMIC_FETCH_AND_ADD = 13,
657};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800658struct ib_uverbs_send_wr {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700659 __aligned_u64 wr_id;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800660 __u32 num_sge;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700661 __u32 opcode;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800662 __u32 send_flags;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800663 union {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700664 __be32 imm_data;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700665 __u32 invalidate_rkey;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800666 } ex;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800667 union {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800668 struct {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700669 __aligned_u64 remote_addr;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800670 __u32 rkey;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800671 __u32 reserved;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800672 } rdma;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700673 struct {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700674 __aligned_u64 remote_addr;
675 __aligned_u64 compare_add;
676 __aligned_u64 swap;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700677 __u32 rkey;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800678 __u32 reserved;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800679 } atomic;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800680 struct {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700681 __u32 ah;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800682 __u32 remote_qpn;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800683 __u32 remote_qkey;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800684 __u32 reserved;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700685 } ud;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800686 } wr;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800687};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800688struct ib_uverbs_post_send {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700689 __aligned_u64 response;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800690 __u32 qp_handle;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800691 __u32 wr_count;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800692 __u32 sge_count;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700693 __u32 wqe_size;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800694 struct ib_uverbs_send_wr send_wr[0];
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800695};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800696struct ib_uverbs_post_send_resp {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700697 __u32 bad_wr;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800698};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800699struct ib_uverbs_recv_wr {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700700 __aligned_u64 wr_id;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700701 __u32 num_sge;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800702 __u32 reserved;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800703};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800704struct ib_uverbs_post_recv {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700705 __aligned_u64 response;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800706 __u32 qp_handle;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800707 __u32 wr_count;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800708 __u32 sge_count;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700709 __u32 wqe_size;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800710 struct ib_uverbs_recv_wr recv_wr[0];
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800711};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800712struct ib_uverbs_post_recv_resp {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700713 __u32 bad_wr;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800714};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800715struct ib_uverbs_post_srq_recv {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700716 __aligned_u64 response;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700717 __u32 srq_handle;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800718 __u32 wr_count;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800719 __u32 sge_count;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800720 __u32 wqe_size;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700721 struct ib_uverbs_recv_wr recv[0];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800722};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800723struct ib_uverbs_post_srq_recv_resp {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800724 __u32 bad_wr;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700725};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800726struct ib_uverbs_create_ah {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700727 __aligned_u64 response;
728 __aligned_u64 user_handle;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700729 __u32 pd_handle;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800730 __u32 reserved;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800731 struct ib_uverbs_ah_attr attr;
Christopher Ferrisd842e432019-03-07 10:21:59 -0800732 __aligned_u64 driver_data[0];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800733};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700734struct ib_uverbs_create_ah_resp {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800735 __u32 ah_handle;
Christopher Ferrisd842e432019-03-07 10:21:59 -0800736 __u32 driver_data[0];
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800737};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800738struct ib_uverbs_destroy_ah {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700739 __u32 ah_handle;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800740};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800741struct ib_uverbs_attach_mcast {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800742 __u8 gid[16];
Christopher Ferris106b3a82016-08-24 12:15:38 -0700743 __u32 qp_handle;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800744 __u16 mlid;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800745 __u16 reserved;
Christopher Ferris76a1d452018-06-27 14:12:29 -0700746 __aligned_u64 driver_data[0];
Christopher Ferris106b3a82016-08-24 12:15:38 -0700747};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800748struct ib_uverbs_detach_mcast {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800749 __u8 gid[16];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800750 __u32 qp_handle;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700751 __u16 mlid;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800752 __u16 reserved;
Christopher Ferris76a1d452018-06-27 14:12:29 -0700753 __aligned_u64 driver_data[0];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800754};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700755struct ib_uverbs_flow_spec_hdr {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800756 __u32 type;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800757 __u16 size;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800758 __u16 reserved;
Christopher Ferris76a1d452018-06-27 14:12:29 -0700759 __aligned_u64 flow_spec_data[0];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800760};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800761struct ib_uverbs_flow_eth_filter {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800762 __u8 dst_mac[6];
Christopher Ferris106b3a82016-08-24 12:15:38 -0700763 __u8 src_mac[6];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800764 __be16 ether_type;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800765 __be16 vlan_tag;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800766};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700767struct ib_uverbs_flow_spec_eth {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800768 union {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800769 struct ib_uverbs_flow_spec_hdr hdr;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800770 struct {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700771 __u32 type;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800772 __u16 size;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800773 __u16 reserved;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800774 };
Christopher Ferris106b3a82016-08-24 12:15:38 -0700775 };
Christopher Ferris05d08e92016-02-04 13:16:38 -0800776 struct ib_uverbs_flow_eth_filter val;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800777 struct ib_uverbs_flow_eth_filter mask;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800778};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700779struct ib_uverbs_flow_ipv4_filter {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800780 __be32 src_ip;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800781 __be32 dst_ip;
782 __u8 proto;
783 __u8 tos;
784 __u8 ttl;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800785 __u8 flags;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800786};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700787struct ib_uverbs_flow_spec_ipv4 {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800788 union {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800789 struct ib_uverbs_flow_spec_hdr hdr;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800790 struct {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700791 __u32 type;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800792 __u16 size;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800793 __u16 reserved;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800794 };
Christopher Ferris106b3a82016-08-24 12:15:38 -0700795 };
Christopher Ferris05d08e92016-02-04 13:16:38 -0800796 struct ib_uverbs_flow_ipv4_filter val;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800797 struct ib_uverbs_flow_ipv4_filter mask;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800798};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700799struct ib_uverbs_flow_tcp_udp_filter {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800800 __be16 dst_port;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800801 __be16 src_port;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800802};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700803struct ib_uverbs_flow_spec_tcp_udp {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800804 union {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800805 struct ib_uverbs_flow_spec_hdr hdr;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800806 struct {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700807 __u32 type;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800808 __u16 size;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800809 __u16 reserved;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800810 };
Christopher Ferris106b3a82016-08-24 12:15:38 -0700811 };
Christopher Ferris05d08e92016-02-04 13:16:38 -0800812 struct ib_uverbs_flow_tcp_udp_filter val;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800813 struct ib_uverbs_flow_tcp_udp_filter mask;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800814};
815struct ib_uverbs_flow_ipv6_filter {
816 __u8 src_ip[16];
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800817 __u8 dst_ip[16];
818 __be32 flow_label;
819 __u8 next_hdr;
820 __u8 traffic_class;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800821 __u8 hop_limit;
822 __u8 reserved;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800823};
824struct ib_uverbs_flow_spec_ipv6 {
825 union {
826 struct ib_uverbs_flow_spec_hdr hdr;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800827 struct {
828 __u32 type;
829 __u16 size;
830 __u16 reserved;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800831 };
832 };
833 struct ib_uverbs_flow_ipv6_filter val;
834 struct ib_uverbs_flow_ipv6_filter mask;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800835};
Christopher Ferris525ce912017-07-26 13:12:53 -0700836struct ib_uverbs_flow_spec_action_tag {
837 union {
838 struct ib_uverbs_flow_spec_hdr hdr;
839 struct {
840 __u32 type;
841 __u16 size;
842 __u16 reserved;
843 };
844 };
845 __u32 tag_id;
846 __u32 reserved1;
847};
848struct ib_uverbs_flow_spec_action_drop {
849 union {
850 struct ib_uverbs_flow_spec_hdr hdr;
851 struct {
852 __u32 type;
853 __u16 size;
854 __u16 reserved;
855 };
856 };
857};
Christopher Ferris76a1d452018-06-27 14:12:29 -0700858struct ib_uverbs_flow_spec_action_handle {
859 union {
860 struct ib_uverbs_flow_spec_hdr hdr;
861 struct {
862 __u32 type;
863 __u16 size;
864 __u16 reserved;
865 };
866 };
867 __u32 handle;
868 __u32 reserved1;
869};
Christopher Ferris9ce28842018-10-25 12:11:39 -0700870struct ib_uverbs_flow_spec_action_count {
871 union {
872 struct ib_uverbs_flow_spec_hdr hdr;
873 struct {
874 __u32 type;
875 __u16 size;
876 __u16 reserved;
877 };
878 };
879 __u32 handle;
880 __u32 reserved1;
881};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800882struct ib_uverbs_flow_tunnel_filter {
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800883 __be32 tunnel_id;
884};
885struct ib_uverbs_flow_spec_tunnel {
886 union {
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800887 struct ib_uverbs_flow_spec_hdr hdr;
888 struct {
889 __u32 type;
890 __u16 size;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800891 __u16 reserved;
892 };
893 };
894 struct ib_uverbs_flow_tunnel_filter val;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800895 struct ib_uverbs_flow_tunnel_filter mask;
896};
Christopher Ferris76a1d452018-06-27 14:12:29 -0700897struct ib_uverbs_flow_spec_esp_filter {
898 __u32 spi;
899 __u32 seq;
900};
901struct ib_uverbs_flow_spec_esp {
902 union {
903 struct ib_uverbs_flow_spec_hdr hdr;
904 struct {
905 __u32 type;
906 __u16 size;
907 __u16 reserved;
908 };
909 };
910 struct ib_uverbs_flow_spec_esp_filter val;
911 struct ib_uverbs_flow_spec_esp_filter mask;
912};
Christopher Ferris9ce28842018-10-25 12:11:39 -0700913struct ib_uverbs_flow_gre_filter {
914 __be16 c_ks_res0_ver;
915 __be16 protocol;
916 __be32 key;
917};
918struct ib_uverbs_flow_spec_gre {
919 union {
920 struct ib_uverbs_flow_spec_hdr hdr;
921 struct {
922 __u32 type;
923 __u16 size;
924 __u16 reserved;
925 };
926 };
927 struct ib_uverbs_flow_gre_filter val;
928 struct ib_uverbs_flow_gre_filter mask;
929};
930struct ib_uverbs_flow_mpls_filter {
931 __be32 label;
932};
933struct ib_uverbs_flow_spec_mpls {
934 union {
935 struct ib_uverbs_flow_spec_hdr hdr;
936 struct {
937 __u32 type;
938 __u16 size;
939 __u16 reserved;
940 };
941 };
942 struct ib_uverbs_flow_mpls_filter val;
943 struct ib_uverbs_flow_mpls_filter mask;
944};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800945struct ib_uverbs_flow_attr {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800946 __u32 type;
Tao Baod7db5942015-01-28 10:07:51 -0800947 __u16 size;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800948 __u16 priority;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700949 __u8 num_of_specs;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800950 __u8 reserved[2];
Tao Baod7db5942015-01-28 10:07:51 -0800951 __u8 port;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800952 __u32 flags;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700953 struct ib_uverbs_flow_spec_hdr flow_specs[0];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800954};
Christopher Ferris38062f92014-07-09 15:33:25 -0700955struct ib_uverbs_create_flow {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800956 __u32 comp_mask;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700957 __u32 qp_handle;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800958 struct ib_uverbs_flow_attr flow_attr;
Christopher Ferris38062f92014-07-09 15:33:25 -0700959};
960struct ib_uverbs_create_flow_resp {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700961 __u32 comp_mask;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800962 __u32 flow_handle;
Christopher Ferris38062f92014-07-09 15:33:25 -0700963};
964struct ib_uverbs_destroy_flow {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700965 __u32 comp_mask;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800966 __u32 flow_handle;
Ben Cheng655a7c02013-10-16 16:09:24 -0700967};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800968struct ib_uverbs_create_srq {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700969 __aligned_u64 response;
970 __aligned_u64 user_handle;
Tao Baod7db5942015-01-28 10:07:51 -0800971 __u32 pd_handle;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800972 __u32 max_wr;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700973 __u32 max_sge;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800974 __u32 srq_limit;
Christopher Ferris76a1d452018-06-27 14:12:29 -0700975 __aligned_u64 driver_data[0];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800976};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700977struct ib_uverbs_create_xsrq {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700978 __aligned_u64 response;
979 __aligned_u64 user_handle;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800980 __u32 srq_type;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700981 __u32 pd_handle;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800982 __u32 max_wr;
Tao Baod7db5942015-01-28 10:07:51 -0800983 __u32 max_sge;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800984 __u32 srq_limit;
Christopher Ferris1308ad32017-11-14 17:32:13 -0800985 __u32 max_num_tags;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800986 __u32 xrcd_handle;
Tao Baod7db5942015-01-28 10:07:51 -0800987 __u32 cq_handle;
Christopher Ferris76a1d452018-06-27 14:12:29 -0700988 __aligned_u64 driver_data[0];
Christopher Ferris106b3a82016-08-24 12:15:38 -0700989};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800990struct ib_uverbs_create_srq_resp {
Tao Baod7db5942015-01-28 10:07:51 -0800991 __u32 srq_handle;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800992 __u32 max_wr;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700993 __u32 max_sge;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800994 __u32 srqn;
Christopher Ferrisd842e432019-03-07 10:21:59 -0800995 __u32 driver_data[0];
Ben Cheng655a7c02013-10-16 16:09:24 -0700996};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800997struct ib_uverbs_modify_srq {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700998 __u32 srq_handle;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800999 __u32 attr_mask;
Tao Baod7db5942015-01-28 10:07:51 -08001000 __u32 max_wr;
Christopher Ferris49f525c2016-12-12 14:55:36 -08001001 __u32 srq_limit;
Christopher Ferris76a1d452018-06-27 14:12:29 -07001002 __aligned_u64 driver_data[0];
Christopher Ferris05d08e92016-02-04 13:16:38 -08001003};
Ben Cheng655a7c02013-10-16 16:09:24 -07001004struct ib_uverbs_query_srq {
Christopher Ferris76a1d452018-06-27 14:12:29 -07001005 __aligned_u64 response;
Christopher Ferris106b3a82016-08-24 12:15:38 -07001006 __u32 srq_handle;
Christopher Ferris05d08e92016-02-04 13:16:38 -08001007 __u32 reserved;
Christopher Ferris76a1d452018-06-27 14:12:29 -07001008 __aligned_u64 driver_data[0];
Christopher Ferris49f525c2016-12-12 14:55:36 -08001009};
Christopher Ferris106b3a82016-08-24 12:15:38 -07001010struct ib_uverbs_query_srq_resp {
Christopher Ferris05d08e92016-02-04 13:16:38 -08001011 __u32 max_wr;
Tao Baod7db5942015-01-28 10:07:51 -08001012 __u32 max_sge;
Christopher Ferris49f525c2016-12-12 14:55:36 -08001013 __u32 srq_limit;
Christopher Ferris106b3a82016-08-24 12:15:38 -07001014 __u32 reserved;
Christopher Ferris05d08e92016-02-04 13:16:38 -08001015};
Ben Cheng655a7c02013-10-16 16:09:24 -07001016struct ib_uverbs_destroy_srq {
Christopher Ferris76a1d452018-06-27 14:12:29 -07001017 __aligned_u64 response;
Christopher Ferris106b3a82016-08-24 12:15:38 -07001018 __u32 srq_handle;
Christopher Ferris05d08e92016-02-04 13:16:38 -08001019 __u32 reserved;
Ben Cheng655a7c02013-10-16 16:09:24 -07001020};
Christopher Ferris49f525c2016-12-12 14:55:36 -08001021struct ib_uverbs_destroy_srq_resp {
Christopher Ferris106b3a82016-08-24 12:15:38 -07001022 __u32 events_reported;
Christopher Ferris05d08e92016-02-04 13:16:38 -08001023};
Christopher Ferris49f525c2016-12-12 14:55:36 -08001024struct ib_uverbs_ex_create_wq {
Christopher Ferris49f525c2016-12-12 14:55:36 -08001025 __u32 comp_mask;
1026 __u32 wq_type;
Christopher Ferris76a1d452018-06-27 14:12:29 -07001027 __aligned_u64 user_handle;
Christopher Ferris49f525c2016-12-12 14:55:36 -08001028 __u32 pd_handle;
Christopher Ferris49f525c2016-12-12 14:55:36 -08001029 __u32 cq_handle;
1030 __u32 max_wr;
1031 __u32 max_sge;
Christopher Ferris525ce912017-07-26 13:12:53 -07001032 __u32 create_flags;
1033 __u32 reserved;
Christopher Ferris49f525c2016-12-12 14:55:36 -08001034};
Christopher Ferris49f525c2016-12-12 14:55:36 -08001035struct ib_uverbs_ex_create_wq_resp {
1036 __u32 comp_mask;
1037 __u32 response_length;
1038 __u32 wq_handle;
Christopher Ferris49f525c2016-12-12 14:55:36 -08001039 __u32 max_wr;
1040 __u32 max_sge;
1041 __u32 wqn;
1042};
Christopher Ferris49f525c2016-12-12 14:55:36 -08001043struct ib_uverbs_ex_destroy_wq {
1044 __u32 comp_mask;
1045 __u32 wq_handle;
1046};
Christopher Ferris49f525c2016-12-12 14:55:36 -08001047struct ib_uverbs_ex_destroy_wq_resp {
1048 __u32 comp_mask;
1049 __u32 response_length;
1050 __u32 events_reported;
Christopher Ferris49f525c2016-12-12 14:55:36 -08001051 __u32 reserved;
1052};
1053struct ib_uverbs_ex_modify_wq {
1054 __u32 attr_mask;
Christopher Ferris49f525c2016-12-12 14:55:36 -08001055 __u32 wq_handle;
1056 __u32 wq_state;
1057 __u32 curr_wq_state;
Christopher Ferris525ce912017-07-26 13:12:53 -07001058 __u32 flags;
1059 __u32 flags_mask;
Christopher Ferris49f525c2016-12-12 14:55:36 -08001060};
Christopher Ferris49f525c2016-12-12 14:55:36 -08001061#define IB_USER_VERBS_MAX_LOG_IND_TBL_SIZE 0x0d
1062struct ib_uverbs_ex_create_rwq_ind_table {
1063 __u32 comp_mask;
1064 __u32 log_ind_tbl_size;
Christopher Ferris49f525c2016-12-12 14:55:36 -08001065 __u32 wq_handles[0];
1066};
1067struct ib_uverbs_ex_create_rwq_ind_table_resp {
1068 __u32 comp_mask;
Christopher Ferris49f525c2016-12-12 14:55:36 -08001069 __u32 response_length;
1070 __u32 ind_tbl_handle;
1071 __u32 ind_tbl_num;
1072};
Christopher Ferris49f525c2016-12-12 14:55:36 -08001073struct ib_uverbs_ex_destroy_rwq_ind_table {
1074 __u32 comp_mask;
1075 __u32 ind_tbl_handle;
1076};
Christopher Ferris934ec942018-01-31 15:29:16 -08001077struct ib_uverbs_cq_moderation {
1078 __u16 cq_count;
1079 __u16 cq_period;
1080};
1081struct ib_uverbs_ex_modify_cq {
1082 __u32 cq_handle;
1083 __u32 attr_mask;
1084 struct ib_uverbs_cq_moderation attr;
1085 __u32 reserved;
1086};
Christopher Ferris525ce912017-07-26 13:12:53 -07001087#define IB_DEVICE_NAME_MAX 64
Ben Cheng655a7c02013-10-16 16:09:24 -07001088#endif