net/bnxt: update CFA resource types
[dpdk.git] / drivers / net / bnxt / tf_core / cfa_resource_types.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2019-2021 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
67 /* Meter */
68 #define CFA_RESOURCE_TYPE_P58_METER              0x0UL
69 /* SRAM_Bank_0 */
70 #define CFA_RESOURCE_TYPE_P58_SRAM_BANK_0        0x1UL
71 /* SRAM_Bank_1 */
72 #define CFA_RESOURCE_TYPE_P58_SRAM_BANK_1        0x2UL
73 /* SRAM_Bank_2 */
74 #define CFA_RESOURCE_TYPE_P58_SRAM_BANK_2        0x3UL
75 /* SRAM_Bank_3 */
76 #define CFA_RESOURCE_TYPE_P58_SRAM_BANK_3        0x4UL
77 /* L2 Context TCAM High priority entries */
78 #define CFA_RESOURCE_TYPE_P58_L2_CTXT_TCAM_HIGH  0x5UL
79 /* L2 Context TCAM Low priority entries */
80 #define CFA_RESOURCE_TYPE_P58_L2_CTXT_TCAM_LOW   0x6UL
81 /* L2 Context REMAP high priority entries */
82 #define CFA_RESOURCE_TYPE_P58_L2_CTXT_REMAP_HIGH 0x7UL
83 /* L2 Context REMAP Low priority entries */
84 #define CFA_RESOURCE_TYPE_P58_L2_CTXT_REMAP_LOW  0x8UL
85 /* Profile Func */
86 #define CFA_RESOURCE_TYPE_P58_PROF_FUNC          0x9UL
87 /* Profile TCAM */
88 #define CFA_RESOURCE_TYPE_P58_PROF_TCAM          0xaUL
89 /* Exact Match Profile Id */
90 #define CFA_RESOURCE_TYPE_P58_EM_PROF_ID         0xbUL
91 /* Wildcard Profile Id */
92 #define CFA_RESOURCE_TYPE_P58_WC_TCAM_PROF_ID    0xcUL
93 /* Exact Match Record */
94 #define CFA_RESOURCE_TYPE_P58_EM_REC             0xdUL
95 /* Wildcard TCAM */
96 #define CFA_RESOURCE_TYPE_P58_WC_TCAM            0xeUL
97 /* Meter profile */
98 #define CFA_RESOURCE_TYPE_P58_METER_PROF         0xfUL
99 /* Meter */
100 #define CFA_RESOURCE_TYPE_P58_MIRROR             0x10UL
101 /* Exact Match Flexible Key Builder */
102 #define CFA_RESOURCE_TYPE_P58_EM_FKB             0x11UL
103 /* Wildcard Flexible Key Builder */
104 #define CFA_RESOURCE_TYPE_P58_WC_FKB             0x12UL
105 /* VEB TCAM */
106 #define CFA_RESOURCE_TYPE_P58_VEB_TCAM           0x13UL
107 /* Meter drop counter */
108 #define CFA_RESOURCE_TYPE_P58_METER_DROP_CNT     0x15UL
109 #define CFA_RESOURCE_TYPE_P58_LAST               CFA_RESOURCE_TYPE_P58_METER_DROP_CNT
110
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
187 /* Multicast Group */
188 #define CFA_RESOURCE_TYPE_P4_MCG                 0x0UL
189 /* Encap 8 byte record */
190 #define CFA_RESOURCE_TYPE_P4_ENCAP_8B            0x1UL
191 /* Encap 16 byte record */
192 #define CFA_RESOURCE_TYPE_P4_ENCAP_16B           0x2UL
193 /* Encap 64 byte record */
194 #define CFA_RESOURCE_TYPE_P4_ENCAP_64B           0x3UL
195 /* Source Property MAC */
196 #define CFA_RESOURCE_TYPE_P4_SP_MAC              0x4UL
197 /* Source Property MAC and IPv4 */
198 #define CFA_RESOURCE_TYPE_P4_SP_MAC_IPV4         0x5UL
199 /* Source Property MAC and IPv6 */
200 #define CFA_RESOURCE_TYPE_P4_SP_MAC_IPV6         0x6UL
201 /* 64B Counters */
202 #define CFA_RESOURCE_TYPE_P4_COUNTER_64B         0x7UL
203 /* Network Address Translation Port */
204 #define CFA_RESOURCE_TYPE_P4_NAT_PORT            0x8UL
205 /* Network Address Translation IPv4 address */
206 #define CFA_RESOURCE_TYPE_P4_NAT_IPV4            0x9UL
207 /* Meter */
208 #define CFA_RESOURCE_TYPE_P4_METER               0xaUL
209 /* Flow State */
210 #define CFA_RESOURCE_TYPE_P4_FLOW_STATE          0xbUL
211 /* Full Action Records */
212 #define CFA_RESOURCE_TYPE_P4_FULL_ACTION         0xcUL
213 /* Action Record Format 0 */
214 #define CFA_RESOURCE_TYPE_P4_FORMAT_0_ACTION     0xdUL
215 /* Action Record Ext Format 0 */
216 #define CFA_RESOURCE_TYPE_P4_EXT_FORMAT_0_ACTION 0xeUL
217 /* Action Record Format 1 */
218 #define CFA_RESOURCE_TYPE_P4_FORMAT_1_ACTION     0xfUL
219 /* Action Record Format 2 */
220 #define CFA_RESOURCE_TYPE_P4_FORMAT_2_ACTION     0x10UL
221 /* Action Record Format 3 */
222 #define CFA_RESOURCE_TYPE_P4_FORMAT_3_ACTION     0x11UL
223 /* Action Record Format 4 */
224 #define CFA_RESOURCE_TYPE_P4_FORMAT_4_ACTION     0x12UL
225 /* Action Record Format 5 */
226 #define CFA_RESOURCE_TYPE_P4_FORMAT_5_ACTION     0x13UL
227 /* Action Record Format 6 */
228 #define CFA_RESOURCE_TYPE_P4_FORMAT_6_ACTION     0x14UL
229 /* L2 Context TCAM High priority entries */
230 #define CFA_RESOURCE_TYPE_P4_L2_CTXT_TCAM_HIGH   0x15UL
231 /* L2 Context TCAM Low priority entries */
232 #define CFA_RESOURCE_TYPE_P4_L2_CTXT_TCAM_LOW    0x16UL
233 /* L2 Context REMAP high priority entries */
234 #define CFA_RESOURCE_TYPE_P4_L2_CTXT_REMAP_HIGH  0x17UL
235 /* L2 Context REMAP Low priority entries */
236 #define CFA_RESOURCE_TYPE_P4_L2_CTXT_REMAP_LOW   0x18UL
237 /* Profile Func */
238 #define CFA_RESOURCE_TYPE_P4_PROF_FUNC           0x19UL
239 /* Profile TCAM */
240 #define CFA_RESOURCE_TYPE_P4_PROF_TCAM           0x1aUL
241 /* Exact Match Profile Id */
242 #define CFA_RESOURCE_TYPE_P4_EM_PROF_ID          0x1bUL
243 /* Exact Match Record */
244 #define CFA_RESOURCE_TYPE_P4_EM_REC              0x1cUL
245 /* Wildcard Profile Id */
246 #define CFA_RESOURCE_TYPE_P4_WC_TCAM_PROF_ID     0x1dUL
247 /* Wildcard TCAM */
248 #define CFA_RESOURCE_TYPE_P4_WC_TCAM             0x1eUL
249 /* Meter profile */
250 #define CFA_RESOURCE_TYPE_P4_METER_PROF          0x1fUL
251 /* Meter */
252 #define CFA_RESOURCE_TYPE_P4_MIRROR              0x20UL
253 /* Source Property TCAM */
254 #define CFA_RESOURCE_TYPE_P4_SP_TCAM             0x21UL
255 /* Table Scope */
256 #define CFA_RESOURCE_TYPE_P4_TBL_SCOPE           0x22UL
257 #define CFA_RESOURCE_TYPE_P4_LAST               CFA_RESOURCE_TYPE_P4_TBL_SCOPE
258
259 #endif /* _CFA_RESOURCE_TYPES_H_ */