blob: 170c0a6ff9adb99ec95089e0c736a0d2300f5cd1 [file] [log] [blame]
Christopher Ferris6a9755d2017-01-13 14:09:31 -08001/****************************************************************************
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 MLX5_ABI_USER_H
20#define MLX5_ABI_USER_H
21#include <linux/types.h>
Christopher Ferris525ce912017-07-26 13:12:53 -070022#include <linux/if_ether.h>
Christopher Ferris6a9755d2017-01-13 14:09:31 -080023enum {
Christopher Ferris6a9755d2017-01-13 14:09:31 -080024 MLX5_QP_FLAG_SIGNATURE = 1 << 0,
25 MLX5_QP_FLAG_SCATTER_CQE = 1 << 1,
Christopher Ferris934ec942018-01-31 15:29:16 -080026 MLX5_QP_FLAG_TUNNEL_OFFLOADS = 1 << 2,
Christopher Ferris76a1d452018-06-27 14:12:29 -070027 MLX5_QP_FLAG_BFREG_INDEX = 1 << 3,
28 MLX5_QP_FLAG_TYPE_DCT = 1 << 4,
29 MLX5_QP_FLAG_TYPE_DCI = 1 << 5,
Christopher Ferris6a9755d2017-01-13 14:09:31 -080030};
31enum {
Christopher Ferris6a9755d2017-01-13 14:09:31 -080032 MLX5_SRQ_FLAG_SIGNATURE = 1 << 0,
33};
34enum {
35 MLX5_WQ_FLAG_SIGNATURE = 1 << 0,
Christopher Ferris6a9755d2017-01-13 14:09:31 -080036};
37#define MLX5_IB_UVERBS_ABI_VERSION 1
38struct mlx5_ib_alloc_ucontext_req {
Christopher Ferris525ce912017-07-26 13:12:53 -070039 __u32 total_num_bfregs;
40 __u32 num_low_latency_bfregs;
41};
42enum mlx5_lib_caps {
43 MLX5_LIB_CAP_4K_UAR = (__u64) 1 << 0,
Christopher Ferris6a9755d2017-01-13 14:09:31 -080044};
45struct mlx5_ib_alloc_ucontext_req_v2 {
Christopher Ferris525ce912017-07-26 13:12:53 -070046 __u32 total_num_bfregs;
47 __u32 num_low_latency_bfregs;
Christopher Ferris6a9755d2017-01-13 14:09:31 -080048 __u32 flags;
49 __u32 comp_mask;
50 __u8 max_cqe_version;
Christopher Ferris6a9755d2017-01-13 14:09:31 -080051 __u8 reserved0;
52 __u16 reserved1;
53 __u32 reserved2;
Christopher Ferris76a1d452018-06-27 14:12:29 -070054 __aligned_u64 lib_caps;
Christopher Ferris6a9755d2017-01-13 14:09:31 -080055};
Christopher Ferris6a9755d2017-01-13 14:09:31 -080056enum mlx5_ib_alloc_ucontext_resp_mask {
57 MLX5_IB_ALLOC_UCONTEXT_RESP_MASK_CORE_CLOCK_OFFSET = 1UL << 0,
58};
59enum mlx5_user_cmds_supp_uhw {
Christopher Ferris6a9755d2017-01-13 14:09:31 -080060 MLX5_USER_CMDS_SUPP_UHW_QUERY_DEVICE = 1 << 0,
Christopher Ferris48af7cb2017-02-21 12:35:09 -080061 MLX5_USER_CMDS_SUPP_UHW_CREATE_AH = 1 << 1,
Christopher Ferris6a9755d2017-01-13 14:09:31 -080062};
Christopher Ferris525ce912017-07-26 13:12:53 -070063enum mlx5_user_inline_mode {
64 MLX5_USER_INLINE_MODE_NA,
65 MLX5_USER_INLINE_MODE_NONE,
66 MLX5_USER_INLINE_MODE_L2,
67 MLX5_USER_INLINE_MODE_IP,
68 MLX5_USER_INLINE_MODE_TCP_UDP,
69};
Christopher Ferris76a1d452018-06-27 14:12:29 -070070enum {
71 MLX5_USER_ALLOC_UCONTEXT_FLOW_ACTION_FLAGS_ESP_AES_GCM = 1 << 0,
72 MLX5_USER_ALLOC_UCONTEXT_FLOW_ACTION_FLAGS_ESP_AES_GCM_REQ_METADATA = 1 << 1,
73 MLX5_USER_ALLOC_UCONTEXT_FLOW_ACTION_FLAGS_ESP_AES_GCM_SPI_STEERING = 1 << 2,
74 MLX5_USER_ALLOC_UCONTEXT_FLOW_ACTION_FLAGS_ESP_AES_GCM_FULL_OFFLOAD = 1 << 3,
75 MLX5_USER_ALLOC_UCONTEXT_FLOW_ACTION_FLAGS_ESP_AES_GCM_TX_IV_IS_ESN = 1 << 4,
76};
Christopher Ferris6a9755d2017-01-13 14:09:31 -080077struct mlx5_ib_alloc_ucontext_resp {
Christopher Ferris48af7cb2017-02-21 12:35:09 -080078 __u32 qp_tab_size;
Christopher Ferris6a9755d2017-01-13 14:09:31 -080079 __u32 bf_reg_size;
Christopher Ferris525ce912017-07-26 13:12:53 -070080 __u32 tot_bfregs;
Christopher Ferris6a9755d2017-01-13 14:09:31 -080081 __u32 cache_line_size;
Christopher Ferris48af7cb2017-02-21 12:35:09 -080082 __u16 max_sq_desc_sz;
Christopher Ferris6a9755d2017-01-13 14:09:31 -080083 __u16 max_rq_desc_sz;
84 __u32 max_send_wqebb;
85 __u32 max_recv_wr;
Christopher Ferris48af7cb2017-02-21 12:35:09 -080086 __u32 max_srq_recv_wr;
Christopher Ferris6a9755d2017-01-13 14:09:31 -080087 __u16 num_ports;
Christopher Ferris76a1d452018-06-27 14:12:29 -070088 __u16 flow_action_flags;
Christopher Ferris6a9755d2017-01-13 14:09:31 -080089 __u32 comp_mask;
Christopher Ferris48af7cb2017-02-21 12:35:09 -080090 __u32 response_length;
Christopher Ferris6a9755d2017-01-13 14:09:31 -080091 __u8 cqe_version;
92 __u8 cmds_supp_uhw;
Christopher Ferris525ce912017-07-26 13:12:53 -070093 __u8 eth_min_inline;
Christopher Ferris76a1d452018-06-27 14:12:29 -070094 __u8 clock_info_versions;
95 __aligned_u64 hca_core_clock_offset;
Christopher Ferris525ce912017-07-26 13:12:53 -070096 __u32 log_uar_size;
97 __u32 num_uars_per_page;
Christopher Ferris76a1d452018-06-27 14:12:29 -070098 __u32 num_dyn_bfregs;
99 __u32 reserved3;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800100};
101struct mlx5_ib_alloc_pd_resp {
102 __u32 pdn;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800103};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800104struct mlx5_ib_tso_caps {
105 __u32 max_tso;
106 __u32 supported_qpts;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800107};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800108struct mlx5_ib_rss_caps {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700109 __aligned_u64 rx_hash_fields_mask;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800110 __u8 rx_hash_function;
111 __u8 reserved[7];
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800112};
113enum mlx5_ib_cqe_comp_res_format {
114 MLX5_IB_CQE_RES_FORMAT_HASH = 1 << 0,
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800115 MLX5_IB_CQE_RES_FORMAT_CSUM = 1 << 1,
116 MLX5_IB_CQE_RES_RESERVED = 1 << 2,
117};
118struct mlx5_ib_cqe_comp_caps {
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800119 __u32 max_num;
120 __u32 supported_format;
121};
Christopher Ferris76a1d452018-06-27 14:12:29 -0700122enum mlx5_ib_packet_pacing_cap_flags {
123 MLX5_IB_PP_SUPPORT_BURST = 1 << 0,
124};
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800125struct mlx5_packet_pacing_caps {
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800126 __u32 qp_rate_limit_min;
127 __u32 qp_rate_limit_max;
128 __u32 supported_qpts;
Christopher Ferris76a1d452018-06-27 14:12:29 -0700129 __u8 cap_flags;
130 __u8 reserved[3];
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800131};
Christopher Ferris1308ad32017-11-14 17:32:13 -0800132enum mlx5_ib_mpw_caps {
133 MPW_RESERVED = 1 << 0,
134 MLX5_IB_ALLOW_MPW = 1 << 1,
135 MLX5_IB_SUPPORT_EMPW = 1 << 2,
136};
137enum mlx5_ib_sw_parsing_offloads {
138 MLX5_IB_SW_PARSING = 1 << 0,
139 MLX5_IB_SW_PARSING_CSUM = 1 << 1,
140 MLX5_IB_SW_PARSING_LSO = 1 << 2,
141};
142struct mlx5_ib_sw_parsing_caps {
143 __u32 sw_parsing_offloads;
144 __u32 supported_qpts;
145};
Christopher Ferris934ec942018-01-31 15:29:16 -0800146struct mlx5_ib_striding_rq_caps {
147 __u32 min_single_stride_log_num_of_bytes;
148 __u32 max_single_stride_log_num_of_bytes;
149 __u32 min_single_wqe_log_num_of_strides;
150 __u32 max_single_wqe_log_num_of_strides;
151 __u32 supported_qpts;
152 __u32 reserved;
153};
154enum mlx5_ib_query_dev_resp_flags {
155 MLX5_IB_QUERY_DEV_RESP_FLAGS_CQE_128B_COMP = 1 << 0,
156 MLX5_IB_QUERY_DEV_RESP_FLAGS_CQE_128B_PAD = 1 << 1,
157};
158enum mlx5_ib_tunnel_offloads {
159 MLX5_IB_TUNNELED_OFFLOADS_VXLAN = 1 << 0,
160 MLX5_IB_TUNNELED_OFFLOADS_GRE = 1 << 1,
161 MLX5_IB_TUNNELED_OFFLOADS_GENEVE = 1 << 2
162};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800163struct mlx5_ib_query_device_resp {
164 __u32 comp_mask;
165 __u32 response_length;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800166 struct mlx5_ib_tso_caps tso_caps;
167 struct mlx5_ib_rss_caps rss_caps;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800168 struct mlx5_ib_cqe_comp_caps cqe_comp_caps;
169 struct mlx5_packet_pacing_caps packet_pacing_caps;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800170 __u32 mlx5_ib_support_multi_pkt_send_wqes;
Christopher Ferris934ec942018-01-31 15:29:16 -0800171 __u32 flags;
Christopher Ferris1308ad32017-11-14 17:32:13 -0800172 struct mlx5_ib_sw_parsing_caps sw_parsing_caps;
Christopher Ferris934ec942018-01-31 15:29:16 -0800173 struct mlx5_ib_striding_rq_caps striding_rq_caps;
174 __u32 tunnel_offloads_caps;
175 __u32 reserved;
176};
177enum mlx5_ib_create_cq_flags {
178 MLX5_IB_CREATE_CQ_FLAGS_CQE_128B_PAD = 1 << 0,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800179};
180struct mlx5_ib_create_cq {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700181 __aligned_u64 buf_addr;
182 __aligned_u64 db_addr;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800183 __u32 cqe_size;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800184 __u8 cqe_comp_en;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800185 __u8 cqe_comp_res_format;
Christopher Ferris934ec942018-01-31 15:29:16 -0800186 __u16 flags;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800187};
188struct mlx5_ib_create_cq_resp {
189 __u32 cqn;
190 __u32 reserved;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800191};
192struct mlx5_ib_resize_cq {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700193 __aligned_u64 buf_addr;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800194 __u16 cqe_size;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800195 __u16 reserved0;
196 __u32 reserved1;
197};
198struct mlx5_ib_create_srq {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700199 __aligned_u64 buf_addr;
200 __aligned_u64 db_addr;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800201 __u32 flags;
202 __u32 reserved0;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800203 __u32 uidx;
204 __u32 reserved1;
205};
206struct mlx5_ib_create_srq_resp {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800207 __u32 srqn;
208 __u32 reserved;
209};
210struct mlx5_ib_create_qp {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700211 __aligned_u64 buf_addr;
212 __aligned_u64 db_addr;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800213 __u32 sq_wqe_count;
214 __u32 rq_wqe_count;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800215 __u32 rq_wqe_shift;
216 __u32 flags;
217 __u32 uidx;
Christopher Ferris76a1d452018-06-27 14:12:29 -0700218 __u32 bfreg_index;
219 union {
220 __aligned_u64 sq_buf_addr;
221 __aligned_u64 access_key;
222 };
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800223};
224enum mlx5_rx_hash_function_flags {
225 MLX5_RX_HASH_FUNC_TOEPLITZ = 1 << 0,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800226};
227enum mlx5_rx_hash_fields {
228 MLX5_RX_HASH_SRC_IPV4 = 1 << 0,
229 MLX5_RX_HASH_DST_IPV4 = 1 << 1,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800230 MLX5_RX_HASH_SRC_IPV6 = 1 << 2,
231 MLX5_RX_HASH_DST_IPV6 = 1 << 3,
232 MLX5_RX_HASH_SRC_PORT_TCP = 1 << 4,
233 MLX5_RX_HASH_DST_PORT_TCP = 1 << 5,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800234 MLX5_RX_HASH_SRC_PORT_UDP = 1 << 6,
Christopher Ferris934ec942018-01-31 15:29:16 -0800235 MLX5_RX_HASH_DST_PORT_UDP = 1 << 7,
Christopher Ferris76a1d452018-06-27 14:12:29 -0700236 MLX5_RX_HASH_IPSEC_SPI = 1 << 8,
237 MLX5_RX_HASH_INNER = (1UL << 31),
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800238};
239struct mlx5_ib_create_qp_rss {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700240 __aligned_u64 rx_hash_fields_mask;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800241 __u8 rx_hash_function;
242 __u8 rx_key_len;
243 __u8 reserved[6];
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800244 __u8 rx_hash_key[128];
245 __u32 comp_mask;
Christopher Ferris934ec942018-01-31 15:29:16 -0800246 __u32 flags;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800247};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800248struct mlx5_ib_create_qp_resp {
Christopher Ferris525ce912017-07-26 13:12:53 -0700249 __u32 bfreg_index;
Christopher Ferris76a1d452018-06-27 14:12:29 -0700250 __u32 reserved;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800251};
252struct mlx5_ib_alloc_mw {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800253 __u32 comp_mask;
254 __u8 num_klms;
255 __u8 reserved1;
256 __u16 reserved2;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800257};
Christopher Ferris934ec942018-01-31 15:29:16 -0800258enum mlx5_ib_create_wq_mask {
259 MLX5_IB_CREATE_WQ_STRIDING_RQ = (1 << 0),
260};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800261struct mlx5_ib_create_wq {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700262 __aligned_u64 buf_addr;
263 __aligned_u64 db_addr;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800264 __u32 rq_wqe_count;
265 __u32 rq_wqe_shift;
266 __u32 user_index;
267 __u32 flags;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800268 __u32 comp_mask;
Christopher Ferris934ec942018-01-31 15:29:16 -0800269 __u32 single_stride_log_num_of_bytes;
270 __u32 single_wqe_log_num_of_strides;
271 __u32 two_byte_shift_en;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800272};
273struct mlx5_ib_create_ah_resp {
274 __u32 response_length;
275 __u8 dmac[ETH_ALEN];
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800276 __u8 reserved[6];
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800277};
Christopher Ferris76a1d452018-06-27 14:12:29 -0700278struct mlx5_ib_burst_info {
279 __u32 max_burst_sz;
280 __u16 typical_pkt_sz;
281 __u16 reserved;
282};
283struct mlx5_ib_modify_qp {
284 __u32 comp_mask;
285 struct mlx5_ib_burst_info burst_info;
286 __u32 reserved;
287};
288struct mlx5_ib_modify_qp_resp {
289 __u32 response_length;
290 __u32 dctn;
291};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800292struct mlx5_ib_create_wq_resp {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800293 __u32 response_length;
294 __u32 reserved;
295};
296struct mlx5_ib_create_rwq_ind_tbl_resp {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800297 __u32 response_length;
298 __u32 reserved;
299};
300struct mlx5_ib_modify_wq {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800301 __u32 comp_mask;
302 __u32 reserved;
303};
Christopher Ferris76a1d452018-06-27 14:12:29 -0700304struct mlx5_ib_clock_info {
305 __u32 sign;
306 __u32 resv;
307 __aligned_u64 nsec;
308 __aligned_u64 cycles;
309 __aligned_u64 frac;
310 __u32 mult;
311 __u32 shift;
312 __aligned_u64 mask;
313 __aligned_u64 overflow_period;
314};
315enum mlx5_ib_mmap_cmd {
316 MLX5_IB_MMAP_REGULAR_PAGE = 0,
317 MLX5_IB_MMAP_GET_CONTIGUOUS_PAGES = 1,
318 MLX5_IB_MMAP_WC_PAGE = 2,
319 MLX5_IB_MMAP_NC_PAGE = 3,
320 MLX5_IB_MMAP_CORE_CLOCK = 5,
321 MLX5_IB_MMAP_ALLOC_WC = 6,
322 MLX5_IB_MMAP_CLOCK_INFO = 7,
323 MLX5_IB_MMAP_DEVICE_MEM = 8,
324};
325enum {
326 MLX5_IB_CLOCK_INFO_KERNEL_UPDATING = 1,
327};
328enum {
329 MLX5_IB_CLOCK_INFO_V1 = 0,
330};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800331#endif