eal: remove sys/queue.h from public headers
[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 /* Metadata */
108 #define CFA_RESOURCE_TYPE_P58_METADATA           0x14UL
109 /* Meter drop counter */
110 #define CFA_RESOURCE_TYPE_P58_METER_DROP_CNT     0x15UL
111 #define CFA_RESOURCE_TYPE_P58_LAST              CFA_RESOURCE_TYPE_P58_METER_DROP_CNT
112
113 /* Multicast Group */
114 #define CFA_RESOURCE_TYPE_P45_MCG                 0x0UL
115 /* Encap 8 byte record */
116 #define CFA_RESOURCE_TYPE_P45_ENCAP_8B            0x1UL
117 /* Encap 16 byte record */
118 #define CFA_RESOURCE_TYPE_P45_ENCAP_16B           0x2UL
119 /* Encap 64 byte record */
120 #define CFA_RESOURCE_TYPE_P45_ENCAP_64B           0x3UL
121 /* Source Property MAC */
122 #define CFA_RESOURCE_TYPE_P45_SP_MAC              0x4UL
123 /* Source Property MAC and IPv4 */
124 #define CFA_RESOURCE_TYPE_P45_SP_MAC_IPV4         0x5UL
125 /* Source Property MAC and IPv6 */
126 #define CFA_RESOURCE_TYPE_P45_SP_MAC_IPV6         0x6UL
127 /* 64B Counters */
128 #define CFA_RESOURCE_TYPE_P45_COUNTER_64B         0x7UL
129 /* Network Address Translation Port */
130 #define CFA_RESOURCE_TYPE_P45_NAT_PORT            0x8UL
131 /* Network Address Translation IPv4 address */
132 #define CFA_RESOURCE_TYPE_P45_NAT_IPV4            0x9UL
133 /* Meter */
134 #define CFA_RESOURCE_TYPE_P45_METER               0xaUL
135 /* Flow State */
136 #define CFA_RESOURCE_TYPE_P45_FLOW_STATE          0xbUL
137 /* Full Action Records */
138 #define CFA_RESOURCE_TYPE_P45_FULL_ACTION         0xcUL
139 /* Action Record Format 0 */
140 #define CFA_RESOURCE_TYPE_P45_FORMAT_0_ACTION     0xdUL
141 /* Action Record Ext Format 0 */
142 #define CFA_RESOURCE_TYPE_P45_EXT_FORMAT_0_ACTION 0xeUL
143 /* Action Record Format 1 */
144 #define CFA_RESOURCE_TYPE_P45_FORMAT_1_ACTION     0xfUL
145 /* Action Record Format 2 */
146 #define CFA_RESOURCE_TYPE_P45_FORMAT_2_ACTION     0x10UL
147 /* Action Record Format 3 */
148 #define CFA_RESOURCE_TYPE_P45_FORMAT_3_ACTION     0x11UL
149 /* Action Record Format 4 */
150 #define CFA_RESOURCE_TYPE_P45_FORMAT_4_ACTION     0x12UL
151 /* Action Record Format 5 */
152 #define CFA_RESOURCE_TYPE_P45_FORMAT_5_ACTION     0x13UL
153 /* Action Record Format 6 */
154 #define CFA_RESOURCE_TYPE_P45_FORMAT_6_ACTION     0x14UL
155 /* L2 Context TCAM High priority entries */
156 #define CFA_RESOURCE_TYPE_P45_L2_CTXT_TCAM_HIGH   0x15UL
157 /* L2 Context TCAM Low priority entries */
158 #define CFA_RESOURCE_TYPE_P45_L2_CTXT_TCAM_LOW    0x16UL
159 /* L2 Context REMAP high priority entries */
160 #define CFA_RESOURCE_TYPE_P45_L2_CTXT_REMAP_HIGH  0x17UL
161 /* L2 Context REMAP Low priority entries */
162 #define CFA_RESOURCE_TYPE_P45_L2_CTXT_REMAP_LOW   0x18UL
163 /* Profile Func */
164 #define CFA_RESOURCE_TYPE_P45_PROF_FUNC           0x19UL
165 /* Profile TCAM */
166 #define CFA_RESOURCE_TYPE_P45_PROF_TCAM           0x1aUL
167 /* Exact Match Profile Id */
168 #define CFA_RESOURCE_TYPE_P45_EM_PROF_ID          0x1bUL
169 /* Exact Match Record */
170 #define CFA_RESOURCE_TYPE_P45_EM_REC              0x1cUL
171 /* Wildcard Profile Id */
172 #define CFA_RESOURCE_TYPE_P45_WC_TCAM_PROF_ID     0x1dUL
173 /* Wildcard TCAM */
174 #define CFA_RESOURCE_TYPE_P45_WC_TCAM             0x1eUL
175 /* Meter profile */
176 #define CFA_RESOURCE_TYPE_P45_METER_PROF          0x1fUL
177 /* Meter */
178 #define CFA_RESOURCE_TYPE_P45_MIRROR              0x20UL
179 /* Source Property TCAM */
180 #define CFA_RESOURCE_TYPE_P45_SP_TCAM             0x21UL
181 /* VEB TCAM */
182 #define CFA_RESOURCE_TYPE_P45_VEB_TCAM            0x22UL
183 /* Table Scope */
184 #define CFA_RESOURCE_TYPE_P45_TBL_SCOPE           0x23UL
185 #define CFA_RESOURCE_TYPE_P45_LAST               CFA_RESOURCE_TYPE_P45_TBL_SCOPE
186
187
188 /* Multicast Group */
189 #define CFA_RESOURCE_TYPE_P4_MCG                 0x0UL
190 /* Encap 8 byte record */
191 #define CFA_RESOURCE_TYPE_P4_ENCAP_8B            0x1UL
192 /* Encap 16 byte record */
193 #define CFA_RESOURCE_TYPE_P4_ENCAP_16B           0x2UL
194 /* Encap 64 byte record */
195 #define CFA_RESOURCE_TYPE_P4_ENCAP_64B           0x3UL
196 /* Source Property MAC */
197 #define CFA_RESOURCE_TYPE_P4_SP_MAC              0x4UL
198 /* Source Property MAC and IPv4 */
199 #define CFA_RESOURCE_TYPE_P4_SP_MAC_IPV4         0x5UL
200 /* Source Property MAC and IPv6 */
201 #define CFA_RESOURCE_TYPE_P4_SP_MAC_IPV6         0x6UL
202 /* 64B Counters */
203 #define CFA_RESOURCE_TYPE_P4_COUNTER_64B         0x7UL
204 /* Network Address Translation Port */
205 #define CFA_RESOURCE_TYPE_P4_NAT_PORT            0x8UL
206 /* Network Address Translation IPv4 address */
207 #define CFA_RESOURCE_TYPE_P4_NAT_IPV4            0x9UL
208 /* Meter */
209 #define CFA_RESOURCE_TYPE_P4_METER               0xaUL
210 /* Flow State */
211 #define CFA_RESOURCE_TYPE_P4_FLOW_STATE          0xbUL
212 /* Full Action Records */
213 #define CFA_RESOURCE_TYPE_P4_FULL_ACTION         0xcUL
214 /* Action Record Format 0 */
215 #define CFA_RESOURCE_TYPE_P4_FORMAT_0_ACTION     0xdUL
216 /* Action Record Ext Format 0 */
217 #define CFA_RESOURCE_TYPE_P4_EXT_FORMAT_0_ACTION 0xeUL
218 /* Action Record Format 1 */
219 #define CFA_RESOURCE_TYPE_P4_FORMAT_1_ACTION     0xfUL
220 /* Action Record Format 2 */
221 #define CFA_RESOURCE_TYPE_P4_FORMAT_2_ACTION     0x10UL
222 /* Action Record Format 3 */
223 #define CFA_RESOURCE_TYPE_P4_FORMAT_3_ACTION     0x11UL
224 /* Action Record Format 4 */
225 #define CFA_RESOURCE_TYPE_P4_FORMAT_4_ACTION     0x12UL
226 /* Action Record Format 5 */
227 #define CFA_RESOURCE_TYPE_P4_FORMAT_5_ACTION     0x13UL
228 /* Action Record Format 6 */
229 #define CFA_RESOURCE_TYPE_P4_FORMAT_6_ACTION     0x14UL
230 /* L2 Context TCAM High priority entries */
231 #define CFA_RESOURCE_TYPE_P4_L2_CTXT_TCAM_HIGH   0x15UL
232 /* L2 Context TCAM Low priority entries */
233 #define CFA_RESOURCE_TYPE_P4_L2_CTXT_TCAM_LOW    0x16UL
234 /* L2 Context REMAP high priority entries */
235 #define CFA_RESOURCE_TYPE_P4_L2_CTXT_REMAP_HIGH  0x17UL
236 /* L2 Context REMAP Low priority entries */
237 #define CFA_RESOURCE_TYPE_P4_L2_CTXT_REMAP_LOW   0x18UL
238 /* Profile Func */
239 #define CFA_RESOURCE_TYPE_P4_PROF_FUNC           0x19UL
240 /* Profile TCAM */
241 #define CFA_RESOURCE_TYPE_P4_PROF_TCAM           0x1aUL
242 /* Exact Match Profile Id */
243 #define CFA_RESOURCE_TYPE_P4_EM_PROF_ID          0x1bUL
244 /* Exact Match Record */
245 #define CFA_RESOURCE_TYPE_P4_EM_REC              0x1cUL
246 /* Wildcard Profile Id */
247 #define CFA_RESOURCE_TYPE_P4_WC_TCAM_PROF_ID     0x1dUL
248 /* Wildcard TCAM */
249 #define CFA_RESOURCE_TYPE_P4_WC_TCAM             0x1eUL
250 /* Meter profile */
251 #define CFA_RESOURCE_TYPE_P4_METER_PROF          0x1fUL
252 /* Meter */
253 #define CFA_RESOURCE_TYPE_P4_MIRROR              0x20UL
254 /* Source Property TCAM */
255 #define CFA_RESOURCE_TYPE_P4_SP_TCAM             0x21UL
256 /* Table Scope */
257 #define CFA_RESOURCE_TYPE_P4_TBL_SCOPE           0x22UL
258 #define CFA_RESOURCE_TYPE_P4_LAST               CFA_RESOURCE_TYPE_P4_TBL_SCOPE
259
260 #endif /* _CFA_RESOURCE_TYPES_H_ */