blob: d4a908975f7ad3946e3566d8ae594f16f8a0ff1c [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};
Christopher Ferris7ac54f52024-08-07 21:07:12 +000066enum {
67 EFA_CREATE_QP_WITH_UNSOLICITED_WRITE_RECV = 1 << 0,
68};
Christopher Ferrisaeddbcf2019-07-08 12:45:46 -070069struct efa_ibv_create_qp {
70 __u32 comp_mask;
71 __u32 rq_ring_size;
72 __u32 sq_ring_size;
73 __u32 driver_qp_type;
Christopher Ferris7ac54f52024-08-07 21:07:12 +000074 __u16 flags;
75 __u8 reserved_90[6];
Christopher Ferrisaeddbcf2019-07-08 12:45:46 -070076};
77struct efa_ibv_create_qp_resp {
78 __u32 comp_mask;
79 __u32 rq_db_offset;
80 __u32 sq_db_offset;
81 __u32 llq_desc_offset;
82 __aligned_u64 rq_mmap_key;
83 __aligned_u64 rq_mmap_size;
84 __aligned_u64 rq_db_mmap_key;
85 __aligned_u64 sq_db_mmap_key;
86 __aligned_u64 llq_desc_mmap_key;
87 __u16 send_sub_cq_idx;
88 __u16 recv_sub_cq_idx;
89 __u8 reserved_1e0[4];
90};
91struct efa_ibv_create_ah_resp {
92 __u32 comp_mask;
93 __u16 efa_address_handle;
94 __u8 reserved_30[2];
95};
Christopher Ferrisd32ca142020-02-04 16:16:51 -080096enum {
97 EFA_QUERY_DEVICE_CAPS_RDMA_READ = 1 << 0,
Christopher Ferris32ff3f82020-12-14 13:10:04 -080098 EFA_QUERY_DEVICE_CAPS_RNR_RETRY = 1 << 1,
Christopher Ferrisa4792612022-01-10 13:51:15 -080099 EFA_QUERY_DEVICE_CAPS_CQ_NOTIFICATIONS = 1 << 2,
Christopher Ferris6cd53a52022-12-12 23:39:16 +0000100 EFA_QUERY_DEVICE_CAPS_CQ_WITH_SGID = 1 << 3,
Christopher Ferris37c3f3c2023-07-10 10:59:05 -0700101 EFA_QUERY_DEVICE_CAPS_DATA_POLLING_128 = 1 << 4,
102 EFA_QUERY_DEVICE_CAPS_RDMA_WRITE = 1 << 5,
Christopher Ferris7ac54f52024-08-07 21:07:12 +0000103 EFA_QUERY_DEVICE_CAPS_UNSOLICITED_WRITE_RECV = 1 << 6,
Christopher Ferrisd32ca142020-02-04 16:16:51 -0800104};
Christopher Ferrisaeddbcf2019-07-08 12:45:46 -0700105struct efa_ibv_ex_query_device_resp {
106 __u32 comp_mask;
107 __u32 max_sq_wr;
108 __u32 max_rq_wr;
109 __u16 max_sq_sge;
110 __u16 max_rq_sge;
Christopher Ferrisd32ca142020-02-04 16:16:51 -0800111 __u32 max_rdma_size;
112 __u32 device_caps;
Christopher Ferrisaeddbcf2019-07-08 12:45:46 -0700113};
Christopher Ferrisb830ddf2024-03-28 11:48:08 -0700114enum {
115 EFA_QUERY_MR_VALIDITY_RECV_IC_ID = 1 << 0,
116 EFA_QUERY_MR_VALIDITY_RDMA_READ_IC_ID = 1 << 1,
117 EFA_QUERY_MR_VALIDITY_RDMA_RECV_IC_ID = 1 << 2,
118};
119enum efa_query_mr_attrs {
120 EFA_IB_ATTR_QUERY_MR_HANDLE = (1U << UVERBS_ID_NS_SHIFT),
121 EFA_IB_ATTR_QUERY_MR_RESP_IC_ID_VALIDITY,
122 EFA_IB_ATTR_QUERY_MR_RESP_RECV_IC_ID,
123 EFA_IB_ATTR_QUERY_MR_RESP_RDMA_READ_IC_ID,
124 EFA_IB_ATTR_QUERY_MR_RESP_RDMA_RECV_IC_ID,
125};
126enum efa_mr_methods {
127 EFA_IB_METHOD_MR_QUERY = (1U << UVERBS_ID_NS_SHIFT),
128};
Christopher Ferrisaeddbcf2019-07-08 12:45:46 -0700129#endif