blob: c327764c4301f64b8d5682aac87886cec4f88721 [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>
10#define EFA_UVERBS_ABI_VERSION 1
Christopher Ferris25c18d42020-10-14 17:42:58 -070011enum {
12 EFA_ALLOC_UCONTEXT_CMD_COMP_TX_BATCH = 1 << 0,
13 EFA_ALLOC_UCONTEXT_CMD_COMP_MIN_SQ_WR = 1 << 1,
14};
15struct efa_ibv_alloc_ucontext_cmd {
16 __u32 comp_mask;
17 __u8 reserved_20[4];
18};
Christopher Ferrisaeddbcf2019-07-08 12:45:46 -070019enum efa_ibv_user_cmds_supp_udata {
20 EFA_USER_CMDS_SUPP_UDATA_QUERY_DEVICE = 1 << 0,
21 EFA_USER_CMDS_SUPP_UDATA_CREATE_AH = 1 << 1,
22};
23struct efa_ibv_alloc_ucontext_resp {
24 __u32 comp_mask;
25 __u32 cmds_supp_udata_mask;
26 __u16 sub_cqs_per_cq;
27 __u16 inline_buf_size;
28 __u32 max_llq_size;
Christopher Ferris25c18d42020-10-14 17:42:58 -070029 __u16 max_tx_batch;
30 __u16 min_sq_wr;
31 __u8 reserved_a0[4];
Christopher Ferrisaeddbcf2019-07-08 12:45:46 -070032};
33struct efa_ibv_alloc_pd_resp {
34 __u32 comp_mask;
35 __u16 pdn;
36 __u8 reserved_30[2];
37};
Christopher Ferrisa4792612022-01-10 13:51:15 -080038enum {
39 EFA_CREATE_CQ_WITH_COMPLETION_CHANNEL = 1 << 0,
Christopher Ferris6cd53a52022-12-12 23:39:16 +000040 EFA_CREATE_CQ_WITH_SGID = 1 << 1,
Christopher Ferrisa4792612022-01-10 13:51:15 -080041};
Christopher Ferrisaeddbcf2019-07-08 12:45:46 -070042struct efa_ibv_create_cq {
43 __u32 comp_mask;
44 __u32 cq_entry_size;
45 __u16 num_sub_cqs;
Christopher Ferrisa4792612022-01-10 13:51:15 -080046 __u8 flags;
47 __u8 reserved_58[5];
48};
49enum {
50 EFA_CREATE_CQ_RESP_DB_OFF = 1 << 0,
Christopher Ferrisaeddbcf2019-07-08 12:45:46 -070051};
52struct efa_ibv_create_cq_resp {
53 __u32 comp_mask;
54 __u8 reserved_20[4];
55 __aligned_u64 q_mmap_key;
56 __aligned_u64 q_mmap_size;
57 __u16 cq_idx;
Christopher Ferrisa4792612022-01-10 13:51:15 -080058 __u8 reserved_d0[2];
59 __u32 db_off;
60 __aligned_u64 db_mmap_key;
Christopher Ferrisaeddbcf2019-07-08 12:45:46 -070061};
62enum {
63 EFA_QP_DRIVER_TYPE_SRD = 0,
64};
65struct efa_ibv_create_qp {
66 __u32 comp_mask;
67 __u32 rq_ring_size;
68 __u32 sq_ring_size;
69 __u32 driver_qp_type;
70};
71struct efa_ibv_create_qp_resp {
72 __u32 comp_mask;
73 __u32 rq_db_offset;
74 __u32 sq_db_offset;
75 __u32 llq_desc_offset;
76 __aligned_u64 rq_mmap_key;
77 __aligned_u64 rq_mmap_size;
78 __aligned_u64 rq_db_mmap_key;
79 __aligned_u64 sq_db_mmap_key;
80 __aligned_u64 llq_desc_mmap_key;
81 __u16 send_sub_cq_idx;
82 __u16 recv_sub_cq_idx;
83 __u8 reserved_1e0[4];
84};
85struct efa_ibv_create_ah_resp {
86 __u32 comp_mask;
87 __u16 efa_address_handle;
88 __u8 reserved_30[2];
89};
Christopher Ferrisd32ca142020-02-04 16:16:51 -080090enum {
91 EFA_QUERY_DEVICE_CAPS_RDMA_READ = 1 << 0,
Christopher Ferris32ff3f82020-12-14 13:10:04 -080092 EFA_QUERY_DEVICE_CAPS_RNR_RETRY = 1 << 1,
Christopher Ferrisa4792612022-01-10 13:51:15 -080093 EFA_QUERY_DEVICE_CAPS_CQ_NOTIFICATIONS = 1 << 2,
Christopher Ferris6cd53a52022-12-12 23:39:16 +000094 EFA_QUERY_DEVICE_CAPS_CQ_WITH_SGID = 1 << 3,
Christopher Ferris37c3f3c2023-07-10 10:59:05 -070095 EFA_QUERY_DEVICE_CAPS_DATA_POLLING_128 = 1 << 4,
96 EFA_QUERY_DEVICE_CAPS_RDMA_WRITE = 1 << 5,
Christopher Ferrisd32ca142020-02-04 16:16:51 -080097};
Christopher Ferrisaeddbcf2019-07-08 12:45:46 -070098struct efa_ibv_ex_query_device_resp {
99 __u32 comp_mask;
100 __u32 max_sq_wr;
101 __u32 max_rq_wr;
102 __u16 max_sq_sge;
103 __u16 max_rq_sge;
Christopher Ferrisd32ca142020-02-04 16:16:51 -0800104 __u32 max_rdma_size;
105 __u32 device_caps;
Christopher Ferrisaeddbcf2019-07-08 12:45:46 -0700106};
107#endif