1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44 #ifndef OCRDMA_ABI_USER_H
45 #define OCRDMA_ABI_USER_H
46
47 #include <linux/types.h>
48
49 #define OCRDMA_ABI_VERSION 2
50 #define OCRDMA_BE_ROCE_ABI_VERSION 1
51
52
53 struct ocrdma_alloc_ucontext_resp {
54 __u32 dev_id;
55 __u32 wqe_size;
56 __u32 max_inline_data;
57 __u32 dpp_wqe_size;
58 __aligned_u64 ah_tbl_page;
59 __u32 ah_tbl_len;
60 __u32 rqe_size;
61 __u8 fw_ver[32];
62
63 __aligned_u64 rsvd1;
64 __aligned_u64 rsvd2;
65 };
66
67 struct ocrdma_alloc_pd_ureq {
68 __u32 rsvd[2];
69 };
70
71 struct ocrdma_alloc_pd_uresp {
72 __u32 id;
73 __u32 dpp_enabled;
74 __u32 dpp_page_addr_hi;
75 __u32 dpp_page_addr_lo;
76 __u32 rsvd[2];
77 };
78
79 struct ocrdma_create_cq_ureq {
80 __u32 dpp_cq;
81 __u32 rsvd;
82 };
83
84 #define MAX_CQ_PAGES 8
85 struct ocrdma_create_cq_uresp {
86 __u32 cq_id;
87 __u32 page_size;
88 __u32 num_pages;
89 __u32 max_hw_cqe;
90 __aligned_u64 page_addr[MAX_CQ_PAGES];
91 __aligned_u64 db_page_addr;
92 __u32 db_page_size;
93 __u32 phase_change;
94
95 __aligned_u64 rsvd1;
96 __aligned_u64 rsvd2;
97 };
98
99 #define MAX_QP_PAGES 8
100 #define MAX_UD_AV_PAGES 8
101
102 struct ocrdma_create_qp_ureq {
103 __u8 enable_dpp_cq;
104 __u8 rsvd;
105 __u16 dpp_cq_id;
106 __u32 rsvd1;
107 };
108
109 struct ocrdma_create_qp_uresp {
110 __u16 qp_id;
111 __u16 sq_dbid;
112 __u16 rq_dbid;
113 __u16 resv0;
114 __u32 sq_page_size;
115 __u32 rq_page_size;
116 __u32 num_sq_pages;
117 __u32 num_rq_pages;
118 __aligned_u64 sq_page_addr[MAX_QP_PAGES];
119 __aligned_u64 rq_page_addr[MAX_QP_PAGES];
120 __aligned_u64 db_page_addr;
121 __u32 db_page_size;
122 __u32 dpp_credit;
123 __u32 dpp_offset;
124 __u32 num_wqe_allocated;
125 __u32 num_rqe_allocated;
126 __u32 db_sq_offset;
127 __u32 db_rq_offset;
128 __u32 db_shift;
129 __aligned_u64 rsvd[11];
130 };
131
132 struct ocrdma_create_srq_uresp {
133 __u16 rq_dbid;
134 __u16 resv0;
135 __u32 resv1;
136
137 __u32 rq_page_size;
138 __u32 num_rq_pages;
139
140 __aligned_u64 rq_page_addr[MAX_QP_PAGES];
141 __aligned_u64 db_page_addr;
142
143 __u32 db_page_size;
144 __u32 num_rqe_allocated;
145 __u32 db_rq_offset;
146 __u32 db_shift;
147
148 __aligned_u64 rsvd2;
149 __aligned_u64 rsvd3;
150 };
151
152 #endif