]>
Commit | Line | Data |
---|---|---|
71ee6730 DS |
1 | /* This file is part of the Emulex RoCE Device Driver for |
2 | * RoCE (RDMA over Converged Ethernet) adapters. | |
3 | * Copyright (C) 2012-2015 Emulex. All rights reserved. | |
4 | * EMULEX and SLI are trademarks of Emulex. | |
5 | * www.emulex.com | |
6 | * | |
7 | * This software is available to you under a choice of one of two licenses. | |
8 | * You may choose to be licensed under the terms of the GNU General Public | |
9 | * License (GPL) Version 2, available from the file COPYING in the main | |
10 | * directory of this source tree, or the BSD license below: | |
11 | * | |
12 | * Redistribution and use in source and binary forms, with or without | |
13 | * modification, are permitted provided that the following conditions | |
14 | * are met: | |
15 | * | |
16 | * - Redistributions of source code must retain the above copyright notice, | |
17 | * this list of conditions and the following disclaimer. | |
18 | * | |
19 | * - Redistributions in binary form must reproduce the above copyright | |
20 | * notice, this list of conditions and the following disclaimer in | |
21 | * the documentation and/or other materials provided with the distribution. | |
22 | * | |
23 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | |
24 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,THE | |
25 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
26 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE | |
27 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
28 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
29 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR | |
30 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | |
31 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | |
32 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF | |
33 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
fe2caefc PP |
34 | * |
35 | * Contact Information: | |
36 | * [email protected] | |
37 | * | |
38 | * Emulex | |
39 | * 3333 Susan Street | |
40 | * Costa Mesa, CA 92626 | |
71ee6730 | 41 | */ |
fe2caefc PP |
42 | |
43 | #ifndef __OCRDMA_ABI_H__ | |
44 | #define __OCRDMA_ABI_H__ | |
45 | ||
2e6e9f2b | 46 | #define OCRDMA_ABI_VERSION 2 |
b6b87d2e | 47 | #define OCRDMA_BE_ROCE_ABI_VERSION 1 |
7b9b1a59 NG |
48 | /* user kernel communication data structures. */ |
49 | ||
fe2caefc PP |
50 | struct ocrdma_alloc_ucontext_resp { |
51 | u32 dev_id; | |
52 | u32 wqe_size; | |
53 | u32 max_inline_data; | |
54 | u32 dpp_wqe_size; | |
55 | u64 ah_tbl_page; | |
56 | u32 ah_tbl_len; | |
fe2caefc | 57 | u32 rqe_size; |
7b9b1a59 NG |
58 | u8 fw_ver[32]; |
59 | /* for future use/new features in progress */ | |
fe2caefc | 60 | u64 rsvd1; |
7b9b1a59 NG |
61 | u64 rsvd2; |
62 | }; | |
fe2caefc | 63 | |
fe2caefc PP |
64 | struct ocrdma_alloc_pd_ureq { |
65 | u64 rsvd1; | |
7b9b1a59 | 66 | }; |
fe2caefc PP |
67 | |
68 | struct ocrdma_alloc_pd_uresp { | |
69 | u32 id; | |
70 | u32 dpp_enabled; | |
71 | u32 dpp_page_addr_hi; | |
72 | u32 dpp_page_addr_lo; | |
73 | u64 rsvd1; | |
7b9b1a59 | 74 | }; |
fe2caefc PP |
75 | |
76 | struct ocrdma_create_cq_ureq { | |
77 | u32 dpp_cq; | |
7b9b1a59 NG |
78 | u32 rsvd; /* pad */ |
79 | }; | |
fe2caefc PP |
80 | |
81 | #define MAX_CQ_PAGES 8 | |
82 | struct ocrdma_create_cq_uresp { | |
83 | u32 cq_id; | |
84 | u32 page_size; | |
85 | u32 num_pages; | |
86 | u32 max_hw_cqe; | |
87 | u64 page_addr[MAX_CQ_PAGES]; | |
88 | u64 db_page_addr; | |
89 | u32 db_page_size; | |
90 | u32 phase_change; | |
7b9b1a59 | 91 | /* for future use/new features in progress */ |
fe2caefc PP |
92 | u64 rsvd1; |
93 | u64 rsvd2; | |
7b9b1a59 | 94 | }; |
fe2caefc PP |
95 | |
96 | #define MAX_QP_PAGES 8 | |
97 | #define MAX_UD_AV_PAGES 8 | |
98 | ||
99 | struct ocrdma_create_qp_ureq { | |
100 | u8 enable_dpp_cq; | |
101 | u8 rsvd; | |
102 | u16 dpp_cq_id; | |
7b9b1a59 | 103 | u32 rsvd1; /* pad */ |
fe2caefc PP |
104 | }; |
105 | ||
106 | struct ocrdma_create_qp_uresp { | |
107 | u16 qp_id; | |
108 | u16 sq_dbid; | |
109 | u16 rq_dbid; | |
7b9b1a59 | 110 | u16 resv0; /* pad */ |
fe2caefc PP |
111 | u32 sq_page_size; |
112 | u32 rq_page_size; | |
113 | u32 num_sq_pages; | |
114 | u32 num_rq_pages; | |
115 | u64 sq_page_addr[MAX_QP_PAGES]; | |
116 | u64 rq_page_addr[MAX_QP_PAGES]; | |
117 | u64 db_page_addr; | |
118 | u32 db_page_size; | |
119 | u32 dpp_credit; | |
120 | u32 dpp_offset; | |
fe2caefc PP |
121 | u32 num_wqe_allocated; |
122 | u32 num_rqe_allocated; | |
fe2caefc PP |
123 | u32 db_sq_offset; |
124 | u32 db_rq_offset; | |
125 | u32 db_shift; | |
fad51b7d | 126 | u64 rsvd[11]; |
fe2caefc PP |
127 | } __packed; |
128 | ||
129 | struct ocrdma_create_srq_uresp { | |
130 | u16 rq_dbid; | |
7b9b1a59 | 131 | u16 resv0; /* pad */ |
fe2caefc PP |
132 | u32 resv1; |
133 | ||
134 | u32 rq_page_size; | |
135 | u32 num_rq_pages; | |
136 | ||
137 | u64 rq_page_addr[MAX_QP_PAGES]; | |
138 | u64 db_page_addr; | |
139 | ||
140 | u32 db_page_size; | |
141 | u32 num_rqe_allocated; | |
142 | u32 db_rq_offset; | |
143 | u32 db_shift; | |
144 | ||
cd4fedf9 | 145 | u64 rsvd2; |
fe2caefc | 146 | u64 rsvd3; |
7b9b1a59 | 147 | }; |
fe2caefc PP |
148 | |
149 | #endif /* __OCRDMA_ABI_H__ */ |