blob: 4b6842b6e2bc8b2ed2ef8333de358829cc119f54 [file] [log] [blame]
Christopher Ferrisaeddbcf2019-07-08 12:45:46 -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 EFA_ABI_USER_H
20#define EFA_ABI_USER_H
21#include <linux/types.h>
22#define EFA_UVERBS_ABI_VERSION 1
Christopher Ferris25c18d42020-10-14 17:42:58 -070023enum {
24 EFA_ALLOC_UCONTEXT_CMD_COMP_TX_BATCH = 1 << 0,
25 EFA_ALLOC_UCONTEXT_CMD_COMP_MIN_SQ_WR = 1 << 1,
26};
27struct efa_ibv_alloc_ucontext_cmd {
28 __u32 comp_mask;
29 __u8 reserved_20[4];
30};
Christopher Ferrisaeddbcf2019-07-08 12:45:46 -070031enum efa_ibv_user_cmds_supp_udata {
32 EFA_USER_CMDS_SUPP_UDATA_QUERY_DEVICE = 1 << 0,
33 EFA_USER_CMDS_SUPP_UDATA_CREATE_AH = 1 << 1,
34};
35struct efa_ibv_alloc_ucontext_resp {
36 __u32 comp_mask;
37 __u32 cmds_supp_udata_mask;
38 __u16 sub_cqs_per_cq;
39 __u16 inline_buf_size;
40 __u32 max_llq_size;
Christopher Ferris25c18d42020-10-14 17:42:58 -070041 __u16 max_tx_batch;
42 __u16 min_sq_wr;
43 __u8 reserved_a0[4];
Christopher Ferrisaeddbcf2019-07-08 12:45:46 -070044};
45struct efa_ibv_alloc_pd_resp {
46 __u32 comp_mask;
47 __u16 pdn;
48 __u8 reserved_30[2];
49};
Christopher Ferrisa4792612022-01-10 13:51:15 -080050enum {
51 EFA_CREATE_CQ_WITH_COMPLETION_CHANNEL = 1 << 0,
52};
Christopher Ferrisaeddbcf2019-07-08 12:45:46 -070053struct efa_ibv_create_cq {
54 __u32 comp_mask;
55 __u32 cq_entry_size;
56 __u16 num_sub_cqs;
Christopher Ferrisa4792612022-01-10 13:51:15 -080057 __u8 flags;
58 __u8 reserved_58[5];
59};
60enum {
61 EFA_CREATE_CQ_RESP_DB_OFF = 1 << 0,
Christopher Ferrisaeddbcf2019-07-08 12:45:46 -070062};
63struct efa_ibv_create_cq_resp {
64 __u32 comp_mask;
65 __u8 reserved_20[4];
66 __aligned_u64 q_mmap_key;
67 __aligned_u64 q_mmap_size;
68 __u16 cq_idx;
Christopher Ferrisa4792612022-01-10 13:51:15 -080069 __u8 reserved_d0[2];
70 __u32 db_off;
71 __aligned_u64 db_mmap_key;
Christopher Ferrisaeddbcf2019-07-08 12:45:46 -070072};
73enum {
74 EFA_QP_DRIVER_TYPE_SRD = 0,
75};
76struct efa_ibv_create_qp {
77 __u32 comp_mask;
78 __u32 rq_ring_size;
79 __u32 sq_ring_size;
80 __u32 driver_qp_type;
81};
82struct efa_ibv_create_qp_resp {
83 __u32 comp_mask;
84 __u32 rq_db_offset;
85 __u32 sq_db_offset;
86 __u32 llq_desc_offset;
87 __aligned_u64 rq_mmap_key;
88 __aligned_u64 rq_mmap_size;
89 __aligned_u64 rq_db_mmap_key;
90 __aligned_u64 sq_db_mmap_key;
91 __aligned_u64 llq_desc_mmap_key;
92 __u16 send_sub_cq_idx;
93 __u16 recv_sub_cq_idx;
94 __u8 reserved_1e0[4];
95};
96struct efa_ibv_create_ah_resp {
97 __u32 comp_mask;
98 __u16 efa_address_handle;
99 __u8 reserved_30[2];
100};
Christopher Ferrisd32ca142020-02-04 16:16:51 -0800101enum {
102 EFA_QUERY_DEVICE_CAPS_RDMA_READ = 1 << 0,
Christopher Ferris32ff3f82020-12-14 13:10:04 -0800103 EFA_QUERY_DEVICE_CAPS_RNR_RETRY = 1 << 1,
Christopher Ferrisa4792612022-01-10 13:51:15 -0800104 EFA_QUERY_DEVICE_CAPS_CQ_NOTIFICATIONS = 1 << 2,
Christopher Ferrisd32ca142020-02-04 16:16:51 -0800105};
Christopher Ferrisaeddbcf2019-07-08 12:45:46 -0700106struct efa_ibv_ex_query_device_resp {
107 __u32 comp_mask;
108 __u32 max_sq_wr;
109 __u32 max_rq_wr;
110 __u16 max_sq_sge;
111 __u16 max_rq_sge;
Christopher Ferrisd32ca142020-02-04 16:16:51 -0800112 __u32 max_rdma_size;
113 __u32 device_caps;
Christopher Ferrisaeddbcf2019-07-08 12:45:46 -0700114};
115#endif