field.c (176555B)
1 /* 2 * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file. 3 * 4 * Copyright 2007-2019 Broadcom Inc. All rights reserved. 5 * 6 * File: field.c 7 * Purpose: BCM56624 Field Processor installation functions. 8 */ 9 10 #include <soc/defs.h> 11 #if defined(BCM_TRIUMPH2_SUPPORT) && defined(BCM_FIELD_SUPPORT) 12 13 #include <soc/mem.h> 14 #include <soc/drv.h> 15 16 #include <bcm/error.h> 17 #include <bcm/l3.h> 18 #include <bcm/field.h> 19 #include <bcm/tunnel.h> 20 21 #include <bcm_int/esw_dispatch.h> 22 23 #include <bcm_int/esw/field.h> 24 #include <bcm_int/esw/mirror.h> 25 #include <bcm_int/esw/l3.h> 26 #include <bcm_int/esw/firebolt.h> 27 #include <bcm_int/esw/trx.h> 28 #include <bcm_int/esw/triumph.h> 29 #include <bcm_int/esw/triumph2.h> 30 31 extern int _field_trx_redirect_profile_get(int unit, soc_profile_mem_t 32 **redirect_profile); 33 34 /* local/static function prototypes */ 35 STATIC void _field_tr2_functions_init(_field_funct_t *functions) ; 36 37 /* 38 * Function: 39 * _field_tr2_ingress_qualifiers_init 40 * Purpose: 41 * Initialize device stage ingress qaualifiers 42 * select codes & offsets 43 * Parameters: 44 * unit - (IN) BCM device number. 45 * stage_fc - (IN) Field Processor stage control structure. 46 * 47 * Returns: 48 * BCM_E_NONE 49 */ 50 STATIC int 51 _field_tr2_ingress_qualifiers_init(int unit, _field_stage_t *stage_fc) 52 { 53 int ipbm_pairing_overlay_offset = 0; 54 _FP_QUAL_DECL; 55 56 /* Input parameters check. */ 57 if (NULL == stage_fc) { 58 return (BCM_E_PARAM); 59 } 60 61 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyStage, 62 _bcmFieldSliceSelDisable, 0, 0, 0); 63 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyStageIngress, 64 _bcmFieldSliceSelDisable, 0, 0, 0); 65 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIp4, 66 _bcmFieldSliceSelDisable, 0, 0, 0); 67 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIp6, 68 _bcmFieldSliceSelDisable, 0, 0, 0); 69 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInPort, 70 _bcmFieldSliceSelDisable, 0, 0, 0); 71 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInPorts, 72 _bcmFieldSliceSelDisable, 0, 0, 0); 73 74 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyHiGig, 75 _bcmFieldSliceSelDisable, 0, 7, 1); 76 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyForwardingType, 77 _bcmFieldSliceSelDisable, 0, 8, 3); 78 _FP_QUAL_ADD(unit, stage_fc, _bcmFieldQualifySvpValid, 79 _bcmFieldSliceSelDisable, 0, 11, 1); 80 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpType, 81 _bcmFieldSliceSelDisable, 0, 12, 4); 82 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4Ports, 83 _bcmFieldSliceSelDisable, 0, 16, 1); 84 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3Routable, 85 _bcmFieldSliceSelDisable, 0, 17, 1); 86 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyLoopback, 87 _bcmFieldSliceSelDisable, 0, 88 _bcmFieldSliceLoopbackTypeSelect, 0, 21, 1); 89 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyLoopbackType, 90 _bcmFieldSliceSelDisable, 0, 91 _bcmFieldSliceLoopbackTypeSelect, 0, 18, 4); 92 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTunnelType, 93 _bcmFieldSliceSelDisable, 0, 94 _bcmFieldSliceLoopbackTypeSelect, 1, 18, 4); 95 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyMplsTerminated, 96 _bcmFieldSliceSelDisable, 0, 97 _bcmFieldSliceLoopbackTypeSelect, 2, 18, 4); 98 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDrop, 99 _bcmFieldSliceSelDisable, 0, 22, 1); 100 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMirrorCopy, 101 _bcmFieldSliceSelDisable, 0, 23, 1); 102 103 /* FPF3 primary slice single wide. */ 104 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL2, 105 _bcmFieldSliceSelFpf3, 0, 106 _bcmFieldSliceDstClassSelect, 0, 24, 6); 107 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL3, 108 _bcmFieldSliceSelFpf3, 0, 109 _bcmFieldSliceDstClassSelect, 1, 24, 6); 110 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField, 111 _bcmFieldSliceSelFpf3, 0, 112 _bcmFieldSliceDstClassSelect, 2, 24, 6); 113 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField, 114 _bcmFieldSliceSelFpf3, 0, 115 _bcmFieldSliceSrcClassSelect, 2, 30, 6); 116 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL2, 117 _bcmFieldSliceSelFpf3, 0, 118 _bcmFieldSliceSrcClassSelect, 0, 30, 6); 119 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL3, 120 _bcmFieldSliceSelFpf3, 0, 121 _bcmFieldSliceSrcClassSelect, 1, 30, 6); 122 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField, 123 _bcmFieldSliceSelFpf3, 0, 124 _bcmFieldSliceSrcClassSelect, 3, 30, 6); 125 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField, 126 _bcmFieldSliceSelFpf3, 0, 127 _bcmFieldSliceDstClassSelect, 3, 24, 6); 128 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVrf, 129 _bcmFieldSliceSelFpf3, 0, 130 _bcmFieldSliceFwdFieldSelect, 131 _bcmFieldFwdFieldVrf, 36, 12); 132 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVpn, 133 _bcmFieldSliceSelFpf3, 0, 134 _bcmFieldSliceFwdFieldSelect, 135 _bcmFieldFwdFieldVpn, 36, 12); 136 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 137 bcmFieldQualifyForwardingVlanId, 138 _bcmFieldSliceSelFpf3, 0, 139 _bcmFieldSliceFwdFieldSelect, 140 _bcmFieldFwdFieldVlan, 36, 12); 141 142 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMplsGport, 143 _bcmFieldSliceSelFpf3, 0, 144 _bcmFieldSliceIngressEntitySelect, 145 _bcmFieldFwdEntityMplsGport, 48, 13); 146 147 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMimGport, 148 _bcmFieldSliceSelFpf3, 0, 149 _bcmFieldSliceIngressEntitySelect, 150 _bcmFieldFwdEntityMimGport, 48, 13); 151 152 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVlanGport, 153 _bcmFieldSliceSelFpf3, 0, 154 _bcmFieldSliceIngressEntitySelect, 155 _bcmFieldFwdEntityVlanGport, 48, 13); 156 157 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyL3Ingress, 158 _bcmFieldSliceSelFpf3, 0, 159 _bcmFieldSliceIngressEntitySelect, 160 _bcmFieldFwdEntityL3Egress, 48, 13); 161 162 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL2, 163 _bcmFieldSliceSelFpf3, 1, 164 _bcmFieldSliceDstClassSelect, 0, 24, 6); 165 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL3, 166 _bcmFieldSliceSelFpf3, 1, 167 _bcmFieldSliceDstClassSelect, 1, 24, 6); 168 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField, 169 _bcmFieldSliceSelFpf3, 1, 170 _bcmFieldSliceDstClassSelect, 2, 24, 6); 171 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField, 172 _bcmFieldSliceSelFpf3, 1, 173 _bcmFieldSliceSrcClassSelect, 2, 30, 6); 174 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL2, 175 _bcmFieldSliceSelFpf3, 1, 176 _bcmFieldSliceSrcClassSelect, 0, 30, 6); 177 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL3, 178 _bcmFieldSliceSelFpf3, 1, 179 _bcmFieldSliceSrcClassSelect, 1, 30, 6); 180 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField, 181 _bcmFieldSliceSelFpf3, 1, 182 _bcmFieldSliceSrcClassSelect, 3, 30, 6); 183 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField, 184 _bcmFieldSliceSelFpf3, 1, 185 _bcmFieldSliceDstClassSelect, 3, 24, 6); 186 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVrf, 187 _bcmFieldSliceSelFpf3, 1, 188 _bcmFieldSliceFwdFieldSelect, 189 _bcmFieldFwdFieldVrf, 36, 12); 190 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVpn, 191 _bcmFieldSliceSelFpf3, 1, 192 _bcmFieldSliceFwdFieldSelect, 193 _bcmFieldFwdFieldVpn, 36, 12); 194 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 195 bcmFieldQualifyForwardingVlanId, 196 _bcmFieldSliceSelFpf3, 1, 197 _bcmFieldSliceFwdFieldSelect, 198 _bcmFieldFwdFieldVlan, 36, 12); 199 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 200 _bcmFieldSliceSelFpf3, 1, 48, 12); 201 202 203 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstPort, 204 _bcmFieldSliceSelFpf3, 2, 205 _bcmFieldSliceDstFwdEntitySelect, 206 _bcmFieldFwdEntityGlp, 24, 17); 207 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstGport, 208 _bcmFieldSliceSelFpf3, 2, 209 _bcmFieldSliceDstFwdEntitySelect, 210 _bcmFieldFwdEntityCommonGport, 24, 17); 211 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstTrunk, 212 _bcmFieldSliceSelFpf3, 2, 213 _bcmFieldSliceDstFwdEntitySelect, 214 _bcmFieldFwdEntityGlp, 24, 17); 215 216 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMplsGport, 217 _bcmFieldSliceSelFpf3, 2, 218 _bcmFieldSliceDstFwdEntitySelect, 219 _bcmFieldFwdEntityMplsGport, 24, 17); 220 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMimGport, 221 _bcmFieldSliceSelFpf3, 2, 222 _bcmFieldSliceDstFwdEntitySelect, 223 _bcmFieldFwdEntityMimGport, 24, 17); 224 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstWlanGport, 225 _bcmFieldSliceSelFpf3, 2, 226 _bcmFieldSliceDstFwdEntitySelect, 227 _bcmFieldFwdEntityWlanGport, 24, 17); 228 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstVlanGport, 229 _bcmFieldSliceSelFpf3, 2, 230 _bcmFieldSliceDstFwdEntitySelect, 231 _bcmFieldFwdEntityVlanGport, 24, 17); 232 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstL3Egress, 233 _bcmFieldSliceSelFpf3, 2, 234 _bcmFieldSliceDstFwdEntitySelect, 235 _bcmFieldFwdEntityL3Egress, 24, 17); 236 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstL3EgressNextHops, 237 _bcmFieldSliceSelFpf3, 2, 238 _bcmFieldSliceDstFwdEntitySelect, 239 _bcmFieldFwdEntityL3Egress, 24, 17); 240 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMulticastGroup, 241 _bcmFieldSliceSelFpf3, 2, 242 _bcmFieldSliceDstFwdEntitySelect, 243 _bcmFieldFwdEntityMulticastGroup, 24, 17); 244 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcPort, 245 _bcmFieldSliceSelFpf3, 2, 246 _bcmFieldSliceSrcEntitySelect, 247 _bcmFieldFwdEntityGlp, 41, 15); 248 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcTrunk, 249 _bcmFieldSliceSelFpf3, 2, 250 _bcmFieldSliceSrcEntitySelect, 251 _bcmFieldFwdEntityGlp, 41, 15); 252 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMplsGport, 253 _bcmFieldSliceSelFpf3, 2, 254 _bcmFieldSliceSrcEntitySelect, 255 _bcmFieldFwdEntityMplsGport, 41, 15); 256 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVlanGport, 257 _bcmFieldSliceSelFpf3, 2, 258 _bcmFieldSliceSrcEntitySelect, 259 _bcmFieldFwdEntityVlanGport, 41, 15); 260 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMimGport, 261 _bcmFieldSliceSelFpf3, 2, 262 _bcmFieldSliceSrcEntitySelect, 263 _bcmFieldFwdEntityMimGport, 41, 15); 264 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcWlanGport, 265 _bcmFieldSliceSelFpf3, 2, 266 _bcmFieldSliceSrcEntitySelect, 267 _bcmFieldFwdEntityWlanGport, 41, 15); 268 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcModPortGport, 269 _bcmFieldSliceSelFpf3, 2, 270 _bcmFieldSliceSrcEntitySelect, 271 _bcmFieldFwdEntityModPortGport, 41, 15); 272 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcModuleGport, 273 _bcmFieldSliceSelFpf3, 2, 274 _bcmFieldSliceSrcEntitySelect, 275 _bcmFieldFwdEntityModPortGport, 47, 8); 276 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTrunkMemberSourceModuleId, 277 _bcmFieldSliceSelFpf3, 2, 278 _bcmFieldSliceSrcEntitySelect, 279 _bcmFieldFwdEntityModPortGport, 48, 8); 280 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcGport, 281 _bcmFieldSliceSelFpf3, 2, 282 _bcmFieldSliceSrcEntitySelect, 283 _bcmFieldFwdEntityCommonGport, 41, 15); 284 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMHOpcode, 285 _bcmFieldSliceSelFpf3, 2, 56, 3); 286 287 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan, 288 _bcmFieldSliceSelFpf3, 3, 24, 16); 289 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 290 _bcmFieldSliceSelFpf3, 3, 24, 12); 291 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi, 292 _bcmFieldSliceSelFpf3, 3, 36, 1); 293 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri, 294 _bcmFieldSliceSelFpf3, 3, 37, 3); 295 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVlanFormat, 296 _bcmFieldSliceSelFpf3, 3, 40, 2); 297 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2Format, 298 _bcmFieldSliceSelFpf3, 3, 42, 2); 299 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTranslatedVlanFormat, 300 _bcmFieldSliceSelFpf3, 3, 44, 2); 301 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMHOpcode, 302 _bcmFieldSliceSelFpf3, 3, 46, 3); 303 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyPacketRes, 304 _bcmFieldSliceSelFpf3, 3, 49, 5); 305 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpInfo, 306 _bcmFieldSliceSelFpf3, 3, 54, 3); 307 308 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan, 309 _bcmFieldSliceSelFpf3, 4, 24, 16); 310 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 311 _bcmFieldSliceSelFpf3, 4, 24, 12); 312 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi, 313 _bcmFieldSliceSelFpf3, 4, 36, 1); 314 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri, 315 _bcmFieldSliceSelFpf3, 4, 37, 3); 316 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlan, 317 _bcmFieldSliceSelFpf3, 4, 40, 16); 318 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanId, 319 _bcmFieldSliceSelFpf3, 4, 40, 12); 320 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanCfi, 321 _bcmFieldSliceSelFpf3, 4, 52, 1); 322 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanPri, 323 _bcmFieldSliceSelFpf3, 4, 53, 3); 324 325 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan, 326 _bcmFieldSliceSelFpf3, 5, 24, 16); 327 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 328 _bcmFieldSliceSelFpf3, 5, 24, 12); 329 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi, 330 _bcmFieldSliceSelFpf3, 5, 36, 1); 331 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri, 332 _bcmFieldSliceSelFpf3, 5, 37, 3); 333 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyEtherType, 334 _bcmFieldSliceSelFpf3, 5, 40, 16); 335 336 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMplsTerminated, 337 _bcmFieldSliceSelFpf3, 6, 24, 1); 338 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVlanTranslationHit, 339 _bcmFieldSliceSelFpf3, 6, 25, 1); 340 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyForwardingVlanValid, 341 _bcmFieldSliceSelFpf3, 6, 26, 1); 342 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIngressStpState, 343 _bcmFieldSliceSelFpf3, 6, 27, 2); 344 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2SrcHit, 345 _bcmFieldSliceSelFpf3, 6, 29, 1); 346 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2SrcStatic, 347 _bcmFieldSliceSelFpf3, 6, 30, 1); 348 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2DestHit, 349 _bcmFieldSliceSelFpf3, 6, 31, 1); 350 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2CacheHit, 351 _bcmFieldSliceSelFpf3, 6, 33, 1); 352 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3SrcHostHit, 353 _bcmFieldSliceSelFpf3, 6, 34, 1); 354 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3DestHostHit, 355 _bcmFieldSliceSelFpf3, 6, 35, 1); 356 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpmcStarGroupHit, 357 _bcmFieldSliceSelFpf3, 6, 36, 1); 358 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3DestRouteHit, 359 _bcmFieldSliceSelFpf3, 6, 37, 1); 360 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2StationMove, 361 _bcmFieldSliceSelFpf3, 6, 38, 1); 362 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDosAttack, 363 _bcmFieldSliceSelFpf3, 6, 39, 1); 364 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlan, 365 _bcmFieldSliceSelFpf3, 6, 40, 16); 366 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanId, 367 _bcmFieldSliceSelFpf3, 6, 40, 12); 368 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanCfi, 369 _bcmFieldSliceSelFpf3, 6, 52, 1); 370 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanPri, 371 _bcmFieldSliceSelFpf3, 6, 53, 3); 372 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyRangeCheck, 373 _bcmFieldSliceSelFpf3, 7, 24, 24); 374 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, _bcmFieldQualifyRangeCheckBits24_31, 375 _bcmFieldSliceSelFpf3, 7, 376 _bcmFieldSliceIntfClassSelect, 3, 48, 8); 377 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassPort, 378 _bcmFieldSliceSelFpf3, 7, 379 _bcmFieldSliceIntfClassSelect, 0, 48, 8); 380 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassVPort, 381 _bcmFieldSliceSelFpf3, 7, 382 _bcmFieldSliceIntfClassSelect, 1, 48, 8); 383 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassL3, 384 _bcmFieldSliceSelFpf3, 7, 385 _bcmFieldSliceIntfClassSelect, 1, 48, 8); 386 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassL2, 387 _bcmFieldSliceSelFpf3, 7, 388 _bcmFieldSliceIntfClassSelect, 2, 48, 8); 389 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIp6FlowLabel, 390 _bcmFieldSliceSelFpf3, 8, 24, 20); 391 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVlanFormat, 392 _bcmFieldSliceSelFpf3, 8, 44, 2); 393 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2Format, 394 _bcmFieldSliceSelFpf3, 8, 46, 2); 395 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTranslatedVlanFormat, 396 _bcmFieldSliceSelFpf3, 8, 48, 2); 397 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerTpid, 398 _bcmFieldSliceSelFpf3, 8, 50, 2); 399 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterTpid, 400 _bcmFieldSliceSelFpf3, 8, 52, 2); 401 _FP_QUAL_ADD(unit, stage_fc, _bcmFieldQualifyData3, 402 _bcmFieldSliceSelFpf3, 9, 24, 32); 403 404 /* FPF2 */ 405 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTtl, 406 _bcmFieldSliceSelFpf2, 0, 407 _bcmFieldSliceTtlClassSelect, 0, 408 61, 8); 409 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTtlClassZero, 410 _bcmFieldSliceSelFpf2, 0, 411 _bcmFieldSliceTtlClassSelect, 0, 412 61, 8); 413 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTtlClassOne, 414 _bcmFieldSliceSelFpf2, 0, 415 _bcmFieldSliceTtlClassSelect, 1, 416 61, 8); 417 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTcpControl, 418 _bcmFieldSliceSelFpf2, 0, 419 _bcmFieldSliceTcpClassSelect, 0, 420 69, 6); 421 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTcpClassZero, 422 _bcmFieldSliceSelFpf2, 0, 423 _bcmFieldSliceTcpClassSelect, 0, 424 69, 6); 425 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTcpClassOne, 426 _bcmFieldSliceSelFpf2, 0, 427 _bcmFieldSliceTcpClassSelect, 1, 428 69, 6); 429 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpFlags, 430 _bcmFieldSliceSelFpf2, 0, 75, 2); 431 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTos, 432 _bcmFieldSliceSelFpf2, 0, 433 _bcmFieldSliceTosClassSelect, 0, 434 77, 8); 435 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTosClassZero, 436 _bcmFieldSliceSelFpf2, 0, 437 _bcmFieldSliceTosClassSelect, 0, 438 77, 8); 439 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTosClassOne, 440 _bcmFieldSliceSelFpf2, 0, 441 _bcmFieldSliceTosClassSelect, 1, 442 77, 8); 443 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4DstPort, 444 _bcmFieldSliceSelFpf2, 0, 85, 16); 445 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4SrcPort, 446 _bcmFieldSliceSelFpf2, 0, 101, 16); 447 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIcmpTypeCode, 448 _bcmFieldSliceSelFpf2, 0, 101, 16); 449 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol, 450 _bcmFieldSliceSelFpf2, 0, 117, 8); 451 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstIp, 452 _bcmFieldSliceSelFpf2, 0, 125, 32); 453 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcIp, 454 _bcmFieldSliceSelFpf2, 0, 157, 32); 455 456 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTtl, 457 _bcmFieldSliceSelFpf2, 1, 458 _bcmFieldSliceTtlClassSelect, 0, 459 61, 8); 460 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTtlClassZero, 461 _bcmFieldSliceSelFpf2, 1, 462 _bcmFieldSliceTtlClassSelect, 0, 463 61, 8); 464 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTtlClassOne, 465 _bcmFieldSliceSelFpf2, 1, 466 _bcmFieldSliceTtlClassSelect, 1, 467 61, 8); 468 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTcpControl, 469 _bcmFieldSliceSelFpf2, 1, 470 _bcmFieldSliceTcpClassSelect, 0, 471 69, 6); 472 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTcpClassZero, 473 _bcmFieldSliceSelFpf2, 1, 474 _bcmFieldSliceTcpClassSelect, 0, 475 69, 6); 476 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTcpClassOne, 477 _bcmFieldSliceSelFpf2, 1, 478 _bcmFieldSliceTcpClassSelect, 1, 479 69, 6); 480 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpFrag, 481 _bcmFieldSliceSelFpf2, 1, 75, 2); 482 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTos, 483 _bcmFieldSliceSelFpf2, 1, 484 _bcmFieldSliceTosClassSelect, 0, 485 77, 8); 486 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTosClassZero, 487 _bcmFieldSliceSelFpf2, 1, 488 _bcmFieldSliceTosClassSelect, 0, 489 77, 8); 490 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTosClassOne, 491 _bcmFieldSliceSelFpf2, 1, 492 _bcmFieldSliceTosClassSelect, 1, 493 77, 8); 494 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4DstPort, 495 _bcmFieldSliceSelFpf2, 1, 85, 16); 496 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4SrcPort, 497 _bcmFieldSliceSelFpf2, 1, 101, 16); 498 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIcmpTypeCode, 499 _bcmFieldSliceSelFpf2, 1, 101, 16); 500 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol, 501 _bcmFieldSliceSelFpf2, 1, 117, 8); 502 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstIp, 503 _bcmFieldSliceSelFpf2, 1, 125, 32); 504 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcIp, 505 _bcmFieldSliceSelFpf2, 1, 157, 32); 506 507 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcIp6, 508 _bcmFieldSliceSelFpf2, 2, 61, 128); 509 510 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstIp6, 511 _bcmFieldSliceSelFpf2, 3, 61, 128); 512 513 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTtl, 514 _bcmFieldSliceSelFpf2, 4, 515 _bcmFieldSliceTtlClassSelect, 0, 516 61, 8); 517 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTtlClassZero, 518 _bcmFieldSliceSelFpf2, 4, 519 _bcmFieldSliceTtlClassSelect, 0, 520 61, 8); 521 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTtlClassOne, 522 _bcmFieldSliceSelFpf2, 4, 523 _bcmFieldSliceTtlClassSelect, 1, 524 61, 8); 525 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTcpControl, 526 _bcmFieldSliceSelFpf2, 4, 527 _bcmFieldSliceTcpClassSelect, 0, 528 69, 6); 529 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTcpClassZero, 530 _bcmFieldSliceSelFpf2, 4, 531 _bcmFieldSliceTcpClassSelect, 0, 532 69, 6); 533 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTcpClassOne, 534 _bcmFieldSliceSelFpf2, 4, 535 _bcmFieldSliceTcpClassSelect, 1, 536 69, 6); 537 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIp6FlowLabel, 538 _bcmFieldSliceSelFpf2, 4, 75, 20); 539 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTos, 540 _bcmFieldSliceSelFpf2, 4, 541 _bcmFieldSliceTosClassSelect, 0, 542 95, 8); 543 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTosClassZero, 544 _bcmFieldSliceSelFpf2, 4, 545 _bcmFieldSliceTosClassSelect, 0, 546 95, 8); 547 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTosClassOne, 548 _bcmFieldSliceSelFpf2, 4, 549 _bcmFieldSliceTosClassSelect, 1, 550 95, 8); 551 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol, 552 _bcmFieldSliceSelFpf2, 4, 103, 8); 553 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstIp6High, 554 _bcmFieldSliceSelFpf2, 4, 125, 64); 555 556 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan, 557 _bcmFieldSliceSelFpf2, 5, 61, 16); 558 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 559 _bcmFieldSliceSelFpf2, 5, 61, 12); 560 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi, 561 _bcmFieldSliceSelFpf2, 5, 73, 1); 562 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri, 563 _bcmFieldSliceSelFpf2, 5, 74, 3); 564 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyEtherType, 565 _bcmFieldSliceSelFpf2, 5, 77, 16); 566 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcMac, 567 _bcmFieldSliceSelFpf2, 5, 93, 48); 568 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstMac, 569 _bcmFieldSliceSelFpf2, 5, 141, 48); 570 571 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan, 572 _bcmFieldSliceSelFpf2, 6, 61, 16); 573 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 574 _bcmFieldSliceSelFpf2, 6, 61, 12); 575 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi, 576 _bcmFieldSliceSelFpf2, 6, 73, 1); 577 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri, 578 _bcmFieldSliceSelFpf2, 6, 74, 3); 579 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyEtherType, 580 _bcmFieldSliceSelFpf2, 6, 77, 16); 581 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcMac, 582 _bcmFieldSliceSelFpf2, 6, 93, 48); 583 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcIp, 584 _bcmFieldSliceSelFpf2, 6, 141, 32); 585 586 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan, 587 _bcmFieldSliceSelFpf2, 7, 61, 16); 588 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 589 _bcmFieldSliceSelFpf2, 7, 61, 12); 590 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi, 591 _bcmFieldSliceSelFpf2, 7, 73, 1); 592 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri, 593 _bcmFieldSliceSelFpf2, 7, 74, 3); 594 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyEtherType, 595 _bcmFieldSliceSelFpf2, 7, 77, 16); 596 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTtl, 597 _bcmFieldSliceSelFpf2, 7, 598 _bcmFieldSliceTtlClassSelect, 0, 599 93, 8); 600 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTtlClassZero, 601 _bcmFieldSliceSelFpf2, 7, 602 _bcmFieldSliceTtlClassSelect, 0, 603 93, 8); 604 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTtlClassOne, 605 _bcmFieldSliceSelFpf2, 7, 606 _bcmFieldSliceTtlClassSelect, 1, 607 93, 8); 608 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol, 609 _bcmFieldSliceSelFpf2, 7, 101, 8); 610 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstIp, 611 _bcmFieldSliceSelFpf2, 7, 109, 32); 612 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstMac, 613 _bcmFieldSliceSelFpf2, 7, 141, 48); 614 615 _FP_QUAL_ADD(unit, stage_fc, _bcmFieldQualifyData0, 616 _bcmFieldSliceSelFpf2, 8, 61, 128); 617 618 _FP_QUAL_ADD(unit, stage_fc, _bcmFieldQualifyData1, 619 _bcmFieldSliceSelFpf2, 9, 61, 128); 620 621 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcIp6High, 622 _bcmFieldSliceSelFpf2, 10, 61, 64); 623 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstIp6High, 624 _bcmFieldSliceSelFpf2, 10, 125, 64); 625 626 627 /* FPF1 - 0 */ 628 629 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL2, 630 _bcmFieldSliceSelFpf1, 0, 631 _bcmFieldSliceDstClassSelect, 0, 189, 6); 632 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL3, 633 _bcmFieldSliceSelFpf1, 0, 634 _bcmFieldSliceDstClassSelect, 1, 189, 6); 635 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField, 636 _bcmFieldSliceSelFpf1, 0, 637 _bcmFieldSliceDstClassSelect, 2, 189, 6); 638 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField, 639 _bcmFieldSliceSelFpf1, 0, 640 _bcmFieldSliceSrcClassSelect, 2, 195, 6); 641 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL2, 642 _bcmFieldSliceSelFpf1, 0, 643 _bcmFieldSliceSrcClassSelect, 0, 195, 6); 644 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL3, 645 _bcmFieldSliceSelFpf1, 0, 646 _bcmFieldSliceSrcClassSelect, 1, 195, 6); 647 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField, 648 _bcmFieldSliceSelFpf1, 0, 649 _bcmFieldSliceSrcClassSelect, 3, 195, 6); 650 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField, 651 _bcmFieldSliceSelFpf1, 0, 652 _bcmFieldSliceDstClassSelect, 3, 189, 6); 653 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVrf, 654 _bcmFieldSliceSelFpf1, 0, 655 _bcmFieldSliceFwdFieldSelect, 656 _bcmFieldFwdFieldVrf, 201, 12); 657 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVpn, 658 _bcmFieldSliceSelFpf1, 0, 659 _bcmFieldSliceFwdFieldSelect, 660 _bcmFieldFwdFieldVpn, 201, 12); 661 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 662 bcmFieldQualifyForwardingVlanId, 663 _bcmFieldSliceSelFpf1, 0, 664 _bcmFieldSliceFwdFieldSelect, 665 _bcmFieldFwdFieldVlan, 201, 12); 666 667 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMplsGport, 668 _bcmFieldSliceSelFpf1, 0, 669 _bcmFieldSliceIngressEntitySelect, 670 _bcmFieldFwdEntityMplsGport, 213, 13); 671 672 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMimGport, 673 _bcmFieldSliceSelFpf1, 0, 674 _bcmFieldSliceIngressEntitySelect, 675 _bcmFieldFwdEntityMimGport, 213, 13); 676 677 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVlanGport, 678 _bcmFieldSliceSelFpf1, 0, 679 _bcmFieldSliceIngressEntitySelect, 680 _bcmFieldFwdEntityVlanGport, 213, 13); 681 682 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyL3Ingress, 683 _bcmFieldSliceSelFpf1, 0, 684 _bcmFieldSliceIngressEntitySelect, 685 _bcmFieldFwdEntityL3Egress, 213, 13); 686 687 /* FPF1 - 1 */ 688 689 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstPort, 690 _bcmFieldSliceSelFpf1, 1, 691 _bcmFieldSliceDstFwdEntitySelect, 692 _bcmFieldFwdEntityGlp, 189, 17); 693 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstGport, 694 _bcmFieldSliceSelFpf1, 1, 695 _bcmFieldSliceDstFwdEntitySelect, 696 _bcmFieldFwdEntityCommonGport, 189, 17); 697 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstTrunk, 698 _bcmFieldSliceSelFpf1, 1, 699 _bcmFieldSliceDstFwdEntitySelect, 700 _bcmFieldFwdEntityGlp, 189, 17); 701 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMplsGport, 702 _bcmFieldSliceSelFpf1, 1, 703 _bcmFieldSliceDstFwdEntitySelect, 704 _bcmFieldFwdEntityMplsGport, 189, 17); 705 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMimGport, 706 _bcmFieldSliceSelFpf1, 1, 707 _bcmFieldSliceDstFwdEntitySelect, 708 _bcmFieldFwdEntityMimGport, 189, 17); 709 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstWlanGport, 710 _bcmFieldSliceSelFpf1, 1, 711 _bcmFieldSliceDstFwdEntitySelect, 712 _bcmFieldFwdEntityWlanGport, 189, 17); 713 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstVlanGport, 714 _bcmFieldSliceSelFpf1, 1, 715 _bcmFieldSliceDstFwdEntitySelect, 716 _bcmFieldFwdEntityVlanGport, 189, 17); 717 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstL3Egress, 718 _bcmFieldSliceSelFpf1, 1, 719 _bcmFieldSliceDstFwdEntitySelect, 720 _bcmFieldFwdEntityL3Egress, 189, 17); 721 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstL3EgressNextHops, 722 _bcmFieldSliceSelFpf1, 1, 723 _bcmFieldSliceDstFwdEntitySelect, 724 _bcmFieldFwdEntityL3Egress, 189, 17); 725 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMulticastGroup, 726 _bcmFieldSliceSelFpf1, 1, 727 _bcmFieldSliceDstFwdEntitySelect, 728 _bcmFieldFwdEntityMulticastGroup, 189, 17); 729 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcPort, 730 _bcmFieldSliceSelFpf1, 1, 731 _bcmFieldSliceSrcEntitySelect, 732 _bcmFieldFwdEntityGlp, 206, 15); 733 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcTrunk, 734 _bcmFieldSliceSelFpf1, 1, 735 _bcmFieldSliceSrcEntitySelect, 736 _bcmFieldFwdEntityGlp, 206, 15); 737 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMplsGport, 738 _bcmFieldSliceSelFpf1, 1, 739 _bcmFieldSliceSrcEntitySelect, 740 _bcmFieldFwdEntityMplsGport, 206, 15); 741 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMimGport, 742 _bcmFieldSliceSelFpf1, 1, 743 _bcmFieldSliceSrcEntitySelect, 744 _bcmFieldFwdEntityMimGport, 206, 15); 745 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcWlanGport, 746 _bcmFieldSliceSelFpf1, 1, 747 _bcmFieldSliceSrcEntitySelect, 748 _bcmFieldFwdEntityWlanGport, 206, 15); 749 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVlanGport, 750 _bcmFieldSliceSelFpf1, 1, 751 _bcmFieldSliceSrcEntitySelect, 752 _bcmFieldFwdEntityVlanGport, 206, 15); 753 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcModPortGport, 754 _bcmFieldSliceSelFpf1, 1, 755 _bcmFieldSliceSrcEntitySelect, 756 _bcmFieldFwdEntityModPortGport, 206, 15); 757 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcModuleGport, 758 _bcmFieldSliceSelFpf1, 1, 759 _bcmFieldSliceSrcEntitySelect, 760 _bcmFieldFwdEntityModPortGport, 212, 8); 761 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTrunkMemberSourceModuleId, 762 _bcmFieldSliceSelFpf1, 1, 763 _bcmFieldSliceSrcEntitySelect, 764 _bcmFieldFwdEntityModPortGport, 206 + 7, 8); 765 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcGport, 766 _bcmFieldSliceSelFpf1, 1, 767 _bcmFieldSliceSrcEntitySelect, 768 _bcmFieldFwdEntityCommonGport, 206, 15); 769 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMHOpcode, 770 _bcmFieldSliceSelFpf1, 1, 221, 3); 771 772 773 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstPort, 774 _bcmFieldSliceSelFpf1, 2, 775 _bcmFieldSliceDstFwdEntitySelect, 776 _bcmFieldFwdEntityGlp, 189, 17); 777 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstGport, 778 _bcmFieldSliceSelFpf1, 2, 779 _bcmFieldSliceDstFwdEntitySelect, 780 _bcmFieldFwdEntityCommonGport, 189, 17); 781 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstTrunk, 782 _bcmFieldSliceSelFpf1, 2, 783 _bcmFieldSliceDstFwdEntitySelect, 784 _bcmFieldFwdEntityGlp, 189, 17); 785 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMplsGport, 786 _bcmFieldSliceSelFpf1, 2, 787 _bcmFieldSliceDstFwdEntitySelect, 788 _bcmFieldFwdEntityMplsGport, 189, 17); 789 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMimGport, 790 _bcmFieldSliceSelFpf1, 2, 791 _bcmFieldSliceDstFwdEntitySelect, 792 _bcmFieldFwdEntityMimGport, 189, 17); 793 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstWlanGport, 794 _bcmFieldSliceSelFpf1, 2, 795 _bcmFieldSliceDstFwdEntitySelect, 796 _bcmFieldFwdEntityWlanGport, 189, 17); 797 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstVlanGport, 798 _bcmFieldSliceSelFpf1, 2, 799 _bcmFieldSliceDstFwdEntitySelect, 800 _bcmFieldFwdEntityVlanGport, 189, 17); 801 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstL3Egress, 802 _bcmFieldSliceSelFpf1, 2, 803 _bcmFieldSliceDstFwdEntitySelect, 804 _bcmFieldFwdEntityL3Egress, 189, 17); 805 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstL3EgressNextHops, 806 _bcmFieldSliceSelFpf1, 2, 807 _bcmFieldSliceDstFwdEntitySelect, 808 _bcmFieldFwdEntityL3Egress, 189, 17); 809 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMulticastGroup, 810 _bcmFieldSliceSelFpf1, 2, 811 _bcmFieldSliceDstFwdEntitySelect, 812 _bcmFieldFwdEntityMulticastGroup, 189, 17); 813 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMHOpcode, 814 _bcmFieldSliceSelFpf1, 2, 206, 3); 815 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL2, 816 _bcmFieldSliceSelFpf1, 2, 817 _bcmFieldSliceDstClassSelect, 0, 209, 6); 818 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL3, 819 _bcmFieldSliceSelFpf1, 2, 820 _bcmFieldSliceDstClassSelect, 1, 209, 6); 821 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField, 822 _bcmFieldSliceSelFpf1, 2, 823 _bcmFieldSliceDstClassSelect, 2, 209, 6); 824 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField, 825 _bcmFieldSliceSelFpf1, 2, 826 _bcmFieldSliceSrcClassSelect, 2, 215, 6); 827 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL2, 828 _bcmFieldSliceSelFpf1, 2, 829 _bcmFieldSliceSrcClassSelect, 0, 215, 6); 830 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL3, 831 _bcmFieldSliceSelFpf1, 2, 832 _bcmFieldSliceSrcClassSelect, 1, 215, 6); 833 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField, 834 _bcmFieldSliceSelFpf1, 2, 835 _bcmFieldSliceSrcClassSelect, 3, 215, 6); 836 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField, 837 _bcmFieldSliceSelFpf1, 2, 838 _bcmFieldSliceDstClassSelect, 3, 209, 6); 839 840 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan, 841 _bcmFieldSliceSelFpf1, 3, 189, 16); 842 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 843 _bcmFieldSliceSelFpf1, 3, 189, 12); 844 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi, 845 _bcmFieldSliceSelFpf1, 3, 201, 1); 846 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri, 847 _bcmFieldSliceSelFpf1, 3, 202, 3); 848 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlan, 849 _bcmFieldSliceSelFpf1, 3, 205, 16); 850 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanId, 851 _bcmFieldSliceSelFpf1, 3, 205, 12); 852 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanCfi, 853 _bcmFieldSliceSelFpf1, 3, 217, 1); 854 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanPri, 855 _bcmFieldSliceSelFpf1, 3, 218, 3); 856 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterTpid, 857 _bcmFieldSliceSelFpf1, 3, 221, 2); 858 859 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan, 860 _bcmFieldSliceSelFpf1, 4, 189, 16); 861 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 862 _bcmFieldSliceSelFpf1, 4, 189, 12); 863 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi, 864 _bcmFieldSliceSelFpf1, 4, 201, 1); 865 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri, 866 _bcmFieldSliceSelFpf1, 4, 202, 3); 867 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyEtherType, 868 _bcmFieldSliceSelFpf1, 4, 205, 16); 869 870 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMplsTerminated, 871 _bcmFieldSliceSelFpf1, 5, 189, 1); 872 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVlanTranslationHit, 873 _bcmFieldSliceSelFpf1, 5, 190, 1); 874 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyForwardingVlanValid, 875 _bcmFieldSliceSelFpf1, 5, 191, 1); 876 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIngressStpState, 877 _bcmFieldSliceSelFpf1, 5, 192, 2); 878 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2SrcHit, 879 _bcmFieldSliceSelFpf1, 5, 194, 1); 880 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2SrcStatic, 881 _bcmFieldSliceSelFpf1, 5, 195, 1); 882 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2DestHit, 883 _bcmFieldSliceSelFpf1, 5, 196, 1); 884 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2CacheHit, 885 _bcmFieldSliceSelFpf1, 5, 198, 1); 886 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3SrcHostHit, 887 _bcmFieldSliceSelFpf1, 5, 199, 1); 888 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3DestHostHit, 889 _bcmFieldSliceSelFpf1, 5, 200, 1); 890 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpmcStarGroupHit, 891 _bcmFieldSliceSelFpf1, 5, 201, 1); 892 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3DestRouteHit, 893 _bcmFieldSliceSelFpf1, 5, 202, 1); 894 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2StationMove, 895 _bcmFieldSliceSelFpf1, 5, 203, 1); 896 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDosAttack, 897 _bcmFieldSliceSelFpf1, 5, 204, 1); 898 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlan, 899 _bcmFieldSliceSelFpf1, 5, 205, 16); 900 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanId, 901 _bcmFieldSliceSelFpf1, 5, 205, 12); 902 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanCfi, 903 _bcmFieldSliceSelFpf1, 5, 217, 1); 904 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanPri, 905 _bcmFieldSliceSelFpf1, 5, 218, 3); 906 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerTpid, 907 _bcmFieldSliceSelFpf1, 5, 221, 2); 908 909 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan, 910 _bcmFieldSliceSelFpf1, 6, 189, 16); 911 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 912 _bcmFieldSliceSelFpf1, 6, 189, 12); 913 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi, 914 _bcmFieldSliceSelFpf1, 6, 201, 1); 915 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri, 916 _bcmFieldSliceSelFpf1, 6, 202, 3); 917 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVlanFormat, 918 _bcmFieldSliceSelFpf1, 6, 205, 2); 919 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2Format, 920 _bcmFieldSliceSelFpf1, 6, 207, 2); 921 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTranslatedVlanFormat, 922 _bcmFieldSliceSelFpf1, 6, 209, 2); 923 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMHOpcode, 924 _bcmFieldSliceSelFpf1, 6, 211, 3); 925 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyPacketRes, 926 _bcmFieldSliceSelFpf1, 6, 214, 5); 927 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpInfo, 928 _bcmFieldSliceSelFpf1, 6, 219, 3); 929 _FP_QUAL_ADD(unit, stage_fc, _bcmFieldQualifyData2, 930 _bcmFieldSliceSelFpf1, 9, 189, 32); 931 932 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan, 933 _bcmFieldSliceSelFpf1, 7, 189, 16); 934 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 935 _bcmFieldSliceSelFpf1, 7, 189, 12); 936 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi, 937 _bcmFieldSliceSelFpf1, 7, 201, 1); 938 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri, 939 _bcmFieldSliceSelFpf1, 7, 202, 3); 940 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL2, 941 _bcmFieldSliceSelFpf1, 7, 942 _bcmFieldSliceSrcClassSelect, 0, 205, 6); 943 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL3, 944 _bcmFieldSliceSelFpf1, 7, 945 _bcmFieldSliceSrcClassSelect, 1, 205, 6); 946 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField, 947 _bcmFieldSliceSelFpf1, 7, 948 _bcmFieldSliceSrcClassSelect, 3, 205, 6); 949 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField, 950 _bcmFieldSliceSelFpf1, 7, 951 _bcmFieldSliceSrcClassSelect, 2, 205, 6); 952 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVrf, 953 _bcmFieldSliceSelFpf1, 7, 954 _bcmFieldSliceFwdFieldSelect, 955 _bcmFieldFwdFieldVrf, 211, 12); 956 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVpn, 957 _bcmFieldSliceSelFpf1, 7, 958 _bcmFieldSliceFwdFieldSelect, 959 _bcmFieldFwdFieldVpn, 211, 12); 960 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 961 bcmFieldQualifyForwardingVlanId, 962 _bcmFieldSliceSelFpf1, 7, 963 _bcmFieldSliceFwdFieldSelect, 964 _bcmFieldFwdFieldVlan, 211, 12); 965 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMplsOuterLabelPop, 966 _bcmFieldSliceSelFpf1, 7, 223, 1); 967 _FP_QUAL_ADD(unit, stage_fc, 968 bcmFieldQualifyMplsStationHitTunnelUnterminated, 969 _bcmFieldSliceSelFpf1, 7, 224, 1); 970 971 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol, 972 _bcmFieldSliceSelFpf1, 8, 189, 8); 973 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTos, 974 _bcmFieldSliceSelFpf1, 8, 975 _bcmFieldSliceTosClassSelect, 0, 976 197, 8); 977 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTosClassZero, 978 _bcmFieldSliceSelFpf1, 8, 979 _bcmFieldSliceTosClassSelect, 0, 980 197, 8); 981 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTosClassOne, 982 _bcmFieldSliceSelFpf1, 8, 983 _bcmFieldSliceTosClassSelect, 1, 984 197, 8); 985 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL2, 986 _bcmFieldSliceSelFpf1, 8, 987 _bcmFieldSliceSrcClassSelect, 0, 205, 6); 988 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL3, 989 _bcmFieldSliceSelFpf1, 8, 990 _bcmFieldSliceSrcClassSelect, 1, 205, 6); 991 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField, 992 _bcmFieldSliceSelFpf1, 8, 993 _bcmFieldSliceSrcClassSelect, 3, 205, 6); 994 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField, 995 _bcmFieldSliceSelFpf1, 8, 996 _bcmFieldSliceSrcClassSelect, 2, 205, 6); 997 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVrf, 998 _bcmFieldSliceSelFpf1, 8, 999 _bcmFieldSliceFwdFieldSelect, 1000 _bcmFieldFwdFieldVrf, 211, 12); 1001 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVpn, 1002 _bcmFieldSliceSelFpf1, 8, 1003 _bcmFieldSliceFwdFieldSelect, 1004 _bcmFieldFwdFieldVpn, 211, 12); 1005 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1006 bcmFieldQualifyForwardingVlanId, 1007 _bcmFieldSliceSelFpf1, 8, 1008 _bcmFieldSliceFwdFieldSelect, 1009 _bcmFieldFwdFieldVlan, 211, 12); 1010 1011 /* DWF4 */ 1012 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyTcpControl, 1013 _bcmFieldSliceSelFpf4, 1, 1014 _bcmFieldSliceTcpClassSelect, 0, 0, 6); 1015 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyTcpClassZero, 1016 _bcmFieldSliceSelFpf4, 1, 1017 _bcmFieldSliceTcpClassSelect, 0, 0, 6); 1018 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyTcpClassOne, 1019 _bcmFieldSliceSelFpf4, 1, 1020 _bcmFieldSliceTcpClassSelect, 1, 0, 6); 1021 1022 /* DWF3 */ 1023 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyTos, 1024 _bcmFieldSliceSelDisable, 0, 1025 _bcmFieldSliceTosClassSelect, 0, 7, 8); 1026 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyTosClassZero, 1027 _bcmFieldSliceSelDisable, 0, 1028 _bcmFieldSliceTosClassSelect, 0, 7, 8); 1029 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyTosClassOne, 1030 _bcmFieldSliceSelDisable, 0, 1031 _bcmFieldSliceTosClassSelect, 1, 7, 8); 1032 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol, 1033 _bcmFieldSliceSelDisable, 0, 1034 _bcmFieldSliceSelDisable, 0, 15, 8); 1035 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, 1036 bcmFieldQualifyExtensionHeaderSubCode, 1037 _bcmFieldSliceSelDisable, 0, 1038 _bcmFieldSliceSelDisable, 0, 23, 8); 1039 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyExtensionHeaderType, 1040 _bcmFieldSliceSelDisable, 0, 1041 _bcmFieldSliceSelDisable, 0, 31, 8); 1042 1043 /* DWF2 */ 1044 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyMplsTerminated, 1045 _bcmFieldSliceSelFpf2, 0, 1046 _bcmFieldSliceSelDisable, 0, 55, 1); 1047 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyVlanTranslationHit, 1048 _bcmFieldSliceSelFpf2, 0, 1049 _bcmFieldSliceSelDisable, 0, 56, 1); 1050 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyForwardingVlanValid, 1051 _bcmFieldSliceSelFpf2, 0, 1052 _bcmFieldSliceSelDisable, 0, 57, 1); 1053 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyIngressStpState, 1054 _bcmFieldSliceSelFpf2, 0, 1055 _bcmFieldSliceSelDisable, 0, 58, 2); 1056 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyL2SrcHit, 1057 _bcmFieldSliceSelFpf2, 0, 1058 _bcmFieldSliceSelDisable, 0, 60, 1); 1059 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyL2SrcStatic, 1060 _bcmFieldSliceSelFpf2, 0, 1061 _bcmFieldSliceSelDisable, 0, 61, 1); 1062 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyL2DestHit, 1063 _bcmFieldSliceSelFpf2, 0, 1064 _bcmFieldSliceSelDisable, 0, 62, 1); 1065 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyL2CacheHit, 1066 _bcmFieldSliceSelFpf2, 0, 1067 _bcmFieldSliceSelDisable, 0, 64, 1); 1068 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyL3SrcHostHit, 1069 _bcmFieldSliceSelFpf2, 0, 1070 _bcmFieldSliceSelDisable, 0, 65, 1); 1071 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyL3DestHostHit, 1072 _bcmFieldSliceSelFpf2, 0, 1073 _bcmFieldSliceSelDisable, 0, 66, 1); 1074 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyIpmcStarGroupHit, 1075 _bcmFieldSliceSelFpf2, 0, 1076 _bcmFieldSliceSelDisable, 0, 67, 1); 1077 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyL3DestRouteHit, 1078 _bcmFieldSliceSelFpf2, 0, 1079 _bcmFieldSliceSelDisable, 0, 68, 1); 1080 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyL2StationMove, 1081 _bcmFieldSliceSelFpf2, 0, 1082 _bcmFieldSliceSelDisable, 0, 69, 1); 1083 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyDosAttack, 1084 _bcmFieldSliceSelFpf2, 0, 1085 _bcmFieldSliceSelDisable, 0, 70, 1); 1086 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyRangeCheck, 1087 _bcmFieldSliceSelFpf2, 0, 1088 _bcmFieldSliceSelDisable, 0, 71, 24); 1089 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, _bcmFieldQualifyRangeCheckBits24_31, 1090 _bcmFieldSliceSelFpf2, 0, 1091 _bcmFieldSliceIntfClassSelect, 3, 95, 8); 1092 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassPort, 1093 _bcmFieldSliceSelFpf2, 0, 1094 _bcmFieldSliceIntfClassSelect, 0, 95, 8); 1095 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassL3, 1096 _bcmFieldSliceSelFpf2, 0, 1097 _bcmFieldSliceIntfClassSelect, 1, 95, 8); 1098 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassL2, 1099 _bcmFieldSliceSelFpf2, 0, 1100 _bcmFieldSliceIntfClassSelect, 2, 95, 8); 1101 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyDstIp, 1102 _bcmFieldSliceSelFpf2, 0, 1103 _bcmFieldSliceSelDisable, 0, 103, 32); 1104 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifySrcIp, 1105 _bcmFieldSliceSelFpf2, 0, 1106 _bcmFieldSliceSelDisable, 0, 135, 32); 1107 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifySrcIp6, 1108 _bcmFieldSliceSelFpf2, 1, 1109 _bcmFieldSliceSelDisable, 0, 39, 128); 1110 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyDstIp6, 1111 _bcmFieldSliceSelFpf2, 2, 1112 _bcmFieldSliceSelDisable, 0, 39, 128); 1113 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, _bcmFieldQualifyData1, 1114 _bcmFieldSliceSelFpf2, 3, 1115 _bcmFieldSliceSelDisable, 0, 39, 128); 1116 /* DWF1 */ 1117 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyTtl, 1118 _bcmFieldSliceSelDisable, 0, 1119 _bcmFieldSliceTtlClassSelect, 0, 167, 8); 1120 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyTtlClassZero, 1121 _bcmFieldSliceSelDisable, 0, 1122 _bcmFieldSliceTtlClassSelect, 0, 167, 8); 1123 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyTtlClassOne, 1124 _bcmFieldSliceSelDisable, 0, 1125 _bcmFieldSliceTtlClassSelect, 1, 167, 8); 1126 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyIpFrag, 1127 _bcmFieldSliceSelDisable, 0, 1128 _bcmFieldSliceSelDisable, 0, 175, 2); 1129 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyL4DstPort, 1130 _bcmFieldSliceSelDisable, 0, 1131 _bcmFieldSliceSelDisable, 0, 177, 16); 1132 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyL4SrcPort, 1133 _bcmFieldSliceSelDisable, 0, 1134 _bcmFieldSliceSelDisable, 0, 193, 16); 1135 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyIcmpTypeCode, 1136 _bcmFieldSliceSelDisable, 0, 1137 _bcmFieldSliceSelDisable, 0, 193, 16); 1138 1139 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstPort, 1140 _bcmFieldDevSelDisable, 0, 1141 _bcmFieldSliceSelDisable, 0, 1142 _bcmFieldSliceDstFwdEntitySelect, 1143 _bcmFieldFwdEntityGlp, 0x1, 1144 209, 17, 0, 0, 0, 0, 0); 1145 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstGport, 1146 _bcmFieldDevSelDisable, 0, 1147 _bcmFieldSliceSelDisable, 0, 1148 _bcmFieldSliceDstFwdEntitySelect, 1149 _bcmFieldFwdEntityCommonGport, 0x1, 1150 209, 17, 0, 0, 0, 0, 0); 1151 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstTrunk, 1152 _bcmFieldDevSelDisable, 0, 1153 _bcmFieldSliceSelDisable, 0, 1154 _bcmFieldSliceDstFwdEntitySelect, 1155 _bcmFieldFwdEntityGlp, 0x1, 1156 209, 17, 0, 0, 0, 0, 0); 1157 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstMplsGport, 1158 _bcmFieldDevSelDisable, 0, 1159 _bcmFieldSliceSelDisable, 0, 1160 _bcmFieldSliceDstFwdEntitySelect, 1161 _bcmFieldFwdEntityMplsGport, 0x1, 1162 209, 17, 0, 0, 0, 0, 0); 1163 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstMimGport, 1164 _bcmFieldDevSelDisable, 0, 1165 _bcmFieldSliceSelDisable, 0, 1166 _bcmFieldSliceDstFwdEntitySelect, 1167 _bcmFieldFwdEntityMimGport, 0x1, 1168 209, 17, 0, 0, 0, 0, 0); 1169 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstWlanGport, 1170 _bcmFieldDevSelDisable, 0, 1171 _bcmFieldSliceSelDisable, 0, 1172 _bcmFieldSliceDstFwdEntitySelect, 1173 _bcmFieldFwdEntityWlanGport, 0x1, 1174 209, 17, 0, 0, 0, 0, 0); 1175 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstVlanGport, 1176 _bcmFieldDevSelDisable, 0, 1177 _bcmFieldSliceSelDisable, 0, 1178 _bcmFieldSliceDstFwdEntitySelect, 1179 _bcmFieldFwdEntityVlanGport, 0x1, 1180 209, 17, 0, 0, 0, 0, 0); 1181 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstL3Egress, 1182 _bcmFieldDevSelDisable, 0, 1183 _bcmFieldSliceSelDisable, 0, 1184 _bcmFieldSliceDstFwdEntitySelect, 1185 _bcmFieldFwdEntityL3Egress, 0x1, 1186 209, 17, 0, 0, 0, 0, 0); 1187 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstL3EgressNextHops, 1188 _bcmFieldDevSelDisable, 0, 1189 _bcmFieldSliceSelDisable, 0, 1190 _bcmFieldSliceDstFwdEntitySelect, 1191 _bcmFieldFwdEntityL3Egress, 0x1, 1192 209, 17, 0, 0, 0, 0, 0); 1193 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstMulticastGroup, 1194 _bcmFieldDevSelDisable, 0, 1195 _bcmFieldSliceSelDisable, 0, 1196 _bcmFieldSliceDstFwdEntitySelect, 1197 _bcmFieldFwdEntityMulticastGroup, 0x1, 1198 209, 17, 0, 0, 0, 0, 0); 1199 1200 /* IPBM OVERLAY qualifiers for Triumph 2 device */ 1201 if (SOC_IS_TRIUMPH2(unit) || SOC_IS_APOLLO(unit)) { 1202 ipbm_pairing_overlay_offset = 0; 1203 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstPort, 1204 _bcmFieldDevSelDisable, 0, 1205 _bcmFieldSliceSelDisable, 0, 1206 _bcmFieldSliceSelDisable, 0, 1207 1, 1208 ipbm_pairing_overlay_offset + 20, 14, 1209 0, 0, 1210 0, 0, 1211 1); 1212 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstTrunk, 1213 _bcmFieldDevSelDisable, 0, 1214 _bcmFieldSliceSelDisable, 0, 1215 _bcmFieldSliceSelDisable, 0, 1216 1, 1217 ipbm_pairing_overlay_offset + 20, 14, 1218 0, 0, 1219 0, 0, 1220 1); 1221 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifySrcPort, 1222 _bcmFieldDevSelDisable, 0, 1223 _bcmFieldSliceSelDisable, 0, 1224 _bcmFieldSliceSrcEntitySelect, _bcmFieldFwdEntityGlp, 1225 1, 1226 ipbm_pairing_overlay_offset + 34, 14, 1227 0, 0, 1228 0, 0, 1229 1); 1230 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifySrcTrunk, 1231 _bcmFieldDevSelDisable, 0, 1232 _bcmFieldSliceSelDisable, 0, 1233 _bcmFieldSliceSrcEntitySelect, _bcmFieldFwdEntityGlp, 1234 1, 1235 ipbm_pairing_overlay_offset + 34, 14, 1236 0, 0, 1237 0, 0, 1238 1); 1239 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifySrcModPortGport, 1240 _bcmFieldDevSelDisable, 0, 1241 _bcmFieldSliceSelDisable, 0, 1242 _bcmFieldSliceSrcEntitySelect, _bcmFieldFwdEntityModPortGport, 1243 1, 1244 ipbm_pairing_overlay_offset + 34, 14, 1245 0, 0, 1246 0, 0, 1247 1); 1248 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifySrcModuleGport, 1249 _bcmFieldDevSelDisable, 0, 1250 _bcmFieldSliceSelDisable, 0, 1251 _bcmFieldSliceSrcEntitySelect, _bcmFieldFwdEntityModPortGport, 1252 1, 1253 ipbm_pairing_overlay_offset + 40, 7, 1254 0, 0, 1255 0, 0, 1256 1); 1257 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyTrunkMemberSourceModuleId, 1258 _bcmFieldDevSelDisable, 0, 1259 _bcmFieldSliceSelDisable, 0, 1260 _bcmFieldSliceSrcEntitySelect, _bcmFieldFwdEntityModPortGport, 1261 1, 1262 ipbm_pairing_overlay_offset + 40, 7, 1263 0, 0, 1264 0, 0, 1265 1); 1266 } 1267 /* DONE DWF */ 1268 return (BCM_E_NONE); 1269 } 1270 1271 /* 1272 * Function: 1273 * _field_tr2_lookup_qualifiers_init 1274 * Purpose: 1275 * Initialize device stage lookup qaualifiers 1276 * select codes & offsets 1277 * Parameters: 1278 * unit - (IN) BCM device number. 1279 * stage_fc - (IN) Field Processor stage control structure. 1280 * 1281 * Returns: 1282 * BCM_E_NONE 1283 */ 1284 STATIC int 1285 _field_tr2_lookup_qualifiers_init(int unit, _field_stage_t *stage_fc) 1286 { 1287 _FP_QUAL_DECL; 1288 1289 /* Input parameters check. */ 1290 if (NULL == stage_fc) { 1291 return (BCM_E_PARAM); 1292 } 1293 1294 /* Enable the overlay of Sender Ethernet Address onto MACSA 1295 * on ARP/RARP packets. 1296 */ 1297 BCM_IF_ERROR_RETURN 1298 (soc_reg_field32_modify(unit, ING_CONFIG_64r, REG_PORT_ANY, 1299 ARP_VALIDATION_ENf, 1)); 1300 1301 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyStageLookup, 1302 _bcmFieldSliceSelDisable, 0, 0, 0); 1303 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIp4, 1304 _bcmFieldSliceSelDisable, 0, 0, 0); 1305 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIp6, 1306 _bcmFieldSliceSelDisable, 0, 0, 0); 1307 1308 /* FPF3 */ 1309 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlan, 1310 _bcmFieldSliceSelFpf3, 0, 0, 16); 1311 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanId, 1312 _bcmFieldSliceSelFpf3, 0, 0, 12); 1313 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanCfi, 1314 _bcmFieldSliceSelFpf3, 0, 12, 1); 1315 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanPri, 1316 _bcmFieldSliceSelFpf3, 0, 13, 3); 1317 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyEtherType, 1318 _bcmFieldSliceSelFpf3, 0, 16, 16); 1319 1320 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInnerL4DstPort, 1321 _bcmFieldSliceSelFpf3, 1, 1322 _bcmFieldSliceIpHeaderSelect, 1, 0, 16); 1323 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyL4DstPort, 1324 _bcmFieldSliceSelFpf3, 1, 1325 _bcmFieldSliceIpHeaderSelect, 0, 0, 16); 1326 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInnerL4SrcPort, 1327 _bcmFieldSliceSelFpf3, 1, 1328 _bcmFieldSliceIpHeaderSelect, 1, 16, 16); 1329 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyL4SrcPort, 1330 _bcmFieldSliceSelFpf3, 1, 1331 _bcmFieldSliceIpHeaderSelect, 0, 16, 16); 1332 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1333 bcmFieldQualifyInnerTos, 1334 _bcmFieldSliceSelFpf3, 2, 1335 _bcmFieldSliceIpHeaderSelect, 1, 0, 8); 1336 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTos, 1337 _bcmFieldSliceSelFpf3, 2, 1338 _bcmFieldSliceIpHeaderSelect, 0, 0, 8); 1339 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1340 bcmFieldQualifyInnerIpProtocol, 1341 _bcmFieldSliceSelFpf3, 2, 1342 _bcmFieldSliceIpHeaderSelect, 1, 8, 8); 1343 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol, 1344 _bcmFieldSliceSelFpf3, 2, 1345 _bcmFieldSliceIpHeaderSelect, 0, 8, 8); 1346 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyExtensionHeaderSubCode, 1347 _bcmFieldSliceSelFpf3, 2, 16, 8); 1348 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyExtensionHeaderType, 1349 _bcmFieldSliceSelFpf3, 2, 24, 8); 1350 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassL3, 1351 _bcmFieldSliceSelFpf3, 3, 0, 8); 1352 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlan, 1353 _bcmFieldSliceSelFpf3, 3, 8, 16); 1354 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanId, 1355 _bcmFieldSliceSelFpf3, 3, 8, 12); 1356 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanCfi, 1357 _bcmFieldSliceSelFpf3, 3, 20, 1); 1358 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanPri, 1359 _bcmFieldSliceSelFpf3, 3, 21, 3); 1360 1361 /* FPF2 */ 1362 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1363 bcmFieldQualifyInnerTtl, 1364 _bcmFieldSliceSelFpf2, 0, 1365 _bcmFieldSliceIpHeaderSelect, 1, 32, 8); 1366 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTtl, 1367 _bcmFieldSliceSelFpf2, 0, 1368 _bcmFieldSliceIpHeaderSelect, 0, 32, 8); 1369 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTcpControl, 1370 _bcmFieldSliceSelFpf2, 0, 40, 6); 1371 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1372 bcmFieldQualifyInnerIpFrag, 1373 _bcmFieldSliceSelFpf2, 0, 1374 _bcmFieldSliceIpHeaderSelect, 1, 46, 2); 1375 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyIpFrag, 1376 _bcmFieldSliceSelFpf2, 0, 1377 _bcmFieldSliceIpHeaderSelect, 0, 46, 2); 1378 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1379 bcmFieldQualifyInnerTos, 1380 _bcmFieldSliceSelFpf2, 0, 1381 _bcmFieldSliceIpHeaderSelect, 1, 48, 8); 1382 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTos, 1383 _bcmFieldSliceSelFpf2, 0, 1384 _bcmFieldSliceIpHeaderSelect, 0, 48, 8); 1385 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInnerL4DstPort, 1386 _bcmFieldSliceSelFpf2, 0, 1387 _bcmFieldSliceIpHeaderSelect, 1, 56, 16); 1388 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyL4DstPort, 1389 _bcmFieldSliceSelFpf2, 0, 1390 _bcmFieldSliceIpHeaderSelect, 0, 56, 16); 1391 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInnerL4SrcPort, 1392 _bcmFieldSliceSelFpf2, 0, 1393 _bcmFieldSliceIpHeaderSelect, 1, 72, 16); 1394 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyL4SrcPort, 1395 _bcmFieldSliceSelFpf2, 0, 1396 _bcmFieldSliceIpHeaderSelect, 0, 72, 16); 1397 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1398 bcmFieldQualifyInnerIpProtocol, 1399 _bcmFieldSliceSelFpf2, 0, 1400 _bcmFieldSliceIpHeaderSelect, 1, 88, 8); 1401 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol, 1402 _bcmFieldSliceSelFpf2, 0, 1403 _bcmFieldSliceIpHeaderSelect, 0, 88, 8); 1404 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1405 bcmFieldQualifyInnerDstIp, 1406 _bcmFieldSliceSelFpf2, 0, 1407 _bcmFieldSliceIpHeaderSelect, 1, 96, 32); 1408 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstIp, 1409 _bcmFieldSliceSelFpf2, 0, 1410 _bcmFieldSliceIpHeaderSelect, 0, 96, 32); 1411 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1412 bcmFieldQualifyInnerSrcIp, 1413 _bcmFieldSliceSelFpf2, 0, 1414 _bcmFieldSliceIpHeaderSelect, 1, 128, 32); 1415 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcIp, 1416 _bcmFieldSliceSelFpf2, 0, 1417 _bcmFieldSliceIpHeaderSelect, 0, 128, 32); 1418 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1419 bcmFieldQualifyInnerSrcIp6, 1420 _bcmFieldSliceSelFpf2, 1, 1421 _bcmFieldSliceIpHeaderSelect, 1, 32, 128); 1422 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcIp6, 1423 _bcmFieldSliceSelFpf2, 1, 1424 _bcmFieldSliceIpHeaderSelect, 0, 32, 128); 1425 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1426 bcmFieldQualifyInnerDstIp6, 1427 _bcmFieldSliceSelFpf2, 2, 1428 _bcmFieldSliceIpHeaderSelect, 1, 32, 128); 1429 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstIp6, 1430 _bcmFieldSliceSelFpf2, 2, 1431 _bcmFieldSliceIpHeaderSelect, 0, 32, 128); 1432 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyEtherType, 1433 _bcmFieldSliceSelFpf2, 3, 48, 16); 1434 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcMac, 1435 _bcmFieldSliceSelFpf2, 3, 64, 48); 1436 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstMac, 1437 _bcmFieldSliceSelFpf2, 3, 112, 48); 1438 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1439 bcmFieldQualifyInnerTos, 1440 _bcmFieldSliceSelFpf2, 4, 1441 _bcmFieldSliceIpHeaderSelect, 1, 32, 8); 1442 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTos, 1443 _bcmFieldSliceSelFpf2, 4, 1444 _bcmFieldSliceIpHeaderSelect, 0, 32, 8); 1445 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1446 bcmFieldQualifyInnerIpProtocol, 1447 _bcmFieldSliceSelFpf2, 4, 1448 _bcmFieldSliceIpHeaderSelect, 1, 40, 8); 1449 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol, 1450 _bcmFieldSliceSelFpf2, 4, 1451 _bcmFieldSliceIpHeaderSelect, 0, 40, 8); 1452 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1453 bcmFieldQualifyInnerDstIp, 1454 _bcmFieldSliceSelFpf2, 4, 1455 _bcmFieldSliceIpHeaderSelect, 1, 48, 32); 1456 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstIp, 1457 _bcmFieldSliceSelFpf2, 4, 1458 _bcmFieldSliceIpHeaderSelect, 0, 48, 32); 1459 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1460 bcmFieldQualifyInnerSrcIp, 1461 _bcmFieldSliceSelFpf2, 4, 1462 _bcmFieldSliceIpHeaderSelect, 1, 80, 32); 1463 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcIp, 1464 _bcmFieldSliceSelFpf2, 4, 1465 _bcmFieldSliceIpHeaderSelect, 0, 80, 32); 1466 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcMac, 1467 _bcmFieldSliceSelFpf2, 4, 112, 48); 1468 1469 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1470 bcmFieldQualifyInnerTos, 1471 _bcmFieldSliceSelFpf2, 5, 1472 _bcmFieldSliceIpHeaderSelect, 1, 32, 8); 1473 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTos, 1474 _bcmFieldSliceSelFpf2, 5, 1475 _bcmFieldSliceIpHeaderSelect, 0, 32, 8); 1476 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1477 bcmFieldQualifyInnerIpProtocol, 1478 _bcmFieldSliceSelFpf2, 5, 1479 _bcmFieldSliceIpHeaderSelect, 1, 40, 8); 1480 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol, 1481 _bcmFieldSliceSelFpf2, 5, 1482 _bcmFieldSliceIpHeaderSelect, 0, 40, 8); 1483 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1484 bcmFieldQualifyInnerDstIp, 1485 _bcmFieldSliceSelFpf2, 5, 1486 _bcmFieldSliceIpHeaderSelect, 1, 48, 32); 1487 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstIp, 1488 _bcmFieldSliceSelFpf2, 5, 1489 _bcmFieldSliceIpHeaderSelect, 0, 48, 32); 1490 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1491 bcmFieldQualifyInnerSrcIp, 1492 _bcmFieldSliceSelFpf2, 5, 1493 _bcmFieldSliceIpHeaderSelect, 1, 80, 32); 1494 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcIp, 1495 _bcmFieldSliceSelFpf2, 5, 1496 _bcmFieldSliceIpHeaderSelect, 0, 80, 32); 1497 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstMac, 1498 _bcmFieldSliceSelFpf2, 5, 112, 48); 1499 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1500 bcmFieldQualifyInnerSrcIp6High, 1501 _bcmFieldSliceSelFpf2, 6, 1502 _bcmFieldSliceIpHeaderSelect, 1, 32, 64); 1503 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcIp6High, 1504 _bcmFieldSliceSelFpf2, 6, 1505 _bcmFieldSliceIpHeaderSelect, 0, 32, 64); 1506 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1507 bcmFieldQualifyInnerDstIp6High, 1508 _bcmFieldSliceSelFpf2, 6, 1509 _bcmFieldSliceIpHeaderSelect, 1, 96, 64); 1510 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstIp6High, 1511 _bcmFieldSliceSelFpf2, 6, 1512 _bcmFieldSliceIpHeaderSelect, 0, 96, 64); 1513 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySnap, 1514 _bcmFieldSliceSelFpf2, 7, 96, 40); 1515 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyLlc, 1516 _bcmFieldSliceSelFpf2, 7, 136, 24); 1517 1518 /* FPF1 */ 1519 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1520 bcmFieldQualifyInnerIpProtocolCommon, 1521 _bcmFieldSliceSelFpf1, 0, 1522 _bcmFieldSliceIpHeaderSelect, 1, 160, 3); 1523 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocolCommon, 1524 _bcmFieldSliceSelFpf1, 0, 1525 _bcmFieldSliceIpHeaderSelect, 0, 160, 3); 1526 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTunnelTerminated, 1527 _bcmFieldSliceSelFpf1, 0, 163, 1); 1528 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerTpid, 1529 _bcmFieldSliceSelFpf1, 0, 165, 2); 1530 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterTpid, 1531 _bcmFieldSliceSelFpf1, 0, 167, 2); 1532 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2Format, 1533 _bcmFieldSliceSelFpf1, 0, 169, 2); 1534 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyHiGigProxy, 1535 _bcmFieldSliceSelFpf1, 0, 171, 1); 1536 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyHiGig, 1537 _bcmFieldSliceSelFpf1, 0, 172, 1); 1538 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan, 1539 _bcmFieldSliceSelFpf1, 0, 173, 16); 1540 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 1541 _bcmFieldSliceSelFpf1, 0, 173, 12); 1542 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi, 1543 _bcmFieldSliceSelFpf1, 0, 185, 1); 1544 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri, 1545 _bcmFieldSliceSelFpf1, 0, 186, 3); 1546 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVlanFormat, 1547 _bcmFieldSliceSelFpf1, 0, 189, 2); 1548 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInPort, 1549 _bcmFieldSliceSelFpf1, 0, 191, 6); 1550 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassPort, 1551 _bcmFieldSliceSelFpf1, 0, 197, 8); 1552 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1553 bcmFieldQualifyInnerIpType, 1554 _bcmFieldSliceSelFpf1, 0, 1555 _bcmFieldSliceIpHeaderSelect, 1, 205, 4); 1556 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyIpType, 1557 _bcmFieldSliceSelFpf1, 0, 1558 _bcmFieldSliceIpHeaderSelect, 0, 205, 4); 1559 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4Ports, 1560 _bcmFieldSliceSelFpf1, 0, 209, 1); 1561 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpInfo, 1562 _bcmFieldSliceSelFpf1, 0, 4, 1); 1563 1564 /* DWF3 */ 1565 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyInnerTos, 1566 _bcmFieldSliceSelFpf3, 0, 1567 _bcmFieldSliceIpHeaderSelect, 1, 0, 8); 1568 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyTos, 1569 _bcmFieldSliceSelFpf3, 0, 1570 _bcmFieldSliceIpHeaderSelect, 0, 0, 8); 1571 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyInnerTtl, 1572 _bcmFieldSliceSelFpf3, 0, 1573 _bcmFieldSliceIpHeaderSelect, 1, 8, 8); 1574 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyTtl, 1575 _bcmFieldSliceSelFpf3, 0, 1576 _bcmFieldSliceIpHeaderSelect, 0, 8, 8); 1577 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyTcpControl, 1578 _bcmFieldSliceSelFpf3, 0, 1579 _bcmFieldSliceIpHeaderSelect, 0, 16, 6); 1580 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyInnerIpFrag, 1581 _bcmFieldSliceSelFpf3, 0, 1582 _bcmFieldSliceIpHeaderSelect, 1, 22, 2); 1583 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyIpFrag, 1584 _bcmFieldSliceSelFpf3, 0, 1585 _bcmFieldSliceIpHeaderSelect, 0, 22, 2); 1586 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol, 1587 _bcmFieldSliceSelFpf3, 0, 1588 _bcmFieldSliceIpHeaderSelect, 0, 24, 8); 1589 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyInnerIpProtocol, 1590 _bcmFieldSliceSelFpf3, 0, 1591 _bcmFieldSliceIpHeaderSelect, 1, 24, 8); 1592 /* DWF2 */ 1593 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyInnerTtl, 1594 _bcmFieldSliceSelFpf2, 0, 1595 _bcmFieldSliceIpHeaderSelect, 1, 32, 8); 1596 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyTtl, 1597 _bcmFieldSliceSelFpf2, 0, 1598 _bcmFieldSliceIpHeaderSelect, 0, 32, 8); 1599 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyTcpControl, 1600 _bcmFieldSliceSelFpf2, 0, 1601 _bcmFieldSliceIpHeaderSelect, 0, 40, 6); 1602 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyInnerIpFrag, 1603 _bcmFieldSliceSelFpf2, 0, 1604 _bcmFieldSliceIpHeaderSelect, 1, 46, 2); 1605 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyIpFrag, 1606 _bcmFieldSliceSelFpf2, 0, 1607 _bcmFieldSliceIpHeaderSelect, 0, 46, 2); 1608 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyInnerTos, 1609 _bcmFieldSliceSelFpf2, 0, 1610 _bcmFieldSliceIpHeaderSelect, 1, 48, 8); 1611 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyTos, 1612 _bcmFieldSliceSelFpf2, 0, 1613 _bcmFieldSliceIpHeaderSelect, 0, 48, 8); 1614 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyInnerL4DstPort, 1615 _bcmFieldSliceSelFpf2, 0, 1616 _bcmFieldSliceIpHeaderSelect, 1, 56, 16); 1617 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyL4DstPort, 1618 _bcmFieldSliceSelFpf2, 0, 1619 _bcmFieldSliceIpHeaderSelect, 0, 56, 16); 1620 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyInnerL4SrcPort, 1621 _bcmFieldSliceSelFpf2, 0, 1622 _bcmFieldSliceIpHeaderSelect, 1, 72, 16); 1623 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyL4SrcPort, 1624 _bcmFieldSliceSelFpf2, 0, 1625 _bcmFieldSliceIpHeaderSelect, 0, 72, 16); 1626 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyInnerIpProtocol, 1627 _bcmFieldSliceSelFpf2, 0, 1628 _bcmFieldSliceIpHeaderSelect, 1, 88, 8); 1629 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol, 1630 _bcmFieldSliceSelFpf2, 0, 1631 _bcmFieldSliceIpHeaderSelect, 0, 88, 8); 1632 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyInnerDstIp, 1633 _bcmFieldSliceSelFpf2, 0, 1634 _bcmFieldSliceIpHeaderSelect, 1, 96, 32); 1635 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyDstIp, 1636 _bcmFieldSliceSelFpf2, 0, 1637 _bcmFieldSliceIpHeaderSelect, 0, 96, 32); 1638 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyInnerSrcIp, 1639 _bcmFieldSliceSelFpf2, 0, 1640 _bcmFieldSliceIpHeaderSelect, 1, 128, 32); 1641 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifySrcIp, 1642 _bcmFieldSliceSelFpf2, 0, 1643 _bcmFieldSliceIpHeaderSelect, 0, 128, 32); 1644 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyInnerSrcIp6, 1645 _bcmFieldSliceSelFpf2, 1, 1646 _bcmFieldSliceIpHeaderSelect, 1, 32, 128); 1647 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifySrcIp6, 1648 _bcmFieldSliceSelFpf2, 1, 1649 _bcmFieldSliceIpHeaderSelect, 0, 32, 128); 1650 /* FPF1 */ 1651 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyExtensionHeaderSubCode, 1652 _bcmFieldSliceSelFpf1, 0, 1653 _bcmFieldSliceIpHeaderSelect, 0, 160, 8); 1654 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyExtensionHeaderType, 1655 _bcmFieldSliceSelFpf1, 0, 1656 _bcmFieldSliceIpHeaderSelect, 0, 168, 8); 1657 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassL3, 1658 _bcmFieldSliceSelFpf1, 0, 1659 _bcmFieldSliceIpHeaderSelect, 0, 176, 8); 1660 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyEtherType, 1661 _bcmFieldSliceSelFpf1, 0, 1662 _bcmFieldSliceIpHeaderSelect, 0, 184, 16); 1663 return (BCM_E_NONE); 1664 } 1665 1666 /* 1667 * Function: 1668 * _field_tr2_external_qualifiers_init 1669 * Purpose: 1670 * Initialize device stage external qaualifiers 1671 * select codes & offsets 1672 * Parameters: 1673 * unit - (IN) BCM device number. 1674 * stage_fc - (IN) Field Processor stage control structure. 1675 * 1676 * Returns: 1677 * BCM_E_NONE 1678 */ 1679 STATIC int 1680 _field_tr2_external_qualifiers_init(int unit, _field_stage_t *stage_fc) 1681 { 1682 uint32 rval; 1683 uint32 keygen_type; 1684 _FP_QUAL_DECL; 1685 1686 BCM_IF_ERROR_RETURN(READ_ESM_KEYGEN_CTLr(unit, &rval)); 1687 keygen_type = soc_reg_field_get(unit, ESM_KEYGEN_CTLr, rval, TCAM_TYPEf); 1688 1689 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyStage, 1690 _bcmFieldSliceSelDisable, 0, 0, 0); 1691 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyStageExternal, 1692 _bcmFieldSliceSelDisable, 0, 0, 0); 1693 1694 /* _FP_EXT_ACL_144_L2 */ 1695 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstMac, 1696 _bcmFieldSliceSelExternal, _FP_EXT_ACL_144_L2, 0, 48); 1697 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan, 1698 _bcmFieldSliceSelExternal, _FP_EXT_ACL_144_L2, 48, 16); 1699 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 1700 _bcmFieldSliceSelExternal, _FP_EXT_ACL_144_L2, 48, 12); 1701 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi, 1702 _bcmFieldSliceSelExternal, _FP_EXT_ACL_144_L2, 60, 1); 1703 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri, 1704 _bcmFieldSliceSelExternal, _FP_EXT_ACL_144_L2, 61, 3); 1705 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInPort, 1706 _bcmFieldSliceSelExternal, _FP_EXT_ACL_144_L2, 64, 6); 1707 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMirrorCopy, 1708 _bcmFieldSliceSelExternal, _FP_EXT_ACL_144_L2, 70, 1); 1709 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcMac, 1710 _bcmFieldSliceSelExternal, _FP_EXT_ACL_144_L2, 72, 48); 1711 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyEtherType, 1712 _bcmFieldSliceSelExternal, _FP_EXT_ACL_144_L2, 120, 16); 1713 1714 if (keygen_type != 3) { 1715 /* _FP_EXT_ACL_L2 */ 1716 1717 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, 1718 stage_fc, 1719 bcmFieldQualifyVpn, 1720 _bcmFieldSliceSelExternal, 1721 _FP_EXT_ACL_L2, 1722 _bcmFieldSliceFwdFieldSelect, 1723 _bcmFieldFwdFieldVpn, 1724 0, 1725 12 1726 ); 1727 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, 1728 stage_fc, 1729 bcmFieldQualifyForwardingVlanId, 1730 _bcmFieldSliceSelExternal, 1731 _FP_EXT_ACL_L2, 1732 _bcmFieldSliceFwdFieldSelect, 1733 _bcmFieldFwdFieldVlan, 1734 0, 1735 12 1736 ); 1737 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcMac, 1738 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2, 12, 48); 1739 _FP_QUAL_ADD(unit, 1740 stage_fc, 1741 bcmFieldQualifyForwardingType, 1742 _bcmFieldSliceSelExternal, 1743 _FP_EXT_ACL_L2, 1744 60, 1745 1 1746 ); 1747 1748 1749 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyHiGig, 1750 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2, 62, 1); 1751 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpType, 1752 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2, 64, 4); 1753 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTunnelTerminated, 1754 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2, 68, 1); 1755 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVlanFormat, 1756 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2, 69, 2); 1757 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMplsTerminated, 1758 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2, 71, 1); 1759 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstMac, 1760 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2, 72, 48); 1761 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyEtherType, 1762 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2, 120, 16); 1763 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2Format, 1764 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2, 136, 2); 1765 1766 /* Unused: 2 bits */ 1767 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMirrorCopy, 1768 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2, 143, 1); 1769 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInPort, 1770 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2, 144, 6); 1771 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2PayloadFirstEightBytes, 1772 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2, 150, 64); 1773 /* Unused: 1 bit */ 1774 /* L2 or IPV4: 1 bit: the tcam_write will handle this */ 1775 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDrop, 1776 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2, 216, 1); 1777 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3Routable, 1778 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2, 217, 1); 1779 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL2, 1780 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2, 1781 _bcmFieldSliceDstClassSelect, 0, 218, 6); 1782 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField, 1783 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2, 1784 _bcmFieldSliceDstClassSelect, 2, 218, 6); 1785 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField, 1786 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2, 1787 _bcmFieldSliceSrcClassSelect, 2, 224, 6); 1788 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL2, 1789 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2, 1790 _bcmFieldSliceSrcClassSelect, 0, 224, 6); 1791 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField, 1792 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2, 1793 _bcmFieldSliceSrcClassSelect, 3, 224, 6); 1794 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField, 1795 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2, 1796 _bcmFieldSliceDstClassSelect, 3, 218, 6); 1797 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyRangeCheck, 1798 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2, 230, 8); 1799 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1800 bcmFieldQualifyInterfaceClassPort, 1801 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2, 1802 _bcmFieldSliceIntfClassSelect, 0, 238, 8); 1803 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1804 bcmFieldQualifyInterfaceClassL3, 1805 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2, 1806 _bcmFieldSliceIntfClassSelect, 1, 238, 8); 1807 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1808 bcmFieldQualifyInterfaceClassL2, 1809 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2, 1810 _bcmFieldSliceIntfClassSelect, 2, 238, 8); 1811 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyVrf, 1812 _bcmFieldDevSelDisable, 0, 1813 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2, 1814 _bcmFieldSliceSelDisable, 0, 0, 1815 246, 8, 138, 3, 0, 0, 0); 1816 /* Unused: 2 bits */ 1817 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcMplsGport, 1818 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2, 256, 13); 1819 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlan, 1820 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2, 256, 16); 1821 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanId, 1822 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2, 256, 12); 1823 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanCfi, 1824 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2, 268, 1); 1825 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanPri, 1826 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2, 269, 3); 1827 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan, 1828 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2, 272, 16); 1829 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 1830 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2, 272, 12); 1831 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi, 1832 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2, 284, 1); 1833 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri, 1834 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2, 285, 3); 1835 } else { 1836 /* _FP_EXT_ACL_L2 (for 7K 350MHz) */ 1837 /* not for 7K 1838 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan, 1839 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2, 272,16); 1840 */ 1841 /* Unused: 12 bits */ 1842 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstMac, 1843 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2, 12, 48); 1844 /* Unused: 2 bits */ 1845 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyHiGig, 1846 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2, 62, 1); 1847 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpType, 1848 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2, 64, 4); 1849 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTunnelTerminated, 1850 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2, 68, 1); 1851 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVlanFormat, 1852 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2, 69, 2); 1853 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMplsTerminated, 1854 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2, 71, 1); 1855 _FP_QUAL_ADD(unit, stage_fc, _bcmFieldQualifyData0, 1856 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2, 88, 32); 1857 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyEtherType, 1858 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2, 120, 16); 1859 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2Format, 1860 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2, 136, 2); 1861 1862 /* Unused: 2 bits */ 1863 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMirrorCopy, 1864 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2, 143, 1); 1865 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 1866 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2, 144, 12); 1867 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcMac, 1868 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2, 156, 48); 1869 _FP_QUAL_ADD(unit, 1870 stage_fc, 1871 bcmFieldQualifyForwardingType, 1872 _bcmFieldSliceSelExternal, 1873 _FP_EXT_ACL_L2, 1874 204, 1875 1 1876 ); 1877 1878 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInPort, 1879 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2, 206, 6); 1880 1881 /* COS_CFI_LOWER 212, 2 */ 1882 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi, 1883 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2, 212, 1); 1884 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri, 1885 _bcmFieldDevSelDisable, 0, 1886 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2, 1887 _bcmFieldSliceSelDisable, 0, 0, 1888 213, 1, 254, 2, 0, 0, 0); 1889 1890 /* Unused: 1 bit */ 1891 /* L2 or IPV4: 1 bit: the tcam_write will handle this */ 1892 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDrop, 1893 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2, 216, 1); 1894 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3Routable, 1895 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2, 217, 1); 1896 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL2, 1897 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2, 1898 _bcmFieldSliceDstClassSelect, 0, 218, 6); 1899 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField, 1900 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2, 1901 _bcmFieldSliceDstClassSelect, 2, 218, 6); 1902 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField, 1903 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2, 1904 _bcmFieldSliceSrcClassSelect, 2, 224, 6); 1905 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL2, 1906 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2, 1907 _bcmFieldSliceSrcClassSelect, 0, 224, 6); 1908 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField, 1909 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2, 1910 _bcmFieldSliceSrcClassSelect, 3, 224, 6); 1911 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField, 1912 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2, 1913 _bcmFieldSliceDstClassSelect, 3, 218, 6); 1914 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyRangeCheck, 1915 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2, 230, 8); 1916 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1917 bcmFieldQualifyInterfaceClassPort, 1918 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2, 1919 _bcmFieldSliceIntfClassSelect, 0, 238, 8); 1920 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1921 bcmFieldQualifyInterfaceClassL3, 1922 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2, 1923 _bcmFieldSliceIntfClassSelect, 1, 238, 8); 1924 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1925 bcmFieldQualifyInterfaceClassL2, 1926 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2, 1927 _bcmFieldSliceIntfClassSelect, 2, 238, 8); 1928 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyVrf, 1929 _bcmFieldDevSelDisable, 0, 1930 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2, 1931 _bcmFieldSliceSelDisable, 0, 0, 1932 246, 8, 138, 3, 0, 0, 0); 1933 1934 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcMplsGport, 1935 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2, 256, 13); 1936 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlan, 1937 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2, 256, 16); 1938 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanId, 1939 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2, 256, 12); 1940 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanCfi, 1941 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2, 268, 1); 1942 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanPri, 1943 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2, 269, 3); 1944 _FP_QUAL_EXT_ADD(unit, stage_fc, _bcmFieldQualifyData2, 1945 _bcmFieldDevSelDisable, 0, 1946 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2, 1947 _bcmFieldSliceSelDisable, 0, 0, 1948 272, 16, 72, 16, 0, 0, 0); 1949 } 1950 1951 /* _FP_EXT_ACL_144_IPV4 */ 1952 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIp4, 1953 _bcmFieldSliceSelExternal, _FP_EXT_ACL_144_IPV4, 0, 0); 1954 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstIp, 1955 _bcmFieldSliceSelExternal, _FP_EXT_ACL_144_IPV4, 0, 32); 1956 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4DstPort, 1957 _bcmFieldSliceSelExternal, _FP_EXT_ACL_144_IPV4, 32, 16); 1958 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan, 1959 _bcmFieldSliceSelExternal, _FP_EXT_ACL_144_IPV4, 48, 16); 1960 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 1961 _bcmFieldSliceSelExternal, _FP_EXT_ACL_144_IPV4, 48, 12); 1962 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi, 1963 _bcmFieldSliceSelExternal, _FP_EXT_ACL_144_IPV4, 60, 1); 1964 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri, 1965 _bcmFieldSliceSelExternal, _FP_EXT_ACL_144_IPV4, 61, 3); 1966 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyVrf, 1967 _bcmFieldDevSelDisable, 0, 1968 _bcmFieldSliceSelExternal, _FP_EXT_ACL_144_IPV4, 1969 _bcmFieldSliceSelDisable, 0, 0, 1970 64, 8, 138, 3, 0, 0, 0); 1971 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3Routable, 1972 _bcmFieldSliceSelExternal, _FP_EXT_ACL_144_IPV4, 72, 1); 1973 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcIp, 1974 _bcmFieldSliceSelExternal, _FP_EXT_ACL_144_IPV4, 73, 32); 1975 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4SrcPort, 1976 _bcmFieldSliceSelExternal, _FP_EXT_ACL_144_IPV4, 105, 16); 1977 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTos, 1978 _bcmFieldSliceSelExternal, _FP_EXT_ACL_144_IPV4, 121, 8); 1979 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol, 1980 _bcmFieldSliceSelExternal, _FP_EXT_ACL_144_IPV4, 129, 8); 1981 /* ESM_IP_PROTOCOL_OVERLAY_EN 137, 1: Useless: 1982 See ESM_KEYGEN_CTLr.IP_PROT_OVERLAY_EN */ 1983 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpFrag, 1984 _bcmFieldSliceSelExternal, _FP_EXT_ACL_144_IPV4, 141, 2); 1985 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMirrorCopy, 1986 _bcmFieldSliceSelExternal, _FP_EXT_ACL_144_IPV4, 143, 1); 1987 1988 if (keygen_type != 3) { 1989 /* _FP_EXT_ACL_IPV4 */ 1990 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIp4, 1991 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 0, 0); 1992 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcIp, 1993 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 0, 32); 1994 /* Unused: 18 + 3 + 8 bits */ 1995 1996 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyHiGig, 1997 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 62, 1); 1998 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpType, 1999 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 63, 4); 2000 /* Unused: 1 bit */ 2001 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTunnelTerminated, 2002 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 68, 1); 2003 /* Unused: 2 bits */ 2004 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMplsTerminated, 2005 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 71, 1); 2006 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstIp, 2007 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 72, 32); 2008 2009 2010 /* Unused: 29 bits */ 2011 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMirrorCopy, 2012 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 143, 1); 2013 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInPort, 2014 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 144, 6); 2015 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4SrcPort, 2016 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 150, 16); 2017 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4DstPort, 2018 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 166, 16); 2019 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTcpControl, 2020 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 182, 6); 2021 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTtl, 2022 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 188, 8); 2023 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol, 2024 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 196, 8); 2025 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTos, 2026 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 204, 8); 2027 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpFrag, 2028 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 212, 2); 2029 /* ACL_Type: 1 bit: tcam_write will handle this */ 2030 /* L2 or IPV4: 1 bit: the tcam_write will handle this */ 2031 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDrop, 2032 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 216, 1); 2033 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3Routable, 2034 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 217, 1); 2035 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL2, 2036 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 2037 _bcmFieldSliceDstClassSelect, 0, 218, 6); 2038 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL3, 2039 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 2040 _bcmFieldSliceDstClassSelect, 1, 218, 6); 2041 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField, 2042 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 2043 _bcmFieldSliceDstClassSelect, 2, 218, 6); 2044 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField, 2045 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 2046 _bcmFieldSliceSrcClassSelect, 2, 224, 6); 2047 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL2, 2048 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 2049 _bcmFieldSliceSrcClassSelect, 0, 224, 6); 2050 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL3, 2051 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 2052 _bcmFieldSliceSrcClassSelect, 1, 224, 6); 2053 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField, 2054 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 2055 _bcmFieldSliceSrcClassSelect, 3, 224, 6); 2056 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField, 2057 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 2058 _bcmFieldSliceDstClassSelect, 3, 218, 6); 2059 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyRangeCheck, 2060 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 230, 8); 2061 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 2062 bcmFieldQualifyInterfaceClassPort, 2063 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 2064 _bcmFieldSliceIntfClassSelect, 0, 238, 8); 2065 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 2066 bcmFieldQualifyInterfaceClassL3, 2067 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 2068 _bcmFieldSliceIntfClassSelect, 1, 238, 8); 2069 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 2070 bcmFieldQualifyInterfaceClassL2, 2071 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 2072 _bcmFieldSliceIntfClassSelect, 2, 238, 8); 2073 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVrf, 2074 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 246, 11); 2075 /* Unused: 15 bits */ 2076 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan, 2077 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 272, 16); 2078 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 2079 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 272, 12); 2080 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi, 2081 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 284, 1); 2082 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri, 2083 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 285, 3); 2084 } else { 2085 /* _FP_EXT_ACL_IPV4 (for 7K 350 MHz) */ 2086 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstIp, 2087 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 0, 32); 2088 /* Unused: 18 + 3 + 8 bits */ 2089 2090 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyHiGig, 2091 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 62, 1); 2092 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpType, 2093 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 63, 4); 2094 /* Unused: 1 bit */ 2095 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTunnelTerminated, 2096 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 68, 1); 2097 /* Unused: 2 bits */ 2098 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMplsTerminated, 2099 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 71, 1); 2100 /* Unused: 17 bits */ 2101 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTcpControl, 2102 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 89, 6); 2103 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInPort, 2104 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 95, 6); 2105 2106 2107 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4SrcPort, 2108 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 111, 16); 2109 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4DstPort, 2110 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 127, 16); 2111 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMirrorCopy, 2112 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 143, 1); 2113 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIp4, 2114 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 144, 0); 2115 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcIp, 2116 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 144, 32); 2117 /* Unused: 12 bits */ 2118 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTtl, 2119 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 188, 8); 2120 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol, 2121 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 196, 8); 2122 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTos, 2123 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 204, 8); 2124 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpFrag, 2125 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 212, 2); 2126 /* ACL_Type: 1 bit: tcam_write will handle this */ 2127 /* L2 or IPV4: 1 bit: the tcam_write will handle this */ 2128 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDrop, 2129 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 216, 1); 2130 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3Routable, 2131 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 217, 1); 2132 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL2, 2133 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 2134 _bcmFieldSliceDstClassSelect, 0, 218, 6); 2135 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL3, 2136 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 2137 _bcmFieldSliceDstClassSelect, 1, 218, 6); 2138 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField, 2139 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 2140 _bcmFieldSliceDstClassSelect, 2, 218, 6); 2141 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField, 2142 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 2143 _bcmFieldSliceSrcClassSelect, 2, 224, 6); 2144 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL2, 2145 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 2146 _bcmFieldSliceSrcClassSelect, 0, 224, 6); 2147 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL3, 2148 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 2149 _bcmFieldSliceSrcClassSelect, 1, 224, 6); 2150 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField, 2151 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 2152 _bcmFieldSliceSrcClassSelect, 3, 224, 6); 2153 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField, 2154 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 2155 _bcmFieldSliceDstClassSelect, 3, 218, 6); 2156 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyRangeCheck, 2157 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 230, 8); 2158 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 2159 bcmFieldQualifyInterfaceClassPort, 2160 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 2161 _bcmFieldSliceIntfClassSelect, 0, 238, 8); 2162 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 2163 bcmFieldQualifyInterfaceClassL3, 2164 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 2165 _bcmFieldSliceIntfClassSelect, 1, 238, 8); 2166 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 2167 bcmFieldQualifyInterfaceClassL2, 2168 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 2169 _bcmFieldSliceIntfClassSelect, 2, 238, 8); 2170 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVrf, 2171 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 246, 11); 2172 /* Unused: 15 bits */ 2173 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan, 2174 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 272, 16); 2175 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 2176 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 272, 12); 2177 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi, 2178 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 284, 1); 2179 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri, 2180 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV4, 285, 3); 2181 } 2182 2183 /* _FP_EXT_ACL_L2_IPV4 */ 2184 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIp4, 2185 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2_IPV4, 0, 0); 2186 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcIp, 2187 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2_IPV4, 0, 32); 2188 /* Unused: 18 + 3 + 8 bits */ 2189 2190 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyHiGig, 2191 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2_IPV4, 62, 1); 2192 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpType, 2193 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2_IPV4, 63, 4); 2194 /* Unused: 1 bit */ 2195 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTunnelTerminated, 2196 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2_IPV4, 68, 1); 2197 /* Unused: 2 bits */ 2198 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMplsTerminated, 2199 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2_IPV4, 71, 1); 2200 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstIp, 2201 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2_IPV4, 72, 32); 2202 2203 2204 /* Unused: 29 bits */ 2205 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMirrorCopy, 2206 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2_IPV4, 143, 1); 2207 /* Unused: 12 bits */ 2208 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstMac, 2209 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2_IPV4, 156, 48); 2210 /* Unused: 11 + 1 bits */ 2211 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInPort, 2212 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2_IPV4, 216, 6); 2213 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4SrcPort, 2214 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2_IPV4, 222, 16); 2215 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4DstPort, 2216 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2_IPV4, 238, 16); 2217 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTcpControl, 2218 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2_IPV4, 254, 6); 2219 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTtl, 2220 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2_IPV4, 260, 8); 2221 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol, 2222 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2_IPV4, 268, 8); 2223 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTos, 2224 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2_IPV4, 276, 8); 2225 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpFrag, 2226 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2_IPV4, 284, 2); 2227 /* ACL_Type: 1 bit: tcam_write will handle this */ 2228 /* L2 or IPV4: 1 bit: the tcam_write will handle this */ 2229 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, 2230 stage_fc, 2231 bcmFieldQualifyVpn, 2232 _bcmFieldSliceSelExternal, 2233 _FP_EXT_ACL_L2_IPV4, 2234 _bcmFieldSliceFwdFieldSelect, 2235 _bcmFieldFwdFieldVpn, 2236 288, 2237 12 2238 ); 2239 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, 2240 stage_fc, 2241 bcmFieldQualifyForwardingVlanId, 2242 _bcmFieldSliceSelExternal, 2243 _FP_EXT_ACL_L2_IPV4, 2244 _bcmFieldSliceFwdFieldSelect, 2245 _bcmFieldFwdFieldVlan, 2246 288, 2247 12 2248 ); 2249 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcMac, 2250 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2_IPV4, 300, 48); 2251 _FP_QUAL_ADD(unit, 2252 stage_fc, 2253 bcmFieldQualifyForwardingType, 2254 _bcmFieldSliceSelExternal, 2255 _FP_EXT_ACL_L2_IPV4, 2256 348, 2257 1 2258 ); 2259 /* Unused: 11 bits */ 2260 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDrop, 2261 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2_IPV4, 360, 1); 2262 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3Routable, 2263 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2_IPV4, 361, 1); 2264 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL2, 2265 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2_IPV4, 2266 _bcmFieldSliceDstClassSelect, 0, 362, 6); 2267 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL3, 2268 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2_IPV4, 2269 _bcmFieldSliceDstClassSelect, 1, 362, 6); 2270 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField, 2271 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2_IPV4, 2272 _bcmFieldSliceDstClassSelect, 2, 362, 6); 2273 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField, 2274 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2_IPV4, 2275 _bcmFieldSliceSrcClassSelect, 2, 368, 6); 2276 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL2, 2277 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2_IPV4, 2278 _bcmFieldSliceSrcClassSelect, 0, 368, 6); 2279 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL3, 2280 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2_IPV4, 2281 _bcmFieldSliceSrcClassSelect, 1, 368, 6); 2282 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField, 2283 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2_IPV4, 2284 _bcmFieldSliceSrcClassSelect, 3, 368, 6); 2285 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField, 2286 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2_IPV4, 2287 _bcmFieldSliceDstClassSelect, 3, 362, 6); 2288 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyRangeCheck, 2289 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2_IPV4, 2290 _bcmFieldSliceDstClassSelect, 3, 374, 8); 2291 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 2292 bcmFieldQualifyInterfaceClassPort, 2293 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2_IPV4, 2294 _bcmFieldSliceIntfClassSelect, 0, 382, 8); 2295 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 2296 bcmFieldQualifyInterfaceClassL3, 2297 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2_IPV4, 2298 _bcmFieldSliceIntfClassSelect, 1, 382, 8); 2299 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 2300 bcmFieldQualifyInterfaceClassL2, 2301 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2_IPV4, 2302 _bcmFieldSliceIntfClassSelect, 2, 382, 8); 2303 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVrf, 2304 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2_IPV4, 390, 11); 2305 /* Unused: 15 bits */ 2306 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan, 2307 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2_IPV4, 416, 16); 2308 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 2309 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2_IPV4, 416, 12); 2310 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi, 2311 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2_IPV4, 428, 1); 2312 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri, 2313 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2_IPV4, 429, 3); 2314 2315 /* _FP_EXT_ACL_144_IPV6 */ 2316 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIp6, 2317 _bcmFieldSliceSelExternal, _FP_EXT_ACL_144_IPV6, 0, 0); 2318 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstIp6High, 2319 _bcmFieldSliceSelExternal, _FP_EXT_ACL_144_IPV6, 0, 64); 2320 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcIp6High, 2321 _bcmFieldSliceSelExternal, _FP_EXT_ACL_144_IPV6, 72, 64); 2322 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan, 2323 _bcmFieldDevSelDisable, 0, 2324 _bcmFieldSliceSelExternal, _FP_EXT_ACL_144_IPV6, 2325 _bcmFieldSliceSelDisable, 0, 0, 2326 136, 8, 64, 8, 0, 0, 0); 2327 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 2328 _bcmFieldDevSelDisable, 0, 2329 _bcmFieldSliceSelExternal, _FP_EXT_ACL_144_IPV6, 2330 _bcmFieldSliceSelDisable, 0, 0, 2331 136, 8, 64, 4, 0, 0, 0); 2332 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi, 2333 _bcmFieldSliceSelExternal, _FP_EXT_ACL_144_IPV6, 68, 1); 2334 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri, 2335 _bcmFieldSliceSelExternal, _FP_EXT_ACL_144_IPV6, 69, 3); 2336 2337 /* _FP_EXT_ACL_IPV6_SHORT */ 2338 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIp6, 2339 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV6_SHORT, 0, 0); 2340 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstIp6, 2341 _bcmFieldDevSelDisable, 0, 2342 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV6_SHORT, 2343 _bcmFieldSliceSelDisable, 0, 0, 2344 80, 64, 0, 64, 0, 0, 0); 2345 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVrf, 2346 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV6_SHORT, 64, 8); 2347 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyHiGig, 2348 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV6_SHORT, 72, 1); 2349 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpType, 2350 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV6_SHORT, 73, 4); 2351 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTunnelTerminated, 2352 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV6_SHORT, 77, 1); 2353 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpFrag, 2354 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV6_SHORT, 78, 2); 2355 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifySrcIp6, 2356 _bcmFieldDevSelDisable, 0, 2357 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV6_SHORT, 2358 _bcmFieldSliceSelDisable, 0, 0, 2359 216, 72, 144, 56, 0, 0, 0); 2360 2361 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyRangeCheck, 2362 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV6_SHORT, 200, 8); 2363 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan, 2364 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV6_SHORT, 200, 16); 2365 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 2366 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV6_SHORT, 200, 12); 2367 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi, 2368 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV6_SHORT, 212, 1); 2369 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri, 2370 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV6_SHORT, 213, 3); 2371 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDrop, 2372 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV6_SHORT, 288, 1); 2373 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3Routable, 2374 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV6_SHORT, 289, 1); 2375 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL2, 2376 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV6_SHORT, 2377 _bcmFieldSliceSrcClassSelect, 0, 290, 6); 2378 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL3, 2379 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV6_SHORT, 2380 _bcmFieldSliceSrcClassSelect, 1, 290, 6); 2381 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField, 2382 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV6_SHORT, 2383 _bcmFieldSliceSrcClassSelect, 3, 290, 6); 2384 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField, 2385 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV6_SHORT, 2386 _bcmFieldSliceDstClassSelect, 3, 290, 6); 2387 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4SrcPort, 2388 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV6_SHORT, 296, 16); 2389 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4DstPort, 2390 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV6_SHORT, 312, 16); 2391 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTcpControl, 2392 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV6_SHORT, 328, 6); 2393 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIp6HopLimit, 2394 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV6_SHORT, 334, 8); 2395 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIp6NextHeader, 2396 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV6_SHORT, 342, 8); 2397 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIp6TrafficClass, 2398 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV6_SHORT, 350, 8); 2399 2400 2401 /* _FP_EXT_ACL_IPV6_FULL */ 2402 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIp6, 2403 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV6_FULL, 0, 0); 2404 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstIp6, 2405 _bcmFieldDevSelDisable, 0, 2406 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV6_FULL, 2407 _bcmFieldSliceSelDisable, 0, 0, 2408 80, 64, 0, 64, 0, 0, 0); 2409 /* Unused: 8 bits */ 2410 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyExtensionHeaderSubCode, 2411 _bcmFieldDevSelDisable, 0, 2412 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV6_FULL, 2413 _bcmFieldSliceSelDisable, 0, 0, 2414 213, 3, 72, 5, 0, 0, 0); 2415 /* Unused: 3 bits */ 2416 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyIp6NextHeader, 2417 _bcmFieldDevSelDisable, 0, 2418 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV6_FULL, 2419 _bcmFieldSliceSelDisable, 0, 0, 2420 284, 4, 144, 4, 0, 0, 0); 2421 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIp6TrafficClass, 2422 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV6_FULL, 148, 8); 2423 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan, 2424 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV6_FULL, 156, 16); 2425 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 2426 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV6_FULL, 156, 12); 2427 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi, 2428 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV6_FULL, 168, 1); 2429 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri, 2430 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV6_FULL, 169, 3); 2431 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInPort, 2432 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV6_FULL, 182, 6); 2433 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpFrag, 2434 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV6_FULL, 188, 2); 2435 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyHiGig, 2436 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV6_FULL, 190, 1); 2437 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpType, 2438 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV6_FULL, 191, 4); 2439 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTunnelTerminated, 2440 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV6_FULL, 195, 1); 2441 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyRangeCheck, 2442 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV6_FULL, 196, 8); 2443 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMplsTerminated, 2444 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV6_FULL, 204, 1); 2445 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyExtensionHeaderType, 2446 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV6_FULL, 205, 8); 2447 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDrop, 2448 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV6_FULL, 216, 1); 2449 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3Routable, 2450 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV6_FULL, 217, 1); 2451 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL2, 2452 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV6_FULL, 2453 _bcmFieldSliceDstClassSelect, 0, 218, 6); 2454 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL3, 2455 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV6_FULL, 2456 _bcmFieldSliceDstClassSelect, 1, 218, 6); 2457 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField, 2458 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV6_FULL, 2459 _bcmFieldSliceDstClassSelect, 2, 218, 6); 2460 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField, 2461 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV6_FULL, 2462 _bcmFieldSliceSrcClassSelect, 2, 224, 6); 2463 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL2, 2464 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV6_FULL, 2465 _bcmFieldSliceSrcClassSelect, 0, 224, 6); 2466 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL3, 2467 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV6_FULL, 2468 _bcmFieldSliceSrcClassSelect, 1, 224, 6); 2469 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField, 2470 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV6_FULL, 2471 _bcmFieldSliceSrcClassSelect, 3, 224, 6); 2472 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField, 2473 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV6_FULL, 2474 _bcmFieldSliceDstClassSelect, 3, 218, 6); 2475 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 2476 bcmFieldQualifyInterfaceClassPort, 2477 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV6_FULL, 2478 _bcmFieldSliceIntfClassSelect, 0, 230, 8); 2479 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 2480 bcmFieldQualifyInterfaceClassL3, 2481 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV6_FULL, 2482 _bcmFieldSliceIntfClassSelect, 1, 230, 8); 2483 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 2484 bcmFieldQualifyInterfaceClassL2, 2485 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV6_FULL, 2486 _bcmFieldSliceIntfClassSelect, 2, 230, 8); 2487 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4SrcPort, 2488 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV6_FULL, 238, 16); 2489 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4DstPort, 2490 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV6_FULL, 254, 16); 2491 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTcpControl, 2492 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV6_FULL, 270, 6); 2493 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIp6HopLimit, 2494 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV6_FULL, 276, 8); 2495 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIp6HopLimit, 2496 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV6_FULL, 276, 8); 2497 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifySrcIp6, 2498 _bcmFieldDevSelDisable, 0, 2499 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV6_FULL, 2500 _bcmFieldSliceSelDisable, 0, 0, 2501 368, 64, 288, 64, 0, 0, 0); 2502 2503 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyVrf, 2504 _bcmFieldDevSelDisable, 0, 2505 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV6_FULL, 2506 _bcmFieldSliceSelDisable, 0, 0, 2507 352, 8, 365, 3, 0, 0, 0); 2508 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMirrorCopy, 2509 _bcmFieldSliceSelExternal, _FP_EXT_ACL_IPV6_FULL, 363, 8); 2510 2511 /* _FP_EXT_ACL_L2_IPV6 */ 2512 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIp6, 2513 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2_IPV6, 0, 0); 2514 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpType, 2515 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2_IPV6, 0, 0); 2516 2517 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstIp6, 2518 _bcmFieldDevSelDisable, 0, 2519 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2_IPV6, 2520 _bcmFieldSliceSelDisable, 0, 0, 2521 423, 9, 288, 72, 216, 47, 0); 2522 2523 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifySrcIp6, 2524 _bcmFieldDevSelDisable, 0, 2525 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2_IPV6, 2526 _bcmFieldSliceSelDisable, 0, 0, 2527 263, 25, 144, 72, 72, 31, 0); 2528 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstMac, 2529 _bcmFieldDevSelDisable, 0, 2530 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2_IPV6, 2531 _bcmFieldSliceSelDisable, 0, 0, 2532 115, 29, 0, 19, 0, 0, 0); 2533 2534 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcMac, 2535 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2_IPV6, 19, 48); 2536 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpFrag, 2537 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2_IPV6, 68, 2); 2538 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyHiGig, 2539 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2_IPV6, 70, 1); 2540 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTunnelTerminated, 2541 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2_IPV6, 71, 1); 2542 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 2543 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2_IPV6, 103, 12); 2544 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVrf, 2545 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2_IPV6, 103, 11); 2546 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDrop, 2547 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2_IPV6, 360, 1); 2548 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3Routable, 2549 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2_IPV6, 361, 1); 2550 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4DstPort, 2551 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2_IPV6, 372, 16); 2552 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4SrcPort, 2553 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2_IPV6, 388, 16); 2554 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIp6NextHeader, 2555 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2_IPV6, 404, 8); 2556 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIp6TrafficClass, 2557 _bcmFieldSliceSelExternal, _FP_EXT_ACL_L2_IPV6, 415, 8); 2558 2559 2560 /* ESM_IP_PROTOCOL_OVERLAY_EN 412, 1: Useless: 2561 See ESM_KEYGEN_CTLr.IP_PROT_OVERLAY_EN */ 2562 /* bcmFieldQualifyTcpControl 404, 8: OVERLAY: not used: 2563 see ESM_KEYGEN_CTLr.IP_PROT_OVERLAY_EN */ 2564 2565 2566 /* bcmFieldQualifyInPort 362, 6: OVERLAY: not used: see ESM_KEYGEN_CTL */ 2567 return (BCM_E_NONE); 2568 } 2569 2570 2571 /* 2572 * Function: 2573 * _field_tr2_egress_qualifiers_init 2574 * Purpose: 2575 * Initialize device stage egress qaualifiers 2576 * select codes & offsets 2577 * Parameters: 2578 * unit - (IN) BCM device number. 2579 * stage_fc - (IN) Field Processor stage control structure. 2580 * 2581 * Returns: 2582 * BCM_E_NONE 2583 */ 2584 STATIC int 2585 _field_tr2_egress_qualifiers_init(int unit, _field_stage_t *stage_fc) 2586 { 2587 _FP_QUAL_DECL; 2588 _key_fld_ = KEYf; 2589 2590 /* Input parameters check. */ 2591 if (NULL == stage_fc) { 2592 return (BCM_E_PARAM); 2593 } 2594 2595 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyStageEgress, 2596 _bcmFieldSliceSelDisable, 0, 0, 0); 2597 2598 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4Ports, 2599 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 0, 1); 2600 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIntPriority, 2601 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 19, 4); 2602 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyColor, 2603 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 23, 2); 2604 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2Format, 2605 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 25, 2); 2606 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyEtherType, 2607 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 27, 16); 2608 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcMac, 2609 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 43, 48); 2610 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstMac, 2611 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 91, 48); 2612 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyCpuQueue, 2613 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 139, 6); 2614 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVlanTranslationHit, 2615 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 145, 1); 2616 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyHiGigProxy, 2617 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 146, 1); 2618 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyHiGig, 2619 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 147, 1); 2620 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlan, 2621 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 148, 16); 2622 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanCfi, 2623 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 148, 1); 2624 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanPri, 2625 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 149, 3); 2626 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanId, 2627 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 152, 12); 2628 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInPort, 2629 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 165, 6); 2630 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3Routable, 2631 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 171, 1); 2632 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMirrorCopy, 2633 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 172, 1); 2634 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan, 2635 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 173, 16); 2636 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 2637 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 173, 12); 2638 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi, 2639 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 185, 1); 2640 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri, 2641 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 186, 3); 2642 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVlanFormat, 2643 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 189, 2); 2644 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstHiGig, 2645 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 191, 1); 2646 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassPort, 2647 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 192, 8); 2648 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOutPort, 2649 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 200, 6); 2650 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpType, 2651 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 206, 4); 2652 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDrop, 2653 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 210, 1); 2654 2655 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4Ports, 2656 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 0, 1); 2657 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIntPriority, 2658 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 8, 4); 2659 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyColor, 2660 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 12, 2); 2661 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpFrag, 2662 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 14, 2); 2663 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTcpControl, 2664 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 16, 6); 2665 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4DstPort, 2666 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 22, 16); 2667 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4SrcPort, 2668 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 38, 16); 2669 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTtl, 2670 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 54, 8); 2671 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol, 2672 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 62, 8); 2673 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstIp, 2674 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 70, 32); 2675 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcIp, 2676 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 102, 32); 2677 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTos, 2678 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 134, 8); 2679 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyHiGigProxy, 2680 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 142, 1); 2681 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyHiGig, 2682 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 143, 1); 2683 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanId, 2684 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 152, 12); 2685 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInPort, 2686 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 165, 6); 2687 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3Routable, 2688 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 171, 1); 2689 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMirrorCopy, 2690 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 172, 1); 2691 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan, 2692 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 173, 16); 2693 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 2694 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 173, 12); 2695 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi, 2696 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 185, 1); 2697 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri, 2698 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 186, 3); 2699 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVlanFormat, 2700 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 189, 2); 2701 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstHiGig, 2702 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 191, 1); 2703 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassPort, 2704 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 192, 8); 2705 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOutPort, 2706 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 200, 6); 2707 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpType, 2708 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 206, 4); 2709 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDrop, 2710 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 210, 1); 2711 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIp4, 2712 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 0, 0); 2713 2714 /* KEY1 without v4 specific fields. */ 2715 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4Ports, 2716 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 0, 1); 2717 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIntPriority, 2718 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 8, 4); 2719 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyColor, 2720 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 12, 2); 2721 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTcpControl, 2722 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 16, 6); 2723 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4DstPort, 2724 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 22, 16); 2725 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4SrcPort, 2726 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 38, 16); 2727 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTtl, 2728 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 54, 8); 2729 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol, 2730 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 62, 8); 2731 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTos, 2732 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 134, 8); 2733 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyHiGigProxy, 2734 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 142, 1); 2735 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyHiGig, 2736 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 143, 1); 2737 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanId, 2738 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 152, 12); 2739 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInPort, 2740 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 165, 6); 2741 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3Routable, 2742 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 171, 1); 2743 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMirrorCopy, 2744 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 172, 1); 2745 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan, 2746 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 173, 16); 2747 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 2748 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 173, 12); 2749 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi, 2750 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 185, 1); 2751 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri, 2752 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 186, 3); 2753 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVlanFormat, 2754 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 189, 2); 2755 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstHiGig, 2756 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 191, 1); 2757 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassPort, 2758 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 192, 8); 2759 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOutPort, 2760 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 200, 6); 2761 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpType, 2762 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 206, 4); 2763 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDrop, 2764 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 210, 1); 2765 2766 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4Ports, 2767 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 0, 1); 2768 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol, 2769 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 6, 8); 2770 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcIp6, 2771 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 2772 _bcmFieldSliceIp6AddrSelect, 2773 _BCM_FIELD_EGRESS_SLICE_V6_KEY_MODE_SIP6, 2774 14, 128); 2775 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstIp6, 2776 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 2777 _bcmFieldSliceIp6AddrSelect, 2778 _BCM_FIELD_EGRESS_SLICE_V6_KEY_MODE_DIP6, 2779 14, 128); 2780 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcIp6High, 2781 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 2782 _bcmFieldSliceIp6AddrSelect, 2783 _BCM_FIELD_EGRESS_SLICE_V6_KEY_MODE_SIP_DIP_64, 2784 14, 64); 2785 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstIp6High, 2786 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 2787 _bcmFieldSliceIp6AddrSelect, 2788 _BCM_FIELD_EGRESS_SLICE_V6_KEY_MODE_SIP_DIP_64, 2789 78, 64); 2790 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTos, 2791 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 142, 8); 2792 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyHiGigProxy, 2793 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 150, 1); 2794 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyHiGig, 2795 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 151, 1); 2796 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanId, 2797 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 152, 12); 2798 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInPort, 2799 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 165, 6); 2800 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3Routable, 2801 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 171, 1); 2802 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMirrorCopy, 2803 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 172, 1); 2804 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan, 2805 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 173, 16); 2806 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 2807 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 173, 12); 2808 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi, 2809 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 185, 1); 2810 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri, 2811 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 186, 3); 2812 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVlanFormat, 2813 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 189, 2); 2814 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstHiGig, 2815 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 191, 1); 2816 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassPort, 2817 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 192, 8); 2818 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOutPort, 2819 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 200, 6); 2820 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpType, 2821 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 206, 4); 2822 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDrop, 2823 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 210, 1); 2824 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIp6, 2825 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 0, 0); 2826 2827 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4Ports, 2828 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 0, 1); 2829 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIntPriority, 2830 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 8, 4); 2831 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyColor, 2832 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 12, 2); 2833 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpFrag, 2834 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 14, 2); 2835 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTcpControl, 2836 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 16, 6); 2837 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4DstPort, 2838 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 22, 16); 2839 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4SrcPort, 2840 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 38, 16); 2841 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTtl, 2842 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 54, 8); 2843 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstIp6, 2844 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 62, 128); 2845 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyExtensionHeaderSubCode, 2846 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 190, 8); 2847 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyExtensionHeaderType, 2848 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 198, 8); 2849 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpType, 2850 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 206, 4); 2851 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDrop, 2852 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 210, 1); 2853 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIp6, 2854 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 0, 0); 2855 2856 return (BCM_E_NONE); 2857 } 2858 2859 /* 2860 * Function: 2861 * _field_tr2_qualifiers_init 2862 * Purpose: 2863 * Initialize device qaualifiers select codes & offsets 2864 * Parameters: 2865 * unit - (IN) BCM device number. 2866 * stage_fc - (IN) Field Processor stage control structure. 2867 * 2868 * Returns: 2869 * BCM_E_NONE 2870 * Notes: 2871 */ 2872 STATIC int 2873 _field_tr2_qualifiers_init(int unit, _field_stage_t *stage_fc) 2874 { 2875 int rv; /* Operation return status. */ 2876 2877 /* Input parameters check. */ 2878 if (NULL == stage_fc) { 2879 return (BCM_E_PARAM); 2880 } 2881 2882 /* Allocated stage qualifiers configuration array. */ 2883 _FP_XGS3_ALLOC(stage_fc->f_qual_arr, 2884 (_bcmFieldQualifyCount * sizeof(_bcm_field_qual_info_t *)), 2885 "Field qualifiers"); 2886 if (NULL == stage_fc->f_qual_arr) { 2887 return (BCM_E_MEMORY); 2888 } 2889 2890 switch (stage_fc->stage_id) { 2891 case _BCM_FIELD_STAGE_INGRESS: 2892 rv = _field_tr2_ingress_qualifiers_init(unit, stage_fc); 2893 break; 2894 case _BCM_FIELD_STAGE_LOOKUP: 2895 rv = _field_tr2_lookup_qualifiers_init(unit, stage_fc); 2896 break; 2897 case _BCM_FIELD_STAGE_EGRESS: 2898 rv = _field_tr2_egress_qualifiers_init(unit, stage_fc); 2899 break; 2900 case _BCM_FIELD_STAGE_EXTERNAL: 2901 rv = _field_tr2_external_qualifiers_init(unit, stage_fc); 2902 break; 2903 default: 2904 sal_free(stage_fc->f_qual_arr); 2905 return (BCM_E_PARAM); 2906 } 2907 return (rv); 2908 } 2909 2910 /* 2911 * Function: 2912 * _bcm_field_tr2_init 2913 * Purpose: 2914 * Perform initializations that are specific to BCM56624. This 2915 * includes initializing the FP field select bit offset tables for FPF[1-3] 2916 * for every stage. 2917 * Parameters: 2918 * unit - (IN) BCM device number. 2919 * fc - (IN) Field Processor control structure. 2920 * 2921 * Returns: 2922 * BCM_E_NONE 2923 * Notes: 2924 */ 2925 int 2926 _bcm_field_tr2_init(int unit, _field_control_t *fc) 2927 { 2928 _field_stage_t *stage_fc; /* Stages iteration pointer */ 2929 2930 /* Input parameters check. */ 2931 if (NULL == fc) { 2932 return (BCM_E_PARAM); 2933 } 2934 2935 stage_fc = fc->stages; 2936 while (stage_fc) { 2937 /* Clear hardware table */ 2938 BCM_IF_ERROR_RETURN(_bcm_field_tr_hw_clear(unit, stage_fc)); 2939 2940 /* Initialize qualifiers info. */ 2941 BCM_IF_ERROR_RETURN(_field_tr2_qualifiers_init(unit, stage_fc)); 2942 2943 if (_BCM_FIELD_STAGE_EXTERNAL == stage_fc->stage_id) { 2944 _bcm_field_tr_external_init(unit, stage_fc); 2945 stage_fc = stage_fc->next; 2946 continue; 2947 } 2948 2949 /* Goto next stage */ 2950 stage_fc = stage_fc->next; 2951 } 2952 2953 /* Initialize the TOS_FN, TTL_FN, TCP_FN tables */ 2954 BCM_IF_ERROR_RETURN(_bcm_field_trx_tcp_ttl_tos_init(unit)); 2955 2956 if (0 == SOC_WARM_BOOT(unit)) { 2957 /* Enable filter processor */ 2958 BCM_IF_ERROR_RETURN(_field_port_filter_enable_set(unit, fc, TRUE)); 2959 2960 /* Enable meter refresh */ 2961 BCM_IF_ERROR_RETURN(_field_meter_refresh_enable_set(unit, fc, TRUE)); 2962 } 2963 2964 /* Initialize the function pointers */ 2965 _field_tr2_functions_init(&fc->functions); 2966 2967 return (BCM_E_NONE); 2968 } 2969 2970 2971 2972 /* 2973 * Function: 2974 * _field_tr2_functions_init 2975 * 2976 * Purpose: 2977 * Set up functions pointers 2978 * 2979 * Parameters: 2980 * stage_fc - (IN/OUT) pointers to stage control block whe the device 2981 * and stage specific functions will be registered. 2982 * 2983 * Returns: 2984 * nothing 2985 * Notes: 2986 */ 2987 STATIC void 2988 _field_tr2_functions_init(_field_funct_t *functions) 2989 { 2990 functions->fp_detach = _bcm_field_tr_detach; 2991 functions->fp_group_install = _bcm_field_fb_group_install; 2992 functions->fp_selcodes_install = _bcm_field_trx_selcodes_install; 2993 functions->fp_slice_clear = _bcm_field_trx_slice_clear; 2994 functions->fp_entry_remove = _bcm_field_fb_entry_remove; 2995 functions->fp_entry_move = _bcm_field_fb_entry_move; 2996 functions->fp_selcode_get = _bcm_field_tr_selcode_get; 2997 functions->fp_selcode_to_qset = _bcm_field_selcode_to_qset; 2998 functions->fp_qual_list_get = _bcm_field_qual_lists_get; 2999 functions->fp_tcam_policy_clear = NULL; 3000 functions->fp_tcam_policy_install = _bcm_field_tr_entry_install; 3001 functions->fp_tcam_policy_reinstall = _bcm_field_tr_entry_reinstall; 3002 functions->fp_policer_install = _bcm_field_trx_policer_install; 3003 functions->fp_write_slice_map = _bcm_field_tr_write_slice_map; 3004 functions->fp_qualify_ip_type = _bcm_field_trx_qualify_ip_type; 3005 functions->fp_qualify_ip_type_get = _bcm_field_trx_qualify_ip_type_get; 3006 functions->fp_action_support_check = _bcm_field_trx_action_support_check; 3007 functions->fp_action_conflict_check = _bcm_field_trx_action_conflict_check; 3008 functions->fp_counter_get = _bcm_field_tr_counter_get; 3009 functions->fp_counter_set = _bcm_field_tr_counter_set; 3010 functions->fp_stat_index_get = _bcm_field_trx_stat_index_get; 3011 functions->fp_action_params_check = _bcm_field_trx_action_params_check; 3012 functions->fp_egress_key_match_type_set = 3013 _bcm_field_trx_egress_key_match_type_set; 3014 functions->fp_external_entry_install = _bcm_field_tr_external_entry_install; 3015 functions->fp_external_entry_reinstall = _bcm_field_tr_external_entry_reinstall; 3016 functions->fp_external_entry_remove = _bcm_field_tr_external_entry_remove; 3017 functions->fp_external_entry_prio_set = _bcm_field_tr_external_entry_prio_set; 3018 functions->fp_data_qualifier_ethertype_add = 3019 _bcm_field_trx2_data_qualifier_ethertype_add; 3020 functions->fp_data_qualifier_ethertype_delete= 3021 _bcm_field_trx2_data_qualifier_ethertype_delete; 3022 functions->fp_data_qualifier_ip_protocol_add = 3023 _bcm_field_trx2_data_qualifier_ip_protocol_add; 3024 functions->fp_data_qualifier_ip_protocol_delete= 3025 _bcm_field_trx2_data_qualifier_ip_protocol_delete; 3026 functions->fp_data_qualifier_packet_format_add= 3027 _bcm_field_trx2_data_qualifier_packet_format_add; 3028 functions->fp_data_qualifier_packet_format_delete= 3029 _bcm_field_trx2_data_qualifier_packet_format_delete; 3030 functions->fp_stat_value_get = NULL; 3031 functions->fp_stat_value_set = NULL; 3032 functions->fp_control_set = _bcm_field_control_set; 3033 functions->fp_control_get = _bcm_field_control_get; 3034 functions->fp_stat_hw_mode_get = _bcm_field_stat_hw_mode_get; 3035 functions->fp_stat_hw_alloc = _bcm_field_stat_hw_alloc; 3036 functions->fp_stat_hw_free = _bcm_field_stat_hw_free; 3037 functions->fp_group_add = NULL; 3038 functions->fp_qualify_trunk = _bcm_field_qualify_trunk; 3039 functions->fp_qualify_trunk_get = _bcm_field_qualify_trunk_get; 3040 functions->fp_qualify_inports = _bcm_field_qualify_InPorts; 3041 functions->fp_entry_stat_extended_attach = NULL; 3042 functions->fp_entry_stat_extended_get = NULL; 3043 functions->fp_entry_stat_detach = _bcm_field_entry_stat_detach; 3044 functions->fp_class_size_get = NULL; 3045 functions->fp_qualify_packet_res = _field_qualify_PacketRes; 3046 functions->fp_qualify_packet_res_get = _field_qualify_PacketRes_get; 3047 } 3048 3049 /* 3050 * Function: 3051 * _bcm_field_tr2_stat_hw_mode_to_bmap 3052 * 3053 * Description: 3054 * HW counter mode to statistics bitmap. 3055 * Parameters: 3056 * unit - (IN) BCM device number. 3057 * mode - (IN) HW counter mode. 3058 * stage_id - (IN) Stage id. 3059 * hw_bmap - (OUT) Statistics bitmap. 3060 * hw_entry_count - (OUT) Number of counters required. 3061 * Returns: 3062 * BCM_E_XXX 3063 */ 3064 int 3065 _bcm_field_tr2_stat_hw_mode_to_bmap(int unit, uint16 mode, 3066 _field_stage_id_t stage_id, 3067 uint32 *hw_bmap, uint8 *hw_entry_count) 3068 { 3069 uint32 value = 0; 3070 /* Input parameters check. */ 3071 if ((NULL == hw_bmap) || (NULL == hw_entry_count)) { 3072 return (BCM_E_PARAM); 3073 } 3074 switch (mode) { 3075 case 1: 3076 if (_BCM_FIELD_STAGE_EXTERNAL == stage_id) { 3077 value |= (1 << (int)bcmFieldStatGreenBytes); 3078 value |= (1 << (int)bcmFieldStatGreenPackets); 3079 } else { 3080 value |= (1 << (int)bcmFieldStatBytes); 3081 value |= (1 << (int)bcmFieldStatPackets); 3082 } 3083 *hw_entry_count = 1; 3084 break; 3085 case 2: 3086 if (_BCM_FIELD_STAGE_EXTERNAL == stage_id) { 3087 value |= (1 << (int)bcmFieldStatYellowBytes); 3088 value |= (1 << (int)bcmFieldStatYellowPackets); 3089 } else { 3090 value |= (1 << (int)bcmFieldStatPackets); 3091 value |= (1 << (int)bcmFieldStatBytes); 3092 } 3093 *hw_entry_count = 1; 3094 break; 3095 case 3: 3096 if (_BCM_FIELD_STAGE_EXTERNAL == stage_id) { 3097 value |= (1 << (int)bcmFieldStatNotRedBytes); 3098 value |= (1 << (int)bcmFieldStatNotRedPackets); 3099 *hw_entry_count = 1; 3100 } else { 3101 value |= (1 << (int)bcmFieldStatRedBytes); 3102 value |= (1 << (int)bcmFieldStatRedPackets); 3103 value |= (1 << (int)bcmFieldStatNotRedBytes); 3104 value |= (1 << (int)bcmFieldStatNotRedPackets); 3105 *hw_entry_count = 2; 3106 } 3107 break; 3108 case 4: 3109 if (_BCM_FIELD_STAGE_EXTERNAL == stage_id) { 3110 value |= (1 << (int)bcmFieldStatRedBytes); 3111 value |= (1 << (int)bcmFieldStatRedPackets); 3112 *hw_entry_count = 1; 3113 } else { 3114 value |= (1 << (int)bcmFieldStatGreenBytes); 3115 value |= (1 << (int)bcmFieldStatGreenPackets); 3116 value |= (1 << (int)bcmFieldStatNotGreenBytes); 3117 value |= (1 << (int)bcmFieldStatNotGreenPackets); 3118 *hw_entry_count = 2; 3119 } 3120 break; 3121 case 5: 3122 if (_BCM_FIELD_STAGE_EXTERNAL == stage_id) { 3123 value |= (1 << (int)bcmFieldStatNotYellowBytes); 3124 value |= (1 << (int)bcmFieldStatNotYellowPackets); 3125 *hw_entry_count = 1; 3126 } else { 3127 value |= (1 << (int)bcmFieldStatGreenBytes); 3128 value |= (1 << (int)bcmFieldStatGreenPackets); 3129 value |= (1 << (int)bcmFieldStatRedBytes); 3130 value |= (1 << (int)bcmFieldStatRedPackets); 3131 value |= (1 << (int)bcmFieldStatNotYellowBytes); 3132 value |= (1 << (int)bcmFieldStatNotYellowPackets); 3133 *hw_entry_count = 2; 3134 } 3135 break; 3136 case 6: 3137 if (_BCM_FIELD_STAGE_EXTERNAL == stage_id) { 3138 value |= (1 << (int)bcmFieldStatNotGreenBytes); 3139 value |= (1 << (int)bcmFieldStatNotGreenPackets); 3140 *hw_entry_count = 1; 3141 } else { 3142 value |= (1 << (int)bcmFieldStatGreenBytes); 3143 value |= (1 << (int)bcmFieldStatGreenPackets); 3144 value |= (1 << (int)bcmFieldStatYellowBytes); 3145 value |= (1 << (int)bcmFieldStatYellowPackets); 3146 value |= (1 << (int)bcmFieldStatNotRedBytes); 3147 value |= (1 << (int)bcmFieldStatNotRedPackets); 3148 *hw_entry_count = 2; 3149 } 3150 break; 3151 case 7: 3152 if (_BCM_FIELD_STAGE_EXTERNAL == stage_id) { 3153 value |= (1 << (int)bcmFieldStatBytes); 3154 value |= (1 << (int)bcmFieldStatPackets); 3155 *hw_entry_count = 1; 3156 } else { 3157 value |= (1 << (int)bcmFieldStatRedBytes); 3158 value |= (1 << (int)bcmFieldStatRedPackets); 3159 value |= (1 << (int)bcmFieldStatYellowBytes); 3160 value |= (1 << (int)bcmFieldStatYellowPackets); 3161 value |= (1 << (int)bcmFieldStatNotGreenBytes); 3162 value |= (1 << (int)bcmFieldStatNotGreenPackets); 3163 *hw_entry_count = 2; 3164 } 3165 break; 3166 default: 3167 *hw_entry_count = 0; 3168 } 3169 *hw_bmap = value; 3170 return (BCM_E_NONE); 3171 } 3172 3173 #else /* BCM_TRIUMPH2_SUPPORT && BCM_FIELD_SUPPORT */ 3174 int _triumph2_field_not_empty; 3175 #endif /* BCM_TRIUMPH2_SUPPORT && BCM_FIELD_SUPPORT */