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