blob: aab5902c54f6083d4a291dee85677ac4b6133785 [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,
Christopher Ferris6cd53a52022-12-12 23:39:16 +000052 EFA_CREATE_CQ_WITH_SGID = 1 << 1,
Christopher Ferrisa4792612022-01-10 13:51:15 -080053};
Christopher Ferrisaeddbcf2019-07-08 12:45:46 -070054struct efa_ibv_create_cq {
55 __u32 comp_mask;
56 __u32 cq_entry_size;
57 __u16 num_sub_cqs;
Christopher Ferrisa4792612022-01-10 13:51:15 -080058 __u8 flags;
59 __u8 reserved_58[5];
60};
61enum {
62 EFA_CREATE_CQ_RESP_DB_OFF = 1 << 0,
Christopher Ferrisaeddbcf2019-07-08 12:45:46 -070063};
64struct efa_ibv_create_cq_resp {
65 __u32 comp_mask;
66 __u8 reserved_20[4];
67 __aligned_u64 q_mmap_key;
68 __aligned_u64 q_mmap_size;
69 __u16 cq_idx;
Christopher Ferrisa4792612022-01-10 13:51:15 -080070 __u8 reserved_d0[2];
71 __u32 db_off;
72 __aligned_u64 db_mmap_key;
Christopher Ferrisaeddbcf2019-07-08 12:45:46 -070073};
74enum {
75 EFA_QP_DRIVER_TYPE_SRD = 0,
76};
77struct efa_ibv_create_qp {
78 __u32 comp_mask;
79 __u32 rq_ring_size;
80 __u32 sq_ring_size;
81 __u32 driver_qp_type;
82};
83struct efa_ibv_create_qp_resp {
84 __u32 comp_mask;
85 __u32 rq_db_offset;
86 __u32 sq_db_offset;
87 __u32 llq_desc_offset;
88 __aligned_u64 rq_mmap_key;
89 __aligned_u64 rq_mmap_size;
90 __aligned_u64 rq_db_mmap_key;
91 __aligned_u64 sq_db_mmap_key;
92 __aligned_u64 llq_desc_mmap_key;
93 __u16 send_sub_cq_idx;
94 __u16 recv_sub_cq_idx;
95 __u8 reserved_1e0[4];
96};
97struct efa_ibv_create_ah_resp {
98 __u32 comp_mask;
99 __u16 efa_address_handle;
100 __u8 reserved_30[2];
101};
Christopher Ferrisd32ca142020-02-04 16:16:51 -0800102enum {
103 EFA_QUERY_DEVICE_CAPS_RDMA_READ = 1 << 0,
Christopher Ferris32ff3f82020-12-14 13:10:04 -0800104 EFA_QUERY_DEVICE_CAPS_RNR_RETRY = 1 << 1,
Christopher Ferrisa4792612022-01-10 13:51:15 -0800105 EFA_QUERY_DEVICE_CAPS_CQ_NOTIFICATIONS = 1 << 2,
Christopher Ferris6cd53a52022-12-12 23:39:16 +0000106 EFA_QUERY_DEVICE_CAPS_CQ_WITH_SGID = 1 << 3,
Christopher Ferris37c3f3c2023-07-10 10:59:05 -0700107 EFA_QUERY_DEVICE_CAPS_DATA_POLLING_128 = 1 << 4,
108 EFA_QUERY_DEVICE_CAPS_RDMA_WRITE = 1 << 5,
Christopher Ferrisd32ca142020-02-04 16:16:51 -0800109};
Christopher Ferrisaeddbcf2019-07-08 12:45:46 -0700110struct efa_ibv_ex_query_device_resp {
111 __u32 comp_mask;
112 __u32 max_sq_wr;
113 __u32 max_rq_wr;
114 __u16 max_sq_sge;
115 __u16 max_rq_sge;
Christopher Ferrisd32ca142020-02-04 16:16:51 -0800116 __u32 max_rdma_size;
117 __u32 device_caps;
Christopher Ferrisaeddbcf2019-07-08 12:45:46 -0700118};
119#endif