blob: 2b30941a85a57791e07e4b7a234c20b916ddc785 [file] [log] [blame]
Elliott Hughes180edef2023-11-02 00:08:05 +00001/*
2 * This file is auto-generated. Modifications will be lost.
3 *
4 * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/
5 * for more information.
6 */
Christopher Ferrisaeddbcf2019-07-08 12:45:46 -07007#ifndef EFA_ABI_USER_H
8#define EFA_ABI_USER_H
9#include <linux/types.h>
Christopher Ferrisb830ddf2024-03-28 11:48:08 -070010#include <rdma/ib_user_ioctl_cmds.h>
Christopher Ferrisaeddbcf2019-07-08 12:45:46 -070011#define EFA_UVERBS_ABI_VERSION 1
Christopher Ferris25c18d42020-10-14 17:42:58 -070012enum {
13 EFA_ALLOC_UCONTEXT_CMD_COMP_TX_BATCH = 1 << 0,
14 EFA_ALLOC_UCONTEXT_CMD_COMP_MIN_SQ_WR = 1 << 1,
15};
16struct efa_ibv_alloc_ucontext_cmd {
17 __u32 comp_mask;
18 __u8 reserved_20[4];
19};
Christopher Ferrisaeddbcf2019-07-08 12:45:46 -070020enum efa_ibv_user_cmds_supp_udata {
21 EFA_USER_CMDS_SUPP_UDATA_QUERY_DEVICE = 1 << 0,
22 EFA_USER_CMDS_SUPP_UDATA_CREATE_AH = 1 << 1,
23};
24struct efa_ibv_alloc_ucontext_resp {
25 __u32 comp_mask;
26 __u32 cmds_supp_udata_mask;
27 __u16 sub_cqs_per_cq;
28 __u16 inline_buf_size;
29 __u32 max_llq_size;
Christopher Ferris25c18d42020-10-14 17:42:58 -070030 __u16 max_tx_batch;
31 __u16 min_sq_wr;
32 __u8 reserved_a0[4];
Christopher Ferrisaeddbcf2019-07-08 12:45:46 -070033};
34struct efa_ibv_alloc_pd_resp {
35 __u32 comp_mask;
36 __u16 pdn;
37 __u8 reserved_30[2];
38};
Christopher Ferrisa4792612022-01-10 13:51:15 -080039enum {
40 EFA_CREATE_CQ_WITH_COMPLETION_CHANNEL = 1 << 0,
Christopher Ferris6cd53a52022-12-12 23:39:16 +000041 EFA_CREATE_CQ_WITH_SGID = 1 << 1,
Christopher Ferrisa4792612022-01-10 13:51:15 -080042};
Christopher Ferrisaeddbcf2019-07-08 12:45:46 -070043struct efa_ibv_create_cq {
44 __u32 comp_mask;
45 __u32 cq_entry_size;
46 __u16 num_sub_cqs;
Christopher Ferrisa4792612022-01-10 13:51:15 -080047 __u8 flags;
48 __u8 reserved_58[5];
49};
50enum {
51 EFA_CREATE_CQ_RESP_DB_OFF = 1 << 0,
Christopher Ferrisaeddbcf2019-07-08 12:45:46 -070052};
53struct efa_ibv_create_cq_resp {
54 __u32 comp_mask;
55 __u8 reserved_20[4];
56 __aligned_u64 q_mmap_key;
57 __aligned_u64 q_mmap_size;
58 __u16 cq_idx;
Christopher Ferrisa4792612022-01-10 13:51:15 -080059 __u8 reserved_d0[2];
60 __u32 db_off;
61 __aligned_u64 db_mmap_key;
Christopher Ferrisaeddbcf2019-07-08 12:45:46 -070062};
63enum {
64 EFA_QP_DRIVER_TYPE_SRD = 0,
65};
66struct efa_ibv_create_qp {
67 __u32 comp_mask;
68 __u32 rq_ring_size;
69 __u32 sq_ring_size;
70 __u32 driver_qp_type;
71};
72struct efa_ibv_create_qp_resp {
73 __u32 comp_mask;
74 __u32 rq_db_offset;
75 __u32 sq_db_offset;
76 __u32 llq_desc_offset;
77 __aligned_u64 rq_mmap_key;
78 __aligned_u64 rq_mmap_size;
79 __aligned_u64 rq_db_mmap_key;
80 __aligned_u64 sq_db_mmap_key;
81 __aligned_u64 llq_desc_mmap_key;
82 __u16 send_sub_cq_idx;
83 __u16 recv_sub_cq_idx;
84 __u8 reserved_1e0[4];
85};
86struct efa_ibv_create_ah_resp {
87 __u32 comp_mask;
88 __u16 efa_address_handle;
89 __u8 reserved_30[2];
90};
Christopher Ferrisd32ca142020-02-04 16:16:51 -080091enum {
92 EFA_QUERY_DEVICE_CAPS_RDMA_READ = 1 << 0,
Christopher Ferris32ff3f82020-12-14 13:10:04 -080093 EFA_QUERY_DEVICE_CAPS_RNR_RETRY = 1 << 1,
Christopher Ferrisa4792612022-01-10 13:51:15 -080094 EFA_QUERY_DEVICE_CAPS_CQ_NOTIFICATIONS = 1 << 2,
Christopher Ferris6cd53a52022-12-12 23:39:16 +000095 EFA_QUERY_DEVICE_CAPS_CQ_WITH_SGID = 1 << 3,
Christopher Ferris37c3f3c2023-07-10 10:59:05 -070096 EFA_QUERY_DEVICE_CAPS_DATA_POLLING_128 = 1 << 4,
97 EFA_QUERY_DEVICE_CAPS_RDMA_WRITE = 1 << 5,
Christopher Ferrisd32ca142020-02-04 16:16:51 -080098};
Christopher Ferrisaeddbcf2019-07-08 12:45:46 -070099struct efa_ibv_ex_query_device_resp {
100 __u32 comp_mask;
101 __u32 max_sq_wr;
102 __u32 max_rq_wr;
103 __u16 max_sq_sge;
104 __u16 max_rq_sge;
Christopher Ferrisd32ca142020-02-04 16:16:51 -0800105 __u32 max_rdma_size;
106 __u32 device_caps;
Christopher Ferrisaeddbcf2019-07-08 12:45:46 -0700107};
Christopher Ferrisb830ddf2024-03-28 11:48:08 -0700108enum {
109 EFA_QUERY_MR_VALIDITY_RECV_IC_ID = 1 << 0,
110 EFA_QUERY_MR_VALIDITY_RDMA_READ_IC_ID = 1 << 1,
111 EFA_QUERY_MR_VALIDITY_RDMA_RECV_IC_ID = 1 << 2,
112};
113enum efa_query_mr_attrs {
114 EFA_IB_ATTR_QUERY_MR_HANDLE = (1U << UVERBS_ID_NS_SHIFT),
115 EFA_IB_ATTR_QUERY_MR_RESP_IC_ID_VALIDITY,
116 EFA_IB_ATTR_QUERY_MR_RESP_RECV_IC_ID,
117 EFA_IB_ATTR_QUERY_MR_RESP_RDMA_READ_IC_ID,
118 EFA_IB_ATTR_QUERY_MR_RESP_RDMA_RECV_IC_ID,
119};
120enum efa_mr_methods {
121 EFA_IB_METHOD_MR_QUERY = (1U << UVERBS_ID_NS_SHIFT),
122};
Christopher Ferrisaeddbcf2019-07-08 12:45:46 -0700123#endif