xref: /dpdk/drivers/net/bnxt/tf_core/cfa_resource_types.h (revision 97435d7906d7706e39e5c3dfefa5e09d7de7f733)
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2019-2023 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 Aggregation */
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 /* Meter */
67 #define CFA_RESOURCE_TYPE_P58_METER              0x0UL
68 /* SRAM_Bank_0 */
69 #define CFA_RESOURCE_TYPE_P58_SRAM_BANK_0        0x1UL
70 /* SRAM_Bank_1 */
71 #define CFA_RESOURCE_TYPE_P58_SRAM_BANK_1        0x2UL
72 /* SRAM_Bank_2 */
73 #define CFA_RESOURCE_TYPE_P58_SRAM_BANK_2        0x3UL
74 /* SRAM_Bank_3 */
75 #define CFA_RESOURCE_TYPE_P58_SRAM_BANK_3        0x4UL
76 /* L2 Context TCAM High priority entries */
77 #define CFA_RESOURCE_TYPE_P58_L2_CTXT_TCAM_HIGH  0x5UL
78 /* L2 Context TCAM Low priority entries */
79 #define CFA_RESOURCE_TYPE_P58_L2_CTXT_TCAM_LOW   0x6UL
80 /* L2 Context REMAP high priority entries */
81 #define CFA_RESOURCE_TYPE_P58_L2_CTXT_REMAP_HIGH 0x7UL
82 /* L2 Context REMAP Low priority entries */
83 #define CFA_RESOURCE_TYPE_P58_L2_CTXT_REMAP_LOW  0x8UL
84 /* Profile Func */
85 #define CFA_RESOURCE_TYPE_P58_PROF_FUNC          0x9UL
86 /* Profile TCAM */
87 #define CFA_RESOURCE_TYPE_P58_PROF_TCAM          0xaUL
88 /* Exact Match Profile Id */
89 #define CFA_RESOURCE_TYPE_P58_EM_PROF_ID         0xbUL
90 /* Wildcard Profile Id */
91 #define CFA_RESOURCE_TYPE_P58_WC_TCAM_PROF_ID    0xcUL
92 /* Exact Match Record */
93 #define CFA_RESOURCE_TYPE_P58_EM_REC             0xdUL
94 /* Wildcard TCAM */
95 #define CFA_RESOURCE_TYPE_P58_WC_TCAM            0xeUL
96 /* Meter profile */
97 #define CFA_RESOURCE_TYPE_P58_METER_PROF         0xfUL
98 /* Meter */
99 #define CFA_RESOURCE_TYPE_P58_MIRROR             0x10UL
100 /* Exact Match Flexible Key Builder */
101 #define CFA_RESOURCE_TYPE_P58_EM_FKB             0x11UL
102 /* Wildcard Flexible Key Builder */
103 #define CFA_RESOURCE_TYPE_P58_WC_FKB             0x12UL
104 /* VEB TCAM */
105 #define CFA_RESOURCE_TYPE_P58_VEB_TCAM           0x13UL
106 /* Metadata */
107 #define CFA_RESOURCE_TYPE_P58_METADATA           0x14UL
108 /* Meter drop counter */
109 #define CFA_RESOURCE_TYPE_P58_METER_DROP_CNT     0x15UL
110 #define CFA_RESOURCE_TYPE_P58_LAST              CFA_RESOURCE_TYPE_P58_METER_DROP_CNT
111 
112 /* Multicast Group */
113 #define CFA_RESOURCE_TYPE_P45_MCG                 0x0UL
114 /* Encap 8 byte record */
115 #define CFA_RESOURCE_TYPE_P45_ENCAP_8B            0x1UL
116 /* Encap 16 byte record */
117 #define CFA_RESOURCE_TYPE_P45_ENCAP_16B           0x2UL
118 /* Encap 64 byte record */
119 #define CFA_RESOURCE_TYPE_P45_ENCAP_64B           0x3UL
120 /* Source Property MAC */
121 #define CFA_RESOURCE_TYPE_P45_SP_MAC              0x4UL
122 /* Source Property MAC and IPv4 */
123 #define CFA_RESOURCE_TYPE_P45_SP_MAC_IPV4         0x5UL
124 /* Source Property MAC and IPv6 */
125 #define CFA_RESOURCE_TYPE_P45_SP_MAC_IPV6         0x6UL
126 /* 64B Counters */
127 #define CFA_RESOURCE_TYPE_P45_COUNTER_64B         0x7UL
128 /* Network Address Translation Port */
129 #define CFA_RESOURCE_TYPE_P45_NAT_PORT            0x8UL
130 /* Network Address Translation IPv4 address */
131 #define CFA_RESOURCE_TYPE_P45_NAT_IPV4            0x9UL
132 /* Meter */
133 #define CFA_RESOURCE_TYPE_P45_METER               0xaUL
134 /* Flow State */
135 #define CFA_RESOURCE_TYPE_P45_FLOW_STATE          0xbUL
136 /* Full Action Records */
137 #define CFA_RESOURCE_TYPE_P45_FULL_ACTION         0xcUL
138 /* Action Record Format 0 */
139 #define CFA_RESOURCE_TYPE_P45_FORMAT_0_ACTION     0xdUL
140 /* Action Record Ext Format 0 */
141 #define CFA_RESOURCE_TYPE_P45_EXT_FORMAT_0_ACTION 0xeUL
142 /* Action Record Format 1 */
143 #define CFA_RESOURCE_TYPE_P45_FORMAT_1_ACTION     0xfUL
144 /* Action Record Format 2 */
145 #define CFA_RESOURCE_TYPE_P45_FORMAT_2_ACTION     0x10UL
146 /* Action Record Format 3 */
147 #define CFA_RESOURCE_TYPE_P45_FORMAT_3_ACTION     0x11UL
148 /* Action Record Format 4 */
149 #define CFA_RESOURCE_TYPE_P45_FORMAT_4_ACTION     0x12UL
150 /* Action Record Format 5 */
151 #define CFA_RESOURCE_TYPE_P45_FORMAT_5_ACTION     0x13UL
152 /* Action Record Format 6 */
153 #define CFA_RESOURCE_TYPE_P45_FORMAT_6_ACTION     0x14UL
154 /* L2 Context TCAM High priority entries */
155 #define CFA_RESOURCE_TYPE_P45_L2_CTXT_TCAM_HIGH   0x15UL
156 /* L2 Context TCAM Low priority entries */
157 #define CFA_RESOURCE_TYPE_P45_L2_CTXT_TCAM_LOW    0x16UL
158 /* L2 Context REMAP high priority entries */
159 #define CFA_RESOURCE_TYPE_P45_L2_CTXT_REMAP_HIGH  0x17UL
160 /* L2 Context REMAP Low priority entries */
161 #define CFA_RESOURCE_TYPE_P45_L2_CTXT_REMAP_LOW   0x18UL
162 /* Profile Func */
163 #define CFA_RESOURCE_TYPE_P45_PROF_FUNC           0x19UL
164 /* Profile TCAM */
165 #define CFA_RESOURCE_TYPE_P45_PROF_TCAM           0x1aUL
166 /* Exact Match Profile Id */
167 #define CFA_RESOURCE_TYPE_P45_EM_PROF_ID          0x1bUL
168 /* Exact Match Record */
169 #define CFA_RESOURCE_TYPE_P45_EM_REC              0x1cUL
170 /* Wildcard Profile Id */
171 #define CFA_RESOURCE_TYPE_P45_WC_TCAM_PROF_ID     0x1dUL
172 /* Wildcard TCAM */
173 #define CFA_RESOURCE_TYPE_P45_WC_TCAM             0x1eUL
174 /* Meter profile */
175 #define CFA_RESOURCE_TYPE_P45_METER_PROF          0x1fUL
176 /* Meter */
177 #define CFA_RESOURCE_TYPE_P45_MIRROR              0x20UL
178 /* Source Property TCAM */
179 #define CFA_RESOURCE_TYPE_P45_SP_TCAM             0x21UL
180 /* VEB TCAM */
181 #define CFA_RESOURCE_TYPE_P45_VEB_TCAM            0x22UL
182 /* Table Scope */
183 #define CFA_RESOURCE_TYPE_P45_TBL_SCOPE           0x23UL
184 #define CFA_RESOURCE_TYPE_P45_LAST               CFA_RESOURCE_TYPE_P45_TBL_SCOPE
185 
186 /* Multicast Group */
187 #define CFA_RESOURCE_TYPE_P4_MCG                 0x0UL
188 /* Encap 8 byte record */
189 #define CFA_RESOURCE_TYPE_P4_ENCAP_8B            0x1UL
190 /* Encap 16 byte record */
191 #define CFA_RESOURCE_TYPE_P4_ENCAP_16B           0x2UL
192 /* Encap 64 byte record */
193 #define CFA_RESOURCE_TYPE_P4_ENCAP_64B           0x3UL
194 /* Source Property MAC */
195 #define CFA_RESOURCE_TYPE_P4_SP_MAC              0x4UL
196 /* Source Property MAC and IPv4 */
197 #define CFA_RESOURCE_TYPE_P4_SP_MAC_IPV4         0x5UL
198 /* Source Property MAC and IPv6 */
199 #define CFA_RESOURCE_TYPE_P4_SP_MAC_IPV6         0x6UL
200 /* 64B Counters */
201 #define CFA_RESOURCE_TYPE_P4_COUNTER_64B         0x7UL
202 /* Network Address Translation Port */
203 #define CFA_RESOURCE_TYPE_P4_NAT_PORT            0x8UL
204 /* Network Address Translation IPv4 address */
205 #define CFA_RESOURCE_TYPE_P4_NAT_IPV4            0x9UL
206 /* Meter */
207 #define CFA_RESOURCE_TYPE_P4_METER               0xaUL
208 /* Flow State */
209 #define CFA_RESOURCE_TYPE_P4_FLOW_STATE          0xbUL
210 /* Full Action Records */
211 #define CFA_RESOURCE_TYPE_P4_FULL_ACTION         0xcUL
212 /* Action Record Format 0 */
213 #define CFA_RESOURCE_TYPE_P4_FORMAT_0_ACTION     0xdUL
214 /* Action Record Ext Format 0 */
215 #define CFA_RESOURCE_TYPE_P4_EXT_FORMAT_0_ACTION 0xeUL
216 /* Action Record Format 1 */
217 #define CFA_RESOURCE_TYPE_P4_FORMAT_1_ACTION     0xfUL
218 /* Action Record Format 2 */
219 #define CFA_RESOURCE_TYPE_P4_FORMAT_2_ACTION     0x10UL
220 /* Action Record Format 3 */
221 #define CFA_RESOURCE_TYPE_P4_FORMAT_3_ACTION     0x11UL
222 /* Action Record Format 4 */
223 #define CFA_RESOURCE_TYPE_P4_FORMAT_4_ACTION     0x12UL
224 /* Action Record Format 5 */
225 #define CFA_RESOURCE_TYPE_P4_FORMAT_5_ACTION     0x13UL
226 /* Action Record Format 6 */
227 #define CFA_RESOURCE_TYPE_P4_FORMAT_6_ACTION     0x14UL
228 /* L2 Context TCAM High priority entries */
229 #define CFA_RESOURCE_TYPE_P4_L2_CTXT_TCAM_HIGH   0x15UL
230 /* L2 Context TCAM Low priority entries */
231 #define CFA_RESOURCE_TYPE_P4_L2_CTXT_TCAM_LOW    0x16UL
232 /* L2 Context REMAP high priority entries */
233 #define CFA_RESOURCE_TYPE_P4_L2_CTXT_REMAP_HIGH  0x17UL
234 /* L2 Context REMAP Low priority entries */
235 #define CFA_RESOURCE_TYPE_P4_L2_CTXT_REMAP_LOW   0x18UL
236 /* Profile Func */
237 #define CFA_RESOURCE_TYPE_P4_PROF_FUNC           0x19UL
238 /* Profile TCAM */
239 #define CFA_RESOURCE_TYPE_P4_PROF_TCAM           0x1aUL
240 /* Exact Match Profile Id */
241 #define CFA_RESOURCE_TYPE_P4_EM_PROF_ID          0x1bUL
242 /* Exact Match Record */
243 #define CFA_RESOURCE_TYPE_P4_EM_REC              0x1cUL
244 /* Wildcard Profile Id */
245 #define CFA_RESOURCE_TYPE_P4_WC_TCAM_PROF_ID     0x1dUL
246 /* Wildcard TCAM */
247 #define CFA_RESOURCE_TYPE_P4_WC_TCAM             0x1eUL
248 /* Meter profile */
249 #define CFA_RESOURCE_TYPE_P4_METER_PROF          0x1fUL
250 /* Meter */
251 #define CFA_RESOURCE_TYPE_P4_MIRROR              0x20UL
252 /* Source Property TCAM */
253 #define CFA_RESOURCE_TYPE_P4_SP_TCAM             0x21UL
254 /* Table Scope */
255 #define CFA_RESOURCE_TYPE_P4_TBL_SCOPE           0x22UL
256 #define CFA_RESOURCE_TYPE_P4_LAST               CFA_RESOURCE_TYPE_P4_TBL_SCOPE
257 #endif /* _CFA_RESOURCE_TYPES_H_ */
258