1 /****************************************************************************
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
23 enum {
24   EFA_ALLOC_UCONTEXT_CMD_COMP_TX_BATCH = 1 << 0,
25   EFA_ALLOC_UCONTEXT_CMD_COMP_MIN_SQ_WR = 1 << 1,
26 };
27 struct efa_ibv_alloc_ucontext_cmd {
28   __u32 comp_mask;
29   __u8 reserved_20[4];
30 };
31 enum 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 };
35 struct 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;
41   __u16 max_tx_batch;
42   __u16 min_sq_wr;
43   __u8 reserved_a0[4];
44 };
45 struct efa_ibv_alloc_pd_resp {
46   __u32 comp_mask;
47   __u16 pdn;
48   __u8 reserved_30[2];
49 };
50 struct efa_ibv_create_cq {
51   __u32 comp_mask;
52   __u32 cq_entry_size;
53   __u16 num_sub_cqs;
54   __u8 reserved_50[6];
55 };
56 struct efa_ibv_create_cq_resp {
57   __u32 comp_mask;
58   __u8 reserved_20[4];
59   __aligned_u64 q_mmap_key;
60   __aligned_u64 q_mmap_size;
61   __u16 cq_idx;
62   __u8 reserved_d0[6];
63 };
64 enum {
65   EFA_QP_DRIVER_TYPE_SRD = 0,
66 };
67 struct efa_ibv_create_qp {
68   __u32 comp_mask;
69   __u32 rq_ring_size;
70   __u32 sq_ring_size;
71   __u32 driver_qp_type;
72 };
73 struct efa_ibv_create_qp_resp {
74   __u32 comp_mask;
75   __u32 rq_db_offset;
76   __u32 sq_db_offset;
77   __u32 llq_desc_offset;
78   __aligned_u64 rq_mmap_key;
79   __aligned_u64 rq_mmap_size;
80   __aligned_u64 rq_db_mmap_key;
81   __aligned_u64 sq_db_mmap_key;
82   __aligned_u64 llq_desc_mmap_key;
83   __u16 send_sub_cq_idx;
84   __u16 recv_sub_cq_idx;
85   __u8 reserved_1e0[4];
86 };
87 struct efa_ibv_create_ah_resp {
88   __u32 comp_mask;
89   __u16 efa_address_handle;
90   __u8 reserved_30[2];
91 };
92 enum {
93   EFA_QUERY_DEVICE_CAPS_RDMA_READ = 1 << 0,
94   EFA_QUERY_DEVICE_CAPS_RNR_RETRY = 1 << 1,
95 };
96 struct efa_ibv_ex_query_device_resp {
97   __u32 comp_mask;
98   __u32 max_sq_wr;
99   __u32 max_rq_wr;
100   __u16 max_sq_sge;
101   __u16 max_rq_sge;
102   __u32 max_rdma_size;
103   __u32 device_caps;
104 };
105 #endif
106