blob: 1a8eb0dcefd6f773b06e338778fc24afcd39ba5c [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>
22enum {
Christopher Ferris6a9755d2017-01-13 14:09:31 -080023 MLX5_QP_FLAG_SIGNATURE = 1 << 0,
24 MLX5_QP_FLAG_SCATTER_CQE = 1 << 1,
25};
26enum {
Christopher Ferris6a9755d2017-01-13 14:09:31 -080027 MLX5_SRQ_FLAG_SIGNATURE = 1 << 0,
28};
29enum {
30 MLX5_WQ_FLAG_SIGNATURE = 1 << 0,
Christopher Ferris6a9755d2017-01-13 14:09:31 -080031};
32#define MLX5_IB_UVERBS_ABI_VERSION 1
33struct mlx5_ib_alloc_ucontext_req {
34 __u32 total_num_uuars;
Christopher Ferris6a9755d2017-01-13 14:09:31 -080035 __u32 num_low_latency_uuars;
36};
37struct mlx5_ib_alloc_ucontext_req_v2 {
38 __u32 total_num_uuars;
Christopher Ferris6a9755d2017-01-13 14:09:31 -080039 __u32 num_low_latency_uuars;
40 __u32 flags;
41 __u32 comp_mask;
42 __u8 max_cqe_version;
Christopher Ferris6a9755d2017-01-13 14:09:31 -080043 __u8 reserved0;
44 __u16 reserved1;
45 __u32 reserved2;
46};
Christopher Ferris6a9755d2017-01-13 14:09:31 -080047enum mlx5_ib_alloc_ucontext_resp_mask {
48 MLX5_IB_ALLOC_UCONTEXT_RESP_MASK_CORE_CLOCK_OFFSET = 1UL << 0,
49};
50enum mlx5_user_cmds_supp_uhw {
Christopher Ferris6a9755d2017-01-13 14:09:31 -080051 MLX5_USER_CMDS_SUPP_UHW_QUERY_DEVICE = 1 << 0,
Christopher Ferris48af7cb2017-02-21 12:35:09 -080052 MLX5_USER_CMDS_SUPP_UHW_CREATE_AH = 1 << 1,
Christopher Ferris6a9755d2017-01-13 14:09:31 -080053};
54struct mlx5_ib_alloc_ucontext_resp {
Christopher Ferris48af7cb2017-02-21 12:35:09 -080055 __u32 qp_tab_size;
Christopher Ferris6a9755d2017-01-13 14:09:31 -080056 __u32 bf_reg_size;
57 __u32 tot_uuars;
58 __u32 cache_line_size;
Christopher Ferris48af7cb2017-02-21 12:35:09 -080059 __u16 max_sq_desc_sz;
Christopher Ferris6a9755d2017-01-13 14:09:31 -080060 __u16 max_rq_desc_sz;
61 __u32 max_send_wqebb;
62 __u32 max_recv_wr;
Christopher Ferris48af7cb2017-02-21 12:35:09 -080063 __u32 max_srq_recv_wr;
Christopher Ferris6a9755d2017-01-13 14:09:31 -080064 __u16 num_ports;
65 __u16 reserved1;
66 __u32 comp_mask;
Christopher Ferris48af7cb2017-02-21 12:35:09 -080067 __u32 response_length;
Christopher Ferris6a9755d2017-01-13 14:09:31 -080068 __u8 cqe_version;
69 __u8 cmds_supp_uhw;
70 __u16 reserved2;
Christopher Ferris48af7cb2017-02-21 12:35:09 -080071 __u64 hca_core_clock_offset;
Christopher Ferris6a9755d2017-01-13 14:09:31 -080072};
73struct mlx5_ib_alloc_pd_resp {
74 __u32 pdn;
Christopher Ferris48af7cb2017-02-21 12:35:09 -080075};
Christopher Ferris6a9755d2017-01-13 14:09:31 -080076struct mlx5_ib_tso_caps {
77 __u32 max_tso;
78 __u32 supported_qpts;
Christopher Ferris48af7cb2017-02-21 12:35:09 -080079};
Christopher Ferris6a9755d2017-01-13 14:09:31 -080080struct mlx5_ib_rss_caps {
81 __u64 rx_hash_fields_mask;
82 __u8 rx_hash_function;
83 __u8 reserved[7];
Christopher Ferris48af7cb2017-02-21 12:35:09 -080084};
85enum mlx5_ib_cqe_comp_res_format {
86 MLX5_IB_CQE_RES_FORMAT_HASH = 1 << 0,
Christopher Ferris48af7cb2017-02-21 12:35:09 -080087 MLX5_IB_CQE_RES_FORMAT_CSUM = 1 << 1,
88 MLX5_IB_CQE_RES_RESERVED = 1 << 2,
89};
90struct mlx5_ib_cqe_comp_caps {
Christopher Ferris48af7cb2017-02-21 12:35:09 -080091 __u32 max_num;
92 __u32 supported_format;
93};
94struct mlx5_packet_pacing_caps {
Christopher Ferris48af7cb2017-02-21 12:35:09 -080095 __u32 qp_rate_limit_min;
96 __u32 qp_rate_limit_max;
97 __u32 supported_qpts;
98 __u32 reserved;
Christopher Ferris6a9755d2017-01-13 14:09:31 -080099};
100struct mlx5_ib_query_device_resp {
101 __u32 comp_mask;
102 __u32 response_length;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800103 struct mlx5_ib_tso_caps tso_caps;
104 struct mlx5_ib_rss_caps rss_caps;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800105 struct mlx5_ib_cqe_comp_caps cqe_comp_caps;
106 struct mlx5_packet_pacing_caps packet_pacing_caps;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800107 __u32 mlx5_ib_support_multi_pkt_send_wqes;
108 __u32 reserved;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800109};
110struct mlx5_ib_create_cq {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800111 __u64 buf_addr;
112 __u64 db_addr;
113 __u32 cqe_size;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800114 __u8 cqe_comp_en;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800115 __u8 cqe_comp_res_format;
116 __u16 reserved;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800117};
118struct mlx5_ib_create_cq_resp {
119 __u32 cqn;
120 __u32 reserved;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800121};
122struct mlx5_ib_resize_cq {
123 __u64 buf_addr;
124 __u16 cqe_size;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800125 __u16 reserved0;
126 __u32 reserved1;
127};
128struct mlx5_ib_create_srq {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800129 __u64 buf_addr;
130 __u64 db_addr;
131 __u32 flags;
132 __u32 reserved0;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800133 __u32 uidx;
134 __u32 reserved1;
135};
136struct mlx5_ib_create_srq_resp {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800137 __u32 srqn;
138 __u32 reserved;
139};
140struct mlx5_ib_create_qp {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800141 __u64 buf_addr;
142 __u64 db_addr;
143 __u32 sq_wqe_count;
144 __u32 rq_wqe_count;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800145 __u32 rq_wqe_shift;
146 __u32 flags;
147 __u32 uidx;
148 __u32 reserved0;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800149 __u64 sq_buf_addr;
150};
151enum mlx5_rx_hash_function_flags {
152 MLX5_RX_HASH_FUNC_TOEPLITZ = 1 << 0,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800153};
154enum mlx5_rx_hash_fields {
155 MLX5_RX_HASH_SRC_IPV4 = 1 << 0,
156 MLX5_RX_HASH_DST_IPV4 = 1 << 1,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800157 MLX5_RX_HASH_SRC_IPV6 = 1 << 2,
158 MLX5_RX_HASH_DST_IPV6 = 1 << 3,
159 MLX5_RX_HASH_SRC_PORT_TCP = 1 << 4,
160 MLX5_RX_HASH_DST_PORT_TCP = 1 << 5,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800161 MLX5_RX_HASH_SRC_PORT_UDP = 1 << 6,
162 MLX5_RX_HASH_DST_PORT_UDP = 1 << 7
163};
164struct mlx5_ib_create_qp_rss {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800165 __u64 rx_hash_fields_mask;
166 __u8 rx_hash_function;
167 __u8 rx_key_len;
168 __u8 reserved[6];
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800169 __u8 rx_hash_key[128];
170 __u32 comp_mask;
171 __u32 reserved1;
172};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800173struct mlx5_ib_create_qp_resp {
174 __u32 uuar_index;
175};
176struct mlx5_ib_alloc_mw {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800177 __u32 comp_mask;
178 __u8 num_klms;
179 __u8 reserved1;
180 __u16 reserved2;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800181};
182struct mlx5_ib_create_wq {
183 __u64 buf_addr;
184 __u64 db_addr;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800185 __u32 rq_wqe_count;
186 __u32 rq_wqe_shift;
187 __u32 user_index;
188 __u32 flags;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800189 __u32 comp_mask;
190 __u32 reserved;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800191};
192struct mlx5_ib_create_ah_resp {
193 __u32 response_length;
194 __u8 dmac[ETH_ALEN];
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800195 __u8 reserved[6];
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800196};
197struct mlx5_ib_create_wq_resp {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800198 __u32 response_length;
199 __u32 reserved;
200};
201struct mlx5_ib_create_rwq_ind_tbl_resp {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800202 __u32 response_length;
203 __u32 reserved;
204};
205struct mlx5_ib_modify_wq {
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800206 __u32 comp_mask;
207 __u32 reserved;
208};
209#endif