net/bnxt: use SPDX license tag
[dpdk.git] / drivers / net / bnxt / tf_core / cfa_resource_types.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2019-2020 Broadcom
3  * All rights reserved.
4  */
5
6 #ifndef _CFA_RESOURCE_TYPES_H_
7 #define _CFA_RESOURCE_TYPES_H_
8 /*
9  * This is the constant used to define invalid CFA
10  * resource types across all devices.
11  */
12 #define CFA_RESOURCE_TYPE_INVALID 65535
13
14 /* L2 Context TCAM High priority entries */
15 #define CFA_RESOURCE_TYPE_P59_L2_CTXT_TCAM_HIGH  0x0UL
16 /* L2 Context TCAM Low priority entries */
17 #define CFA_RESOURCE_TYPE_P59_L2_CTXT_TCAM_LOW   0x1UL
18 /* L2 Context REMAP high priority entries */
19 #define CFA_RESOURCE_TYPE_P59_L2_CTXT_REMAP_HIGH 0x2UL
20 /* L2 Context REMAP Low priority entries */
21 #define CFA_RESOURCE_TYPE_P59_L2_CTXT_REMAP_LOW  0x3UL
22 /* Profile Func */
23 #define CFA_RESOURCE_TYPE_P59_PROF_FUNC          0x4UL
24 /* Profile TCAM */
25 #define CFA_RESOURCE_TYPE_P59_PROF_TCAM          0x5UL
26 /* Exact Match Profile Id */
27 #define CFA_RESOURCE_TYPE_P59_EM_PROF_ID         0x6UL
28 /* Wildcard TCAM Profile Id */
29 #define CFA_RESOURCE_TYPE_P59_WC_TCAM_PROF_ID    0x7UL
30 /* Wildcard TCAM */
31 #define CFA_RESOURCE_TYPE_P59_WC_TCAM            0x8UL
32 /* Meter Profile */
33 #define CFA_RESOURCE_TYPE_P59_METER_PROF         0x9UL
34 /* Meter */
35 #define CFA_RESOURCE_TYPE_P59_METER              0xaUL
36 /* Meter */
37 #define CFA_RESOURCE_TYPE_P59_MIRROR             0xbUL
38 /* Source Properties TCAM */
39 #define CFA_RESOURCE_TYPE_P59_SP_TCAM            0xcUL
40 /* Exact Match Flexible Key Builder */
41 #define CFA_RESOURCE_TYPE_P59_EM_FKB             0xdUL
42 /* Wildcard Flexible Key Builder */
43 #define CFA_RESOURCE_TYPE_P59_WC_FKB             0xeUL
44 /* Table Scope */
45 #define CFA_RESOURCE_TYPE_P59_TBL_SCOPE          0xfUL
46 /* L2 Func */
47 #define CFA_RESOURCE_TYPE_P59_L2_FUNC            0x10UL
48 /* EPOCH 0 */
49 #define CFA_RESOURCE_TYPE_P59_EPOCH0             0x11UL
50 /* EPOCH 1 */
51 #define CFA_RESOURCE_TYPE_P59_EPOCH1             0x12UL
52 /* Metadata */
53 #define CFA_RESOURCE_TYPE_P59_METADATA           0x13UL
54 /* Connection Tracking Rule TCAM */
55 #define CFA_RESOURCE_TYPE_P59_CT_RULE_TCAM       0x14UL
56 /* Range Profile */
57 #define CFA_RESOURCE_TYPE_P59_RANGE_PROF         0x15UL
58 /* Range */
59 #define CFA_RESOURCE_TYPE_P59_RANGE              0x16UL
60 /* Link Aggrigation */
61 #define CFA_RESOURCE_TYPE_P59_LAG                0x17UL
62 /* VEB TCAM */
63 #define CFA_RESOURCE_TYPE_P59_VEB_TCAM           0x18UL
64 #define CFA_RESOURCE_TYPE_P59_LAST              CFA_RESOURCE_TYPE_P59_VEB_TCAM
65
66
67 /* Multicast Group */
68 #define CFA_RESOURCE_TYPE_P58_MCG                 0x0UL
69 /* Encap 8 byte record */
70 #define CFA_RESOURCE_TYPE_P58_ENCAP_8B            0x1UL
71 /* Encap 16 byte record */
72 #define CFA_RESOURCE_TYPE_P58_ENCAP_16B           0x2UL
73 /* Encap 64 byte record */
74 #define CFA_RESOURCE_TYPE_P58_ENCAP_64B           0x3UL
75 /* Source Property MAC */
76 #define CFA_RESOURCE_TYPE_P58_SP_MAC              0x4UL
77 /* Source Property MAC and IPv4 */
78 #define CFA_RESOURCE_TYPE_P58_SP_MAC_IPV4         0x5UL
79 /* Source Property MAC and IPv6 */
80 #define CFA_RESOURCE_TYPE_P58_SP_MAC_IPV6         0x6UL
81 /* Network Address Translation Port */
82 #define CFA_RESOURCE_TYPE_P58_NAT_PORT            0x7UL
83 /* Network Address Translation IPv4 address */
84 #define CFA_RESOURCE_TYPE_P58_NAT_IPV4            0x8UL
85 /* Meter */
86 #define CFA_RESOURCE_TYPE_P58_METER               0x9UL
87 /* Flow State */
88 #define CFA_RESOURCE_TYPE_P58_FLOW_STATE          0xaUL
89 /* Full Action Records */
90 #define CFA_RESOURCE_TYPE_P58_FULL_ACTION         0xbUL
91 /* Action Record Format 0 */
92 #define CFA_RESOURCE_TYPE_P58_FORMAT_0_ACTION     0xcUL
93 /* Action Record Ext Format 0 */
94 #define CFA_RESOURCE_TYPE_P58_EXT_FORMAT_0_ACTION 0xdUL
95 /* Action Record Format 1 */
96 #define CFA_RESOURCE_TYPE_P58_FORMAT_1_ACTION     0xeUL
97 /* Action Record Format 2 */
98 #define CFA_RESOURCE_TYPE_P58_FORMAT_2_ACTION     0xfUL
99 /* Action Record Format 3 */
100 #define CFA_RESOURCE_TYPE_P58_FORMAT_3_ACTION     0x10UL
101 /* Action Record Format 4 */
102 #define CFA_RESOURCE_TYPE_P58_FORMAT_4_ACTION     0x11UL
103 /* Action Record Format 5 */
104 #define CFA_RESOURCE_TYPE_P58_FORMAT_5_ACTION     0x12UL
105 /* Action Record Format 6 */
106 #define CFA_RESOURCE_TYPE_P58_FORMAT_6_ACTION     0x13UL
107 /* L2 Context TCAM High priority entries */
108 #define CFA_RESOURCE_TYPE_P58_L2_CTXT_TCAM_HIGH   0x14UL
109 /* L2 Context TCAM Low priority entries */
110 #define CFA_RESOURCE_TYPE_P58_L2_CTXT_TCAM_LOW    0x15UL
111 /* L2 Context REMAP high priority entries */
112 #define CFA_RESOURCE_TYPE_P58_L2_CTXT_REMAP_HIGH  0x16UL
113 /* L2 Context REMAP Low priority entries */
114 #define CFA_RESOURCE_TYPE_P58_L2_CTXT_REMAP_LOW   0x17UL
115 /* Profile Func */
116 #define CFA_RESOURCE_TYPE_P58_PROF_FUNC           0x18UL
117 /* Profile TCAM */
118 #define CFA_RESOURCE_TYPE_P58_PROF_TCAM           0x19UL
119 /* Exact Match Profile Id */
120 #define CFA_RESOURCE_TYPE_P58_EM_PROF_ID          0x1aUL
121 /* Wildcard Profile Id */
122 #define CFA_RESOURCE_TYPE_P58_WC_TCAM_PROF_ID     0x1bUL
123 /* Exact Match Record */
124 #define CFA_RESOURCE_TYPE_P58_EM_REC              0x1cUL
125 /* Wildcard TCAM */
126 #define CFA_RESOURCE_TYPE_P58_WC_TCAM             0x1dUL
127 /* Meter profile */
128 #define CFA_RESOURCE_TYPE_P58_METER_PROF          0x1eUL
129 /* Meter */
130 #define CFA_RESOURCE_TYPE_P58_MIRROR              0x1fUL
131 /* Source Property TCAM */
132 #define CFA_RESOURCE_TYPE_P58_SP_TCAM             0x20UL
133 /* Exact Match Flexible Key Builder */
134 #define CFA_RESOURCE_TYPE_P58_EM_FKB              0x21UL
135 /* Wildcard Flexible Key Builder */
136 #define CFA_RESOURCE_TYPE_P58_WC_FKB              0x22UL
137 /* VEB TCAM */
138 #define CFA_RESOURCE_TYPE_P58_VEB_TCAM            0x23UL
139 #define CFA_RESOURCE_TYPE_P58_LAST               CFA_RESOURCE_TYPE_P58_VEB_TCAM
140
141
142 /* Multicast Group */
143 #define CFA_RESOURCE_TYPE_P45_MCG                 0x0UL
144 /* Encap 8 byte record */
145 #define CFA_RESOURCE_TYPE_P45_ENCAP_8B            0x1UL
146 /* Encap 16 byte record */
147 #define CFA_RESOURCE_TYPE_P45_ENCAP_16B           0x2UL
148 /* Encap 64 byte record */
149 #define CFA_RESOURCE_TYPE_P45_ENCAP_64B           0x3UL
150 /* Source Property MAC */
151 #define CFA_RESOURCE_TYPE_P45_SP_MAC              0x4UL
152 /* Source Property MAC and IPv4 */
153 #define CFA_RESOURCE_TYPE_P45_SP_MAC_IPV4         0x5UL
154 /* Source Property MAC and IPv6 */
155 #define CFA_RESOURCE_TYPE_P45_SP_MAC_IPV6         0x6UL
156 /* 64B Counters */
157 #define CFA_RESOURCE_TYPE_P45_COUNTER_64B         0x7UL
158 /* Network Address Translation Port */
159 #define CFA_RESOURCE_TYPE_P45_NAT_PORT            0x8UL
160 /* Network Address Translation IPv4 address */
161 #define CFA_RESOURCE_TYPE_P45_NAT_IPV4            0x9UL
162 /* Meter */
163 #define CFA_RESOURCE_TYPE_P45_METER               0xaUL
164 /* Flow State */
165 #define CFA_RESOURCE_TYPE_P45_FLOW_STATE          0xbUL
166 /* Full Action Records */
167 #define CFA_RESOURCE_TYPE_P45_FULL_ACTION         0xcUL
168 /* Action Record Format 0 */
169 #define CFA_RESOURCE_TYPE_P45_FORMAT_0_ACTION     0xdUL
170 /* Action Record Ext Format 0 */
171 #define CFA_RESOURCE_TYPE_P45_EXT_FORMAT_0_ACTION 0xeUL
172 /* Action Record Format 1 */
173 #define CFA_RESOURCE_TYPE_P45_FORMAT_1_ACTION     0xfUL
174 /* Action Record Format 2 */
175 #define CFA_RESOURCE_TYPE_P45_FORMAT_2_ACTION     0x10UL
176 /* Action Record Format 3 */
177 #define CFA_RESOURCE_TYPE_P45_FORMAT_3_ACTION     0x11UL
178 /* Action Record Format 4 */
179 #define CFA_RESOURCE_TYPE_P45_FORMAT_4_ACTION     0x12UL
180 /* Action Record Format 5 */
181 #define CFA_RESOURCE_TYPE_P45_FORMAT_5_ACTION     0x13UL
182 /* Action Record Format 6 */
183 #define CFA_RESOURCE_TYPE_P45_FORMAT_6_ACTION     0x14UL
184 /* L2 Context TCAM High priority entries */
185 #define CFA_RESOURCE_TYPE_P45_L2_CTXT_TCAM_HIGH   0x15UL
186 /* L2 Context TCAM Low priority entries */
187 #define CFA_RESOURCE_TYPE_P45_L2_CTXT_TCAM_LOW    0x16UL
188 /* L2 Context REMAP high priority entries */
189 #define CFA_RESOURCE_TYPE_P45_L2_CTXT_REMAP_HIGH  0x17UL
190 /* L2 Context REMAP Low priority entries */
191 #define CFA_RESOURCE_TYPE_P45_L2_CTXT_REMAP_LOW   0x18UL
192 /* Profile Func */
193 #define CFA_RESOURCE_TYPE_P45_PROF_FUNC           0x19UL
194 /* Profile TCAM */
195 #define CFA_RESOURCE_TYPE_P45_PROF_TCAM           0x1aUL
196 /* Exact Match Profile Id */
197 #define CFA_RESOURCE_TYPE_P45_EM_PROF_ID          0x1bUL
198 /* Exact Match Record */
199 #define CFA_RESOURCE_TYPE_P45_EM_REC              0x1cUL
200 /* Wildcard Profile Id */
201 #define CFA_RESOURCE_TYPE_P45_WC_TCAM_PROF_ID     0x1dUL
202 /* Wildcard TCAM */
203 #define CFA_RESOURCE_TYPE_P45_WC_TCAM             0x1eUL
204 /* Meter profile */
205 #define CFA_RESOURCE_TYPE_P45_METER_PROF          0x1fUL
206 /* Meter */
207 #define CFA_RESOURCE_TYPE_P45_MIRROR              0x20UL
208 /* Source Property TCAM */
209 #define CFA_RESOURCE_TYPE_P45_SP_TCAM             0x21UL
210 /* VEB TCAM */
211 #define CFA_RESOURCE_TYPE_P45_VEB_TCAM            0x22UL
212 /* Table Scope */
213 #define CFA_RESOURCE_TYPE_P45_TBL_SCOPE           0x23UL
214 #define CFA_RESOURCE_TYPE_P45_LAST               CFA_RESOURCE_TYPE_P45_TBL_SCOPE
215
216
217 /* Multicast Group */
218 #define CFA_RESOURCE_TYPE_P4_MCG                 0x0UL
219 /* Encap 8 byte record */
220 #define CFA_RESOURCE_TYPE_P4_ENCAP_8B            0x1UL
221 /* Encap 16 byte record */
222 #define CFA_RESOURCE_TYPE_P4_ENCAP_16B           0x2UL
223 /* Encap 64 byte record */
224 #define CFA_RESOURCE_TYPE_P4_ENCAP_64B           0x3UL
225 /* Source Property MAC */
226 #define CFA_RESOURCE_TYPE_P4_SP_MAC              0x4UL
227 /* Source Property MAC and IPv4 */
228 #define CFA_RESOURCE_TYPE_P4_SP_MAC_IPV4         0x5UL
229 /* Source Property MAC and IPv6 */
230 #define CFA_RESOURCE_TYPE_P4_SP_MAC_IPV6         0x6UL
231 /* 64B Counters */
232 #define CFA_RESOURCE_TYPE_P4_COUNTER_64B         0x7UL
233 /* Network Address Translation Port */
234 #define CFA_RESOURCE_TYPE_P4_NAT_PORT            0x8UL
235 /* Network Address Translation IPv4 address */
236 #define CFA_RESOURCE_TYPE_P4_NAT_IPV4            0x9UL
237 /* Meter */
238 #define CFA_RESOURCE_TYPE_P4_METER               0xaUL
239 /* Flow State */
240 #define CFA_RESOURCE_TYPE_P4_FLOW_STATE          0xbUL
241 /* Full Action Records */
242 #define CFA_RESOURCE_TYPE_P4_FULL_ACTION         0xcUL
243 /* Action Record Format 0 */
244 #define CFA_RESOURCE_TYPE_P4_FORMAT_0_ACTION     0xdUL
245 /* Action Record Ext Format 0 */
246 #define CFA_RESOURCE_TYPE_P4_EXT_FORMAT_0_ACTION 0xeUL
247 /* Action Record Format 1 */
248 #define CFA_RESOURCE_TYPE_P4_FORMAT_1_ACTION     0xfUL
249 /* Action Record Format 2 */
250 #define CFA_RESOURCE_TYPE_P4_FORMAT_2_ACTION     0x10UL
251 /* Action Record Format 3 */
252 #define CFA_RESOURCE_TYPE_P4_FORMAT_3_ACTION     0x11UL
253 /* Action Record Format 4 */
254 #define CFA_RESOURCE_TYPE_P4_FORMAT_4_ACTION     0x12UL
255 /* Action Record Format 5 */
256 #define CFA_RESOURCE_TYPE_P4_FORMAT_5_ACTION     0x13UL
257 /* Action Record Format 6 */
258 #define CFA_RESOURCE_TYPE_P4_FORMAT_6_ACTION     0x14UL
259 /* L2 Context TCAM High priority entries */
260 #define CFA_RESOURCE_TYPE_P4_L2_CTXT_TCAM_HIGH   0x15UL
261 /* L2 Context TCAM Low priority entries */
262 #define CFA_RESOURCE_TYPE_P4_L2_CTXT_TCAM_LOW    0x16UL
263 /* L2 Context REMAP high priority entries */
264 #define CFA_RESOURCE_TYPE_P4_L2_CTXT_REMAP_HIGH  0x17UL
265 /* L2 Context REMAP Low priority entries */
266 #define CFA_RESOURCE_TYPE_P4_L2_CTXT_REMAP_LOW   0x18UL
267 /* Profile Func */
268 #define CFA_RESOURCE_TYPE_P4_PROF_FUNC           0x19UL
269 /* Profile TCAM */
270 #define CFA_RESOURCE_TYPE_P4_PROF_TCAM           0x1aUL
271 /* Exact Match Profile Id */
272 #define CFA_RESOURCE_TYPE_P4_EM_PROF_ID          0x1bUL
273 /* Exact Match Record */
274 #define CFA_RESOURCE_TYPE_P4_EM_REC              0x1cUL
275 /* Wildcard Profile Id */
276 #define CFA_RESOURCE_TYPE_P4_WC_TCAM_PROF_ID     0x1dUL
277 /* Wildcard TCAM */
278 #define CFA_RESOURCE_TYPE_P4_WC_TCAM             0x1eUL
279 /* Meter profile */
280 #define CFA_RESOURCE_TYPE_P4_METER_PROF          0x1fUL
281 /* Meter */
282 #define CFA_RESOURCE_TYPE_P4_MIRROR              0x20UL
283 /* Source Property TCAM */
284 #define CFA_RESOURCE_TYPE_P4_SP_TCAM             0x21UL
285 /* Table Scope */
286 #define CFA_RESOURCE_TYPE_P4_TBL_SCOPE           0x22UL
287 #define CFA_RESOURCE_TYPE_P4_LAST               CFA_RESOURCE_TYPE_P4_TBL_SCOPE
288
289
290 #endif /* _CFA_RESOURCE_TYPES_H_ */