openbcm

Git mirror of https://github.com/Broadcom-Network-Switching-Software/OpenBCM
git clone git://git.finwo.net/mirror/broadcom/openbcm
Log | Files | Refs | README

field.c (108553B)


      1 /*
      2  * 
      3  *
      4  * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file.
      5  * 
      6  * Copyright 2007-2019 Broadcom Inc. All rights reserved.
      7  */
      8 
      9 #include <soc/defs.h>
     10 #if defined(BCM_HURRICANE3_SUPPORT) && defined(BCM_FIELD_SUPPORT)
     11 
     12 #include <soc/mem.h>
     13 #include <soc/drv.h>
     14 
     15 #include <bcm/error.h>
     16 #include <bcm/l3.h>
     17 #include <bcm/field.h>
     18 #include <bcm/tunnel.h>
     19 
     20 #include <bcm_int/esw_dispatch.h>
     21 
     22 #include <bcm_int/esw/field.h>
     23 #include <bcm_int/esw/l3.h>
     24 #include <bcm_int/esw/firebolt.h>
     25 #include <bcm_int/esw/trx.h>
     26 #include <bcm_int/esw/enduro.h>
     27 #include <bcm_int/esw/triumph.h>
     28 #include <bcm_int/esw/triumph2.h>
     29 #include <bcm_int/esw/hurricane2.h>
     30 #include <bcm_int/esw/greyhound.h>
     31 
     32 
     33 
     34 /* local/static function prototypes */
     35 STATIC void _field_hr3_functions_init(_field_funct_t *functions) ;
     36 
     37 /*
     38  * Function:
     39  *     _field_hr3_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_hr3_ingress_qualifiers_init(int unit, _field_stage_t *stage_fc)
     52 {
     53     _FP_QUAL_DECL;
     54 
     55     /* Input parameters check. */
     56     if (NULL == stage_fc) {
     57         return (BCM_E_PARAM);
     58     }
     59 
     60     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyStage,
     61                  _bcmFieldSliceSelDisable, 0, 0, 0);
     62     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyStageIngress,
     63                  _bcmFieldSliceSelDisable, 0, 0, 0);
     64     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIp4,
     65                  _bcmFieldSliceSelDisable, 0, 0, 0);
     66     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIp6,
     67                  _bcmFieldSliceSelDisable, 0, 0, 0);
     68     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInPort,
     69                  _bcmFieldSliceSelDisable, 0, 0, 0);
     70     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInPorts,
     71                  _bcmFieldSliceSelDisable, 0, 0, 0);
     72 
     73     /* Single wide Fixed */
     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                  
     79     /* SVP_OR_L3IIF no support */
     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     /* TUNNEL_TYPE_LOOPBACK_TYPE no support */
     87     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDrop,
     88                  _bcmFieldSliceSelDisable, 0, 22, 1);
     89     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMirrorCopy,
     90                  _bcmFieldSliceSelDisable, 0, 23, 1);
     91     if (soc_feature(unit, soc_feature_miml)) {
     92         _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMimlPkt,
     93                      _bcmFieldSliceSelDisable, 0, 24, 1);
     94     }
     95     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyCustomHeaderPkt,
     96                  _bcmFieldSliceSelDisable, 0, 25, 1);
     97     
     98 
     99     /* FPF3 primary slice single wide. */
    100     /* F3_0 */
    101     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL2,
    102                                _bcmFieldSliceSelFpf3, 0,
    103                                _bcmFieldSliceDstClassSelect, 0, 26, 6);
    104     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL3,
    105                                _bcmFieldSliceSelFpf3, 0,
    106                                _bcmFieldSliceDstClassSelect, 1, 26, 6);
    107     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField,
    108                                _bcmFieldSliceSelFpf3, 0,
    109                                _bcmFieldSliceDstClassSelect, 2, 26, 6);
    110     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField,
    111                                _bcmFieldSliceSelFpf3, 0,
    112                                _bcmFieldSliceDstClassSelect, 3, 26, 6);
    113     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL2,
    114                                _bcmFieldSliceSelFpf3, 0,
    115                                _bcmFieldSliceSrcClassSelect, 0, 32, 6);
    116     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL3,
    117                                _bcmFieldSliceSelFpf3, 0,
    118                                _bcmFieldSliceSrcClassSelect, 1, 32, 6);
    119     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField,
    120                                _bcmFieldSliceSelFpf3, 0,
    121                                _bcmFieldSliceSrcClassSelect, 2, 32, 6);
    122     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField,
    123                                _bcmFieldSliceSelFpf3, 0,
    124                                _bcmFieldSliceSrcClassSelect, 3, 32, 6);
    125     /* VRF and VFI are not supported in ForwardingField */
    126     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 
    127                                bcmFieldQualifyForwardingVlanId,
    128                                _bcmFieldSliceSelFpf3, 0,
    129                                _bcmFieldSliceFwdFieldSelect, 
    130                                _bcmFieldFwdFieldVlan, 38, 12);
    131     /* SVP and L3IIF are not supported in SVP_L3IIF_OVERLAY */
    132 
    133     /* F3_1 */
    134     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL2,
    135                                _bcmFieldSliceSelFpf3, 1,
    136                                _bcmFieldSliceDstClassSelect, 0, 26, 6);
    137     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL3,
    138                                _bcmFieldSliceSelFpf3, 1,
    139                                _bcmFieldSliceDstClassSelect, 1, 26, 6);
    140     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField,
    141                                _bcmFieldSliceSelFpf3, 1,
    142                                _bcmFieldSliceDstClassSelect, 2, 26, 6);
    143     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField,
    144                                _bcmFieldSliceSelFpf3, 1,
    145                                _bcmFieldSliceDstClassSelect, 3, 26, 6);
    146     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL2,
    147                                _bcmFieldSliceSelFpf3, 1,
    148                                _bcmFieldSliceSrcClassSelect, 0, 32, 6);
    149     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL3,
    150                                _bcmFieldSliceSelFpf3, 1,
    151                                _bcmFieldSliceSrcClassSelect, 1, 32, 6);
    152     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField,
    153                                _bcmFieldSliceSelFpf3, 1,
    154                                _bcmFieldSliceSrcClassSelect, 2, 32, 6);
    155     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField,
    156                                _bcmFieldSliceSelFpf3, 1,
    157                                _bcmFieldSliceSrcClassSelect, 3, 32, 6);
    158     /* VRF and VFI are not supported in ForwardingField */
    159     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 
    160                                bcmFieldQualifyForwardingVlanId,
    161                                _bcmFieldSliceSelFpf3, 1,
    162                                _bcmFieldSliceFwdFieldSelect, 
    163                                _bcmFieldFwdFieldVlan, 38, 12);
    164     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId,
    165                  _bcmFieldSliceSelFpf3, 1, 50, 12);
    166 
    167 
    168     /* F3_2 */
    169     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstPort,
    170                                _bcmFieldSliceSelFpf3, 2,
    171                                _bcmFieldSliceDstFwdEntitySelect,
    172                                _bcmFieldFwdEntityGlp, 26, 18);
    173     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstTrunk,
    174                                _bcmFieldSliceSelFpf3, 2,
    175                                _bcmFieldSliceDstFwdEntitySelect,
    176                                _bcmFieldFwdEntityGlp, 26, 18);
    177     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstL3Egress,
    178                                _bcmFieldSliceSelFpf3, 2,
    179                                _bcmFieldSliceDstFwdEntitySelect,
    180                                _bcmFieldFwdEntityL3Egress, 26, 18);
    181     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstL3EgressNextHops,
    182                                _bcmFieldSliceSelFpf3, 2,
    183                                _bcmFieldSliceDstFwdEntitySelect,
    184                                _bcmFieldFwdEntityL3Egress, 26, 18);
    185     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMulticastGroup,
    186                                _bcmFieldSliceSelFpf3, 2,
    187                                _bcmFieldSliceDstFwdEntitySelect,
    188                                _bcmFieldFwdEntityMulticastGroup, 26, 18);
    189     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcPort,
    190                                _bcmFieldSliceSelFpf3, 2,
    191                                _bcmFieldSliceSrcEntitySelect,
    192                                _bcmFieldFwdEntityGlp, 44, 15);
    193     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcTrunk,
    194                                _bcmFieldSliceSelFpf3, 2,
    195                                _bcmFieldSliceSrcEntitySelect,
    196                                _bcmFieldFwdEntityGlp, 44, 15);
    197     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcModPortGport,
    198                                _bcmFieldSliceSelFpf3, 2,
    199                                _bcmFieldSliceSrcEntitySelect,
    200                                _bcmFieldFwdEntityModPortGport, 44, 15);
    201     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcModuleGport,
    202                                _bcmFieldSliceSelFpf3, 2,
    203                                _bcmFieldSliceSrcEntitySelect,
    204                                _bcmFieldFwdEntityModPortGport, 50, 8);
    205     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTrunkMemberSourceModuleId,
    206                                _bcmFieldSliceSelFpf3, 2,
    207                                _bcmFieldSliceSrcEntitySelect,
    208                                _bcmFieldFwdEntityModPortGport, 50, 8);
    209     /* SVP_VALID  */
    210     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMHOpcode,
    211                  _bcmFieldSliceSelFpf3, 2, 60, 3);
    212 
    213     /* F3_3 */
    214     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan,
    215                  _bcmFieldSliceSelFpf3, 3, 26, 16);
    216     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId,
    217                  _bcmFieldSliceSelFpf3, 3, 26, 12);
    218     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi,
    219                  _bcmFieldSliceSelFpf3, 3, 38, 1);
    220     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri,
    221                  _bcmFieldSliceSelFpf3, 3, 39, 3);
    222     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVlanFormat,
    223                  _bcmFieldSliceSelFpf3, 3, 42, 2);
    224     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2Format,
    225                  _bcmFieldSliceSelFpf3, 3, 44, 2);
    226     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTranslatedVlanFormat,
    227                  _bcmFieldSliceSelFpf3, 3, 46, 2);
    228     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMHOpcode,
    229                  _bcmFieldSliceSelFpf3, 3, 48, 3);
    230     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyPacketRes,
    231                  _bcmFieldSliceSelFpf3, 3, 51, 5);
    232     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpInfo,
    233                  _bcmFieldSliceSelFpf3, 3, 56, 3);
    234 
    235     /* F3_4 */
    236     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan,
    237                  _bcmFieldSliceSelFpf3, 4, 26, 16);
    238     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId,
    239                  _bcmFieldSliceSelFpf3, 4, 26, 12);
    240     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi,
    241                  _bcmFieldSliceSelFpf3, 4, 38, 1);
    242     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri,
    243                  _bcmFieldSliceSelFpf3, 4, 39, 3);
    244     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlan,
    245                  _bcmFieldSliceSelFpf3, 4, 42, 16);
    246     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanId,
    247                  _bcmFieldSliceSelFpf3, 4, 42, 12);
    248     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanCfi,
    249                  _bcmFieldSliceSelFpf3, 4, 54, 1);
    250     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanPri,
    251                  _bcmFieldSliceSelFpf3, 4, 55, 3);
    252 
    253     /* F3_5 */
    254     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan,
    255                  _bcmFieldSliceSelFpf3, 5, 26, 16);
    256     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId,
    257                  _bcmFieldSliceSelFpf3, 5, 26, 12);
    258     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi,
    259                  _bcmFieldSliceSelFpf3, 5, 38, 1);
    260     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri,
    261                  _bcmFieldSliceSelFpf3, 5, 39, 3);
    262     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyEtherType,
    263                  _bcmFieldSliceSelFpf3, 5, 42, 16);
    264 
    265     /* F3_6 */
    266     /* MPLS Terminated is not supported */
    267     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVlanTranslationHit,
    268                  _bcmFieldSliceSelFpf3, 6, 27, 1);
    269     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyForwardingVlanValid,
    270                  _bcmFieldSliceSelFpf3, 6, 28, 1);
    271     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIngressStpState,
    272                  _bcmFieldSliceSelFpf3, 6, 29, 2);
    273     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2SrcHit,
    274                  _bcmFieldSliceSelFpf3, 6, 31, 1);
    275     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2SrcStatic,
    276                  _bcmFieldSliceSelFpf3, 6, 32, 1);
    277     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2DestHit,
    278                  _bcmFieldSliceSelFpf3, 6, 33, 1);
    279     /* OUTER_LABEL_POP */
    280     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2CacheHit,
    281                  _bcmFieldSliceSelFpf3, 6, 35, 1);
    282     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3SrcHostHit,
    283                  _bcmFieldSliceSelFpf3, 6, 36, 1);
    284     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3DestHostHit,
    285                  _bcmFieldSliceSelFpf3, 6, 37, 1);
    286     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpmcStarGroupHit,
    287                  _bcmFieldSliceSelFpf3, 6, 38, 1);
    288     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3DestRouteHit,
    289                  _bcmFieldSliceSelFpf3, 6, 39, 1);
    290     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2StationMove,
    291                  _bcmFieldSliceSelFpf3, 6, 40, 1);
    292     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDosAttack,
    293                  _bcmFieldSliceSelFpf3, 6, 41, 1);
    294     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlan,
    295                  _bcmFieldSliceSelFpf3, 6, 42, 16);
    296     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanId,
    297                  _bcmFieldSliceSelFpf3, 6, 42, 12);
    298     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanCfi,
    299                  _bcmFieldSliceSelFpf3, 6, 54, 1);
    300     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanPri,
    301                  _bcmFieldSliceSelFpf3, 6, 55, 3);
    302 
    303     /* F3_7 */
    304     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyRangeCheck,
    305                  _bcmFieldSliceSelFpf3, 7, 26, 24);
    306     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassPort,
    307                                _bcmFieldSliceSelFpf3, 7,
    308                                _bcmFieldSliceIntfClassSelect, 0, 50, 8);
    309     /* bcmFieldQualifyInterfaceClassL3 is not supported */
    310     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassL2,
    311                                _bcmFieldSliceSelFpf3, 7,
    312                                _bcmFieldSliceIntfClassSelect, 2, 50, 8);
    313 
    314     /* F3_8 */
    315     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIp6FlowLabel,
    316                  _bcmFieldSliceSelFpf3, 8, 26, 20);
    317     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVlanFormat,
    318                  _bcmFieldSliceSelFpf3, 8, 46, 2);
    319     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2Format,
    320                  _bcmFieldSliceSelFpf3, 8, 48, 2);
    321     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTranslatedVlanFormat,
    322                  _bcmFieldSliceSelFpf3, 8, 50, 2);
    323     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerTpid,
    324                  _bcmFieldSliceSelFpf3, 8, 52, 2);
    325     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterTpid,
    326                  _bcmFieldSliceSelFpf3, 8, 54, 2);
    327     /* F3_9 */
    328     _FP_QUAL_ADD(unit, stage_fc, _bcmFieldQualifyData3,
    329                  _bcmFieldSliceSelFpf3, 9, 26, 32);
    330     
    331     /* F3_10 */
    332     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstPort,
    333                                _bcmFieldSliceSelFpf3, 10,
    334                                _bcmFieldSliceDstFwdEntitySelect,
    335                                _bcmFieldFwdEntityGlp, 26, 18);
    336     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstTrunk,
    337                                _bcmFieldSliceSelFpf3, 10,
    338                                _bcmFieldSliceDstFwdEntitySelect,
    339                                _bcmFieldFwdEntityGlp, 26, 18);
    340     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstL3Egress,
    341                                _bcmFieldSliceSelFpf3, 10,
    342                                _bcmFieldSliceDstFwdEntitySelect,
    343                                _bcmFieldFwdEntityL3Egress, 26, 18);
    344     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstL3EgressNextHops,
    345                                _bcmFieldSliceSelFpf3, 10,
    346                                _bcmFieldSliceDstFwdEntitySelect,
    347                                _bcmFieldFwdEntityL3Egress, 26, 18);
    348     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMulticastGroup,
    349                                _bcmFieldSliceSelFpf3, 10,
    350                                _bcmFieldSliceDstFwdEntitySelect,
    351                                _bcmFieldFwdEntityMulticastGroup, 26, 18);
    352     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstPort,
    353                  _bcmFieldSliceSelFpf3, 10, 44, 15);
    354     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstTrunk,
    355                  _bcmFieldSliceSelFpf3, 10, 44, 15);
    356     
    357     /* F3_11 */
    358     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcPort,
    359                  _bcmFieldSliceSelFpf3, 11, 26, 15);
    360     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcTrunk,
    361                  _bcmFieldSliceSelFpf3, 11, 26, 15);
    362     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcModPortGport,
    363                  _bcmFieldSliceSelFpf3, 11, 26, 15);
    364     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcModuleGport,
    365                  _bcmFieldSliceSelFpf3, 11, 32, 8);
    366     
    367     /* F3_12 */
    368     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVnTag,
    369                                _bcmFieldSliceSelFpf3, 12,
    370                                _bcmFieldSliceAuxTag2Select,
    371                                _bcmFieldAuxTagVn, 26, 33);
    372     if (soc_feature(unit, soc_feature_miml)) {
    373         _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyMimlInnerTag,
    374                                    _bcmFieldSliceSelFpf3, 12,
    375                                    _bcmFieldSliceAuxTag2Select,
    376                                    _bcmFieldAuxTagMimlHeader, 26, 33);
    377     }
    378     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyCustomHeaderData,
    379                                _bcmFieldSliceSelFpf3, 12,
    380                                _bcmFieldSliceAuxTag2Select,
    381                                _bcmFieldAuxTagCustomHeader, 26, 33);
    382     
    383     _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadL4HdrParseable,
    384                      _bcmFieldDevSelDisable, 0,
    385                      _bcmFieldSliceSelFpf3, 12,
    386                      _bcmFieldSliceAuxTag2Select, _bcmFieldAuxTagCapwapInfo,
    387                      0,
    388                      26, 1,
    389                      58, 1,
    390                      0,  0,
    391                      0
    392                      );
    393     _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadL3HdrParseable,
    394                      _bcmFieldDevSelDisable, 0,
    395                      _bcmFieldSliceSelFpf3, 12,
    396                      _bcmFieldSliceAuxTag2Select, _bcmFieldAuxTagCapwapInfo,
    397                      0,
    398                      27, 1,
    399                      58, 1,
    400                      0,  0,
    401                      0
    402                      );
    403     _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadInnerVlan,
    404                      _bcmFieldDevSelDisable, 0,
    405                      _bcmFieldSliceSelFpf3, 12,
    406                      _bcmFieldSliceAuxTag2Select, _bcmFieldAuxTagCapwapInfo,
    407                      0,
    408                      28, 16,
    409                      58, 1,
    410                      0,  0,
    411                      0
    412                      );
    413     _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadInnerVlanId,
    414                      _bcmFieldDevSelDisable, 0,
    415                      _bcmFieldSliceSelFpf3, 12,
    416                      _bcmFieldSliceAuxTag2Select, _bcmFieldAuxTagCapwapInfo,
    417                      0,
    418                      28, 12,
    419                      58, 1,
    420                      0,  0,
    421                      0
    422                      );
    423     _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadInnerVlanCfi,
    424                      _bcmFieldDevSelDisable, 0,
    425                      _bcmFieldSliceSelFpf3, 12,
    426                      _bcmFieldSliceAuxTag2Select, _bcmFieldAuxTagCapwapInfo,
    427                      0,
    428                      40, 1,
    429                      58, 1,
    430                      0,  0,
    431                      0
    432                      );
    433     _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadInnerVlanPri,
    434                      _bcmFieldDevSelDisable, 0,
    435                      _bcmFieldSliceSelFpf3, 12,
    436                      _bcmFieldSliceAuxTag2Select, _bcmFieldAuxTagCapwapInfo,
    437                      0,
    438                      41, 3,
    439                      58, 1,
    440                      0,  0,
    441                      0
    442                      );
    443     _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadVlanFormat,
    444                      _bcmFieldDevSelDisable, 0,
    445                      _bcmFieldSliceSelFpf3, 12,
    446                      _bcmFieldSliceAuxTag2Select, _bcmFieldAuxTagCapwapInfo,
    447                      0,
    448                      44, 2,
    449                      58, 1,
    450                      0,  0,
    451                      0
    452                      );
    453     _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadSOF,
    454                      _bcmFieldDevSelDisable, 0,
    455                      _bcmFieldSliceSelFpf3, 12,
    456                      _bcmFieldSliceAuxTag2Select, _bcmFieldAuxTagCapwapInfo,
    457                      0,
    458                      46, 1,
    459                      58, 1,
    460                      0,  0,
    461                      0
    462                      );
    463     _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyCapwapHdrType,
    464                      _bcmFieldDevSelDisable, 0,
    465                      _bcmFieldSliceSelFpf3, 12,
    466                      _bcmFieldSliceAuxTag2Select, _bcmFieldAuxTagCapwapInfo,
    467                      0,
    468                      47, 1,
    469                      58, 1,
    470                      0,  0,
    471                      0
    472                      );
    473     _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyCapwapHdrRid,
    474                      _bcmFieldDevSelDisable, 0,
    475                      _bcmFieldSliceSelFpf3, 12,
    476                      _bcmFieldSliceAuxTag2Select, _bcmFieldAuxTagCapwapInfo,
    477                      0,
    478                      48, 5,
    479                      58, 1,
    480                      0,  0,
    481                      0
    482                      );
    483     
    484     /* FPF2 */
    485     /* F2_0 */
    486     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTtl,
    487                  _bcmFieldSliceSelFpf2, 0,
    488                  _bcmFieldSliceTtlClassSelect, 0,
    489                  63, 8);
    490     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTtlClassZero,
    491                  _bcmFieldSliceSelFpf2, 0,
    492                  _bcmFieldSliceTtlClassSelect, 0,
    493                  63, 8);
    494     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTtlClassOne,
    495                  _bcmFieldSliceSelFpf2, 0,
    496                  _bcmFieldSliceTtlClassSelect, 1,
    497                  63, 8);
    498     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTcpControl,
    499                  _bcmFieldSliceSelFpf2, 0,
    500                  _bcmFieldSliceTcpClassSelect, 0,
    501                  71, 6);
    502     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTcpClassZero,
    503                  _bcmFieldSliceSelFpf2, 0,
    504                  _bcmFieldSliceTcpClassSelect, 0,
    505                  71, 6);
    506     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTcpClassOne,
    507                  _bcmFieldSliceSelFpf2, 0,
    508                  _bcmFieldSliceTcpClassSelect, 1,
    509                  71, 6);
    510     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpFlags,
    511                  _bcmFieldSliceSelFpf2, 0, 77, 2);
    512     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTos,
    513                  _bcmFieldSliceSelFpf2, 0,
    514                  _bcmFieldSliceTosClassSelect, 0,
    515                  79, 8);
    516     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTosClassZero,
    517                  _bcmFieldSliceSelFpf2, 0,
    518                  _bcmFieldSliceTosClassSelect, 0,
    519                  79, 8);
    520     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTosClassOne,
    521                  _bcmFieldSliceSelFpf2, 0,
    522                  _bcmFieldSliceTosClassSelect, 1,
    523                  79, 8);
    524     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4DstPort,
    525                  _bcmFieldSliceSelFpf2, 0, 87, 16);
    526     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4SrcPort,
    527                  _bcmFieldSliceSelFpf2, 0, 103, 16);
    528     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol,
    529                  _bcmFieldSliceSelFpf2, 0, 119, 8);
    530     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstIp,
    531                  _bcmFieldSliceSelFpf2, 0, 127, 32);
    532     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcIp,
    533                  _bcmFieldSliceSelFpf2, 0, 159, 32);
    534 
    535     /* F2_1 */
    536     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTtl,
    537                  _bcmFieldSliceSelFpf2, 1,
    538                  _bcmFieldSliceTtlClassSelect, 0,
    539                  63, 8);
    540     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTtlClassZero,
    541                  _bcmFieldSliceSelFpf2, 1,
    542                  _bcmFieldSliceTtlClassSelect, 0,
    543                  63, 8);
    544     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTtlClassOne,
    545                  _bcmFieldSliceSelFpf2, 1,
    546                  _bcmFieldSliceTtlClassSelect, 1,
    547                  63, 8);
    548     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTcpControl,
    549                  _bcmFieldSliceSelFpf2, 1,
    550                  _bcmFieldSliceTcpClassSelect, 0,
    551                  71, 6);
    552     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTcpClassZero,
    553                  _bcmFieldSliceSelFpf2, 1,
    554                  _bcmFieldSliceTcpClassSelect, 0,
    555                  71, 6);
    556     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTcpClassOne,
    557                  _bcmFieldSliceSelFpf2, 1,
    558                  _bcmFieldSliceTcpClassSelect, 1,
    559                  71, 6);
    560     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpFrag,
    561                  _bcmFieldSliceSelFpf2, 1, 77, 2);
    562     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTos,
    563                  _bcmFieldSliceSelFpf2, 1,
    564                  _bcmFieldSliceTosClassSelect, 0,
    565                  79, 8);
    566     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTosClassZero,
    567                  _bcmFieldSliceSelFpf2, 1,
    568                  _bcmFieldSliceTosClassSelect, 0,
    569                  79, 8);
    570     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTosClassOne,
    571                  _bcmFieldSliceSelFpf2, 1,
    572                  _bcmFieldSliceTosClassSelect, 1,
    573                  79, 8);
    574     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4DstPort,
    575                  _bcmFieldSliceSelFpf2, 1, 87, 16);
    576     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4SrcPort,
    577                  _bcmFieldSliceSelFpf2, 1, 103, 16);
    578     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol,
    579                  _bcmFieldSliceSelFpf2, 1, 119, 8);
    580     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstIp,
    581                  _bcmFieldSliceSelFpf2, 1, 127, 32);
    582     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcIp,
    583                  _bcmFieldSliceSelFpf2, 1, 159, 32);
    584 
    585     /* F2_2 */
    586     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcIp6,
    587                  _bcmFieldSliceSelFpf2, 2, 63, 128);
    588 
    589     /* F2_3 */
    590     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstIp6,
    591                  _bcmFieldSliceSelFpf2, 3, 63, 128);
    592 
    593     /* F2_4 */
    594     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTtl,
    595                  _bcmFieldSliceSelFpf2, 4,
    596                  _bcmFieldSliceTtlClassSelect, 0,
    597                  63, 8);
    598     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTtlClassZero,
    599                  _bcmFieldSliceSelFpf2, 4,
    600                  _bcmFieldSliceTtlClassSelect, 0,
    601                  63, 8);
    602     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTtlClassOne,
    603                  _bcmFieldSliceSelFpf2, 4,
    604                  _bcmFieldSliceTtlClassSelect, 1,
    605                  63, 8);
    606     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTcpControl,
    607                  _bcmFieldSliceSelFpf2, 4,
    608                  _bcmFieldSliceTcpClassSelect, 0,
    609                  71, 6);
    610     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTcpClassZero,
    611                  _bcmFieldSliceSelFpf2, 4,
    612                  _bcmFieldSliceTcpClassSelect, 0,
    613                  71, 6);
    614     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTcpClassOne,
    615                  _bcmFieldSliceSelFpf2, 4,
    616                  _bcmFieldSliceTcpClassSelect, 1,
    617                  71, 6);
    618     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIp6FlowLabel,
    619                  _bcmFieldSliceSelFpf2, 4, 77, 20);
    620     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTos,
    621                  _bcmFieldSliceSelFpf2, 4,
    622                  _bcmFieldSliceTosClassSelect, 0,
    623                  97, 8);
    624     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTosClassZero,
    625                  _bcmFieldSliceSelFpf2, 4,
    626                  _bcmFieldSliceTosClassSelect, 0,
    627                  97, 8);
    628     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTosClassOne,
    629                  _bcmFieldSliceSelFpf2, 4,
    630                  _bcmFieldSliceTosClassSelect, 1,
    631                  97, 8);
    632     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol,
    633                  _bcmFieldSliceSelFpf2, 4, 105, 8);
    634     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIntCongestionNotification,
    635                  _bcmFieldSliceSelFpf2, 4, 113, 2);
    636     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstIp6High,
    637                  _bcmFieldSliceSelFpf2, 4, 127, 64);
    638 
    639     /* F2_5 */
    640     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan,
    641                  _bcmFieldSliceSelFpf2, 5, 63, 16);
    642     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId,
    643                  _bcmFieldSliceSelFpf2, 5, 63, 12);
    644     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi,
    645                  _bcmFieldSliceSelFpf2, 5, 75, 1);
    646     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri,
    647                  _bcmFieldSliceSelFpf2, 5, 76, 3);
    648     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyEtherType,
    649                  _bcmFieldSliceSelFpf2, 5, 79, 16);
    650     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcMac,
    651                  _bcmFieldSliceSelFpf2, 5, 95, 48);
    652     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstMac,
    653                  _bcmFieldSliceSelFpf2, 5, 143, 48);
    654 
    655     /* F2_6 */
    656     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan,
    657                  _bcmFieldSliceSelFpf2, 6, 63, 16);
    658     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId,
    659                  _bcmFieldSliceSelFpf2, 6, 63, 12);
    660     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi,
    661                  _bcmFieldSliceSelFpf2, 6, 75, 1);
    662     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri,
    663                  _bcmFieldSliceSelFpf2, 6, 76, 3);
    664     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyEtherType,
    665                  _bcmFieldSliceSelFpf2, 6, 79, 16);
    666     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcMac,
    667                  _bcmFieldSliceSelFpf2, 6, 95, 48);
    668     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcIp,
    669                  _bcmFieldSliceSelFpf2, 6, 143, 32);
    670 
    671     /* F2_7 */
    672     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan,
    673                  _bcmFieldSliceSelFpf2, 7, 63, 16);
    674     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId,
    675                  _bcmFieldSliceSelFpf2, 7, 63, 12);
    676     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi,
    677                  _bcmFieldSliceSelFpf2, 7, 75, 1);
    678     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri,
    679                  _bcmFieldSliceSelFpf2, 7, 76, 3);
    680     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyEtherType,
    681                  _bcmFieldSliceSelFpf2, 7, 79, 16);
    682     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTtl,
    683                  _bcmFieldSliceSelFpf2, 7,
    684                  _bcmFieldSliceTtlClassSelect, 0,
    685                  95, 8);
    686     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTtlClassZero,
    687                  _bcmFieldSliceSelFpf2, 7,
    688                  _bcmFieldSliceTtlClassSelect, 0,
    689                  95, 8);
    690     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTtlClassOne,
    691                  _bcmFieldSliceSelFpf2, 7,
    692                  _bcmFieldSliceTtlClassSelect, 1,
    693                  95, 8);
    694     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol,
    695                  _bcmFieldSliceSelFpf2, 7, 103, 8);
    696     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstIp,
    697                  _bcmFieldSliceSelFpf2, 7, 111, 32);
    698     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstMac,
    699                  _bcmFieldSliceSelFpf2, 7, 143, 48);
    700 
    701     /* F2_8 */
    702     _FP_QUAL_ADD(unit, stage_fc, _bcmFieldQualifyData0,
    703                  _bcmFieldSliceSelFpf2, 8, 63, 128);
    704 
    705     /* F2_9 */
    706     _FP_QUAL_ADD(unit, stage_fc, _bcmFieldQualifyData1,
    707                  _bcmFieldSliceSelFpf2, 9, 63, 128);
    708 
    709     /* F2_10 */
    710     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcIp6High,
    711                  _bcmFieldSliceSelFpf2, 10, 63, 64);
    712     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstIp6High,
    713                  _bcmFieldSliceSelFpf2, 10, 127, 64);
    714 
    715     /* F2_11 */
    716     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcMac,
    717                  _bcmFieldSliceSelFpf2, 11, 95, 48);
    718     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstMac,
    719                  _bcmFieldSliceSelFpf2, 11, 143, 48);
    720 
    721     /* F2_12 */
    722     if (soc_feature(unit, soc_feature_miml)) {
    723         _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMimlSrcMac,
    724                      _bcmFieldSliceSelFpf2, 12, 63, 48);
    725         _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMimlDstMac,
    726                      _bcmFieldSliceSelFpf2, 12, 111, 48);
    727         _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMimlVlan,
    728                      _bcmFieldSliceSelFpf2, 12, 159, 16);
    729         _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMimlVlanId,
    730                      _bcmFieldSliceSelFpf2, 12, 159, 12);
    731         _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMimlVlanCfi,
    732                      _bcmFieldSliceSelFpf2, 12, 171, 1);
    733         _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMimlVlanPri,
    734                      _bcmFieldSliceSelFpf2, 12, 172, 3);
    735     }
    736     /* F2_13 */
    737     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadOuterVlan,
    738                  _bcmFieldSliceSelFpf2, 13, 63, 16);
    739     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadOuterVlanId,
    740                  _bcmFieldSliceSelFpf2, 13, 63, 12);
    741     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadOuterVlanCfi,
    742                  _bcmFieldSliceSelFpf2, 13, 75, 1);
    743     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadOuterVlanPri,
    744                  _bcmFieldSliceSelFpf2, 13, 76, 3);
    745     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadEtherType,
    746                  _bcmFieldSliceSelFpf2, 13, 79, 16);
    747     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadSrcMac,
    748                  _bcmFieldSliceSelFpf2, 13, 95, 48);
    749     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadDstMac,
    750                  _bcmFieldSliceSelFpf2, 13, 143, 48);
    751 
    752     /* F2_14 */
    753     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadL4DstPort,
    754                  _bcmFieldSliceSelFpf2, 14, 63, 16);
    755     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadL4SrcPort,
    756                  _bcmFieldSliceSelFpf2, 14, 79, 16);
    757     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadTos,
    758                  _bcmFieldSliceSelFpf2, 14, 95, 8);
    759     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadIpProtocol,
    760                  _bcmFieldSliceSelFpf2, 14, 103, 8);
    761     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadDip,
    762                  _bcmFieldSliceSelFpf2, 14, 111, 32);
    763     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadSip,
    764                  _bcmFieldSliceSelFpf2, 14, 143, 32);
    765 
    766     /* F2_15 */
    767     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadSip6,
    768                  _bcmFieldSliceSelFpf2, 15, 63, 128);
    769 
    770     /* F2_16 */
    771     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadDip6,
    772                  _bcmFieldSliceSelFpf2, 16, 63, 128);
    773 
    774     /* FPF1 */
    775     /* F1_0 */
    776     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL2,
    777                                _bcmFieldSliceSelFpf1, 0,
    778                                _bcmFieldSliceDstClassSelect, 0, 191, 6);
    779     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL3,
    780                                _bcmFieldSliceSelFpf1, 0,
    781                                _bcmFieldSliceDstClassSelect, 1, 191, 6);
    782     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField,
    783                                _bcmFieldSliceSelFpf1, 0,
    784                                _bcmFieldSliceDstClassSelect, 2, 191, 6);
    785     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField,
    786                                _bcmFieldSliceSelFpf1, 0,
    787                                _bcmFieldSliceSrcClassSelect, 2, 197, 6);
    788     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL2,
    789                                _bcmFieldSliceSelFpf1, 0,
    790                                _bcmFieldSliceSrcClassSelect, 0, 197, 6);
    791     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL3,
    792                                _bcmFieldSliceSelFpf1, 0,
    793                                _bcmFieldSliceSrcClassSelect, 1, 197, 6);
    794     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField,
    795                                _bcmFieldSliceSelFpf1, 0,
    796                                _bcmFieldSliceSrcClassSelect, 3, 197, 6);
    797     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField,
    798                                _bcmFieldSliceSelFpf1, 0,
    799                                _bcmFieldSliceDstClassSelect, 3, 191, 6);
    800     /* VRF and VFI are not supported in ForwardingField */
    801     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 
    802                                bcmFieldQualifyForwardingVlanId,
    803                                _bcmFieldSliceSelFpf1, 0,
    804                                _bcmFieldSliceFwdFieldSelect, 
    805                                _bcmFieldFwdFieldVlan, 203, 12);
    806     /* SVP and L3IIF are not supported in SVP_L3IIF_OVERLAY */
    807 
    808     /* F1_1 */
    809     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstPort,
    810                                _bcmFieldSliceSelFpf1, 1,
    811                                _bcmFieldSliceDstFwdEntitySelect,
    812                                _bcmFieldFwdEntityGlp, 191, 18);
    813     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstTrunk,
    814                                _bcmFieldSliceSelFpf1, 1,
    815                                _bcmFieldSliceDstFwdEntitySelect,
    816                                _bcmFieldFwdEntityGlp, 191, 18);
    817     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstL3Egress,
    818                                _bcmFieldSliceSelFpf1, 1,
    819                                _bcmFieldSliceDstFwdEntitySelect,
    820                                _bcmFieldFwdEntityL3Egress, 191, 18);
    821     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstL3EgressNextHops,
    822                                _bcmFieldSliceSelFpf1, 1,
    823                                _bcmFieldSliceDstFwdEntitySelect,
    824                                _bcmFieldFwdEntityL3Egress, 191, 18);
    825     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMulticastGroup,
    826                                _bcmFieldSliceSelFpf1, 1,
    827                                _bcmFieldSliceDstFwdEntitySelect,
    828                                _bcmFieldFwdEntityMulticastGroup, 191, 18);
    829     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcPort,
    830                                _bcmFieldSliceSelFpf1, 1,
    831                                _bcmFieldSliceSrcEntitySelect,
    832                                _bcmFieldFwdEntityGlp, 209, 15);
    833     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcTrunk,
    834                                _bcmFieldSliceSelFpf1, 1,
    835                                _bcmFieldSliceSrcEntitySelect,
    836                                _bcmFieldFwdEntityGlp, 209, 15);
    837     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcModPortGport,
    838                                _bcmFieldSliceSelFpf1, 1,
    839                                _bcmFieldSliceSrcEntitySelect,
    840                                _bcmFieldFwdEntityModPortGport, 209, 15);
    841     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcModuleGport,
    842                                _bcmFieldSliceSelFpf1, 1,
    843                                _bcmFieldSliceSrcEntitySelect,
    844                                _bcmFieldFwdEntityModPortGport, 215, 8);
    845     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTrunkMemberSourceModuleId,
    846                                _bcmFieldSliceSelFpf1, 1,
    847                                _bcmFieldSliceSrcEntitySelect,
    848                                _bcmFieldFwdEntityModPortGport, 215, 8);
    849     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMHOpcode,
    850                  _bcmFieldSliceSelFpf1, 1, 225, 3);
    851 
    852 
    853     /* F1_2 */
    854     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstPort,
    855                                _bcmFieldSliceSelFpf1, 2,
    856                                _bcmFieldSliceDstFwdEntitySelect,
    857                                _bcmFieldFwdEntityGlp, 191, 18);
    858     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstTrunk,
    859                                _bcmFieldSliceSelFpf1, 2,
    860                                _bcmFieldSliceDstFwdEntitySelect,
    861                                _bcmFieldFwdEntityGlp, 191, 18);
    862     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstL3Egress,
    863                                _bcmFieldSliceSelFpf1, 2,
    864                                _bcmFieldSliceDstFwdEntitySelect,
    865                                _bcmFieldFwdEntityL3Egress, 191, 18);
    866     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstL3EgressNextHops,
    867                                _bcmFieldSliceSelFpf1, 2,
    868                                _bcmFieldSliceDstFwdEntitySelect,
    869                                _bcmFieldFwdEntityL3Egress, 191, 18);
    870     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMulticastGroup,
    871                                _bcmFieldSliceSelFpf1, 2,
    872                                _bcmFieldSliceDstFwdEntitySelect,
    873                                _bcmFieldFwdEntityMulticastGroup, 191, 18);
    874     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMHOpcode,
    875                  _bcmFieldSliceSelFpf1, 2, 209, 3);
    876     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL2,
    877                                _bcmFieldSliceSelFpf1, 2,
    878                                _bcmFieldSliceDstClassSelect, 0, 212, 6);
    879     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL3,
    880                                _bcmFieldSliceSelFpf1, 2,
    881                                _bcmFieldSliceDstClassSelect, 1, 212, 6);
    882     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField,
    883                                _bcmFieldSliceSelFpf1, 2,
    884                                _bcmFieldSliceDstClassSelect, 2, 212, 6);
    885     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField,
    886                                _bcmFieldSliceSelFpf1, 2,
    887                                _bcmFieldSliceSrcClassSelect, 2, 218, 6);
    888     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL2,
    889                                _bcmFieldSliceSelFpf1, 2,
    890                                _bcmFieldSliceSrcClassSelect, 0, 218, 6);
    891     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL3,
    892                                _bcmFieldSliceSelFpf1, 2,
    893                                _bcmFieldSliceSrcClassSelect, 1, 218, 6);
    894     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField,
    895                                _bcmFieldSliceSelFpf1, 2,
    896                                _bcmFieldSliceSrcClassSelect, 3, 218, 6);
    897     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField,
    898                                _bcmFieldSliceSelFpf1, 2,
    899                                _bcmFieldSliceDstClassSelect, 3, 212, 6);
    900 
    901     /* F1_3 */
    902     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan,
    903                  _bcmFieldSliceSelFpf1, 3, 191, 16);
    904     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId,
    905                  _bcmFieldSliceSelFpf1, 3, 191, 12);
    906     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi,
    907                  _bcmFieldSliceSelFpf1, 3, 203, 1);
    908     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri,
    909                  _bcmFieldSliceSelFpf1, 3, 204, 3);
    910     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlan,
    911                  _bcmFieldSliceSelFpf1, 3, 207, 16);
    912     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanId,
    913                  _bcmFieldSliceSelFpf1, 3, 207, 12);
    914     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanCfi,
    915                  _bcmFieldSliceSelFpf1, 3, 219, 1);
    916     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanPri,
    917                  _bcmFieldSliceSelFpf1, 3, 220, 3);
    918     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterTpid,
    919                  _bcmFieldSliceSelFpf1, 3, 223, 2);
    920 
    921     /* F1_4 */
    922     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan,
    923                  _bcmFieldSliceSelFpf1, 4, 191, 16);
    924     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId,
    925                  _bcmFieldSliceSelFpf1, 4, 191, 12);
    926     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi,
    927                  _bcmFieldSliceSelFpf1, 4, 203, 1);
    928     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri,
    929                  _bcmFieldSliceSelFpf1, 4, 204, 3);
    930     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyEtherType,
    931                  _bcmFieldSliceSelFpf1, 4, 207, 16);
    932 
    933     /* F1_5 */
    934     /* bcmFieldQualifyMplsTerminated is not supported */
    935     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVlanTranslationHit,
    936                  _bcmFieldSliceSelFpf1, 5, 192, 1);
    937     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyForwardingVlanValid,
    938                  _bcmFieldSliceSelFpf1, 5, 193, 1);
    939     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIngressStpState,
    940                  _bcmFieldSliceSelFpf1, 5, 194, 2);
    941     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2SrcHit,
    942                  _bcmFieldSliceSelFpf1, 5, 196, 1);
    943     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2SrcStatic,
    944                  _bcmFieldSliceSelFpf1, 5, 197, 1);
    945     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2DestHit,
    946                  _bcmFieldSliceSelFpf1, 5, 198, 1);
    947     /* OUTER_LABEL_POP */ 
    948     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2CacheHit,
    949                  _bcmFieldSliceSelFpf1, 5, 200, 1);
    950     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3SrcHostHit,
    951                  _bcmFieldSliceSelFpf1, 5, 201, 1);
    952     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3DestHostHit,
    953                  _bcmFieldSliceSelFpf1, 5, 202, 1);
    954     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpmcStarGroupHit,
    955                  _bcmFieldSliceSelFpf1, 5, 203, 1);
    956     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3DestRouteHit,
    957                  _bcmFieldSliceSelFpf1, 5, 204, 1);
    958     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2StationMove,
    959                  _bcmFieldSliceSelFpf1, 5, 205, 1);
    960     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDosAttack,
    961                  _bcmFieldSliceSelFpf1, 5, 206, 1);
    962     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlan,
    963                  _bcmFieldSliceSelFpf1, 5, 207, 16);
    964     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanId,
    965                  _bcmFieldSliceSelFpf1, 5, 207, 12);
    966     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanCfi,
    967                  _bcmFieldSliceSelFpf1, 5, 219, 1);
    968     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanPri,
    969                  _bcmFieldSliceSelFpf1, 5, 220, 3);
    970     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerTpid,
    971                  _bcmFieldSliceSelFpf1, 5, 223, 2);
    972 
    973     /* F1_6 */
    974     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan,
    975                  _bcmFieldSliceSelFpf1, 6, 191, 16);
    976     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId,
    977                  _bcmFieldSliceSelFpf1, 6, 191, 12);
    978     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi,
    979                  _bcmFieldSliceSelFpf1, 6, 203, 1);
    980     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri,
    981                  _bcmFieldSliceSelFpf1, 6, 204, 3);
    982     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVlanFormat,
    983                  _bcmFieldSliceSelFpf1, 6, 207, 2);
    984     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2Format,
    985                  _bcmFieldSliceSelFpf1, 6, 209, 2);
    986     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTranslatedVlanFormat,
    987                  _bcmFieldSliceSelFpf1, 6, 211, 2);
    988     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMHOpcode,
    989                  _bcmFieldSliceSelFpf1, 6, 213, 3);
    990     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyPacketRes,
    991                  _bcmFieldSliceSelFpf1, 6, 216, 5);
    992     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpInfo,
    993                  _bcmFieldSliceSelFpf1, 6, 221, 3);
    994 
    995 
    996     /* F1_7 */
    997     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan,
    998                  _bcmFieldSliceSelFpf1, 7, 191, 16);
    999     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId,
   1000                  _bcmFieldSliceSelFpf1, 7, 191, 12);
   1001     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi,
   1002                  _bcmFieldSliceSelFpf1, 7, 203, 1);
   1003     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri,
   1004                  _bcmFieldSliceSelFpf1, 7, 204, 3);
   1005     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL2,
   1006                                _bcmFieldSliceSelFpf1, 7,
   1007                                _bcmFieldSliceDstClassSelect, 0, 207, 6);
   1008     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL3,
   1009                                _bcmFieldSliceSelFpf1, 7,
   1010                                _bcmFieldSliceDstClassSelect, 1, 207, 6);
   1011     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField,
   1012                                _bcmFieldSliceSelFpf1, 7,
   1013                                _bcmFieldSliceSrcClassSelect, 3, 207, 6);
   1014     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField,
   1015                                _bcmFieldSliceSelFpf1, 7,
   1016                                _bcmFieldSliceSrcClassSelect, 2, 207, 6);
   1017     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVrf,
   1018                                _bcmFieldSliceSelFpf1, 7,
   1019                                _bcmFieldSliceFwdFieldSelect, 
   1020                                _bcmFieldFwdFieldVrf, 213, 12);
   1021     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVpn,
   1022                                _bcmFieldSliceSelFpf1, 7,
   1023                                _bcmFieldSliceFwdFieldSelect, 
   1024                                _bcmFieldFwdFieldVpn, 213, 12);
   1025     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 
   1026                                bcmFieldQualifyForwardingVlanId,
   1027                                _bcmFieldSliceSelFpf1, 7,
   1028                                _bcmFieldSliceFwdFieldSelect, 
   1029                                _bcmFieldFwdFieldVlan, 213, 12);
   1030 
   1031 
   1032     /* F1_8 */
   1033     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol,
   1034                  _bcmFieldSliceSelFpf1, 8, 191, 8);
   1035     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTos,
   1036                  _bcmFieldSliceSelFpf1, 8,
   1037                  _bcmFieldSliceTosClassSelect, 0,
   1038                  199, 8);
   1039     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTosClassZero,
   1040                  _bcmFieldSliceSelFpf1, 8,
   1041                  _bcmFieldSliceTosClassSelect, 0,
   1042                  199, 8);
   1043     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTosClassOne,
   1044                  _bcmFieldSliceSelFpf1, 8,
   1045                  _bcmFieldSliceTosClassSelect, 1,
   1046                  199, 8);
   1047     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL2,
   1048                                _bcmFieldSliceSelFpf1, 8,
   1049                                _bcmFieldSliceDstClassSelect, 0, 207, 6);
   1050     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL3,
   1051                                _bcmFieldSliceSelFpf1, 8,
   1052                                _bcmFieldSliceDstClassSelect, 1, 207, 6);
   1053     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField,
   1054                                _bcmFieldSliceSelFpf1, 8,
   1055                                _bcmFieldSliceSrcClassSelect, 3, 207, 6);
   1056     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField,
   1057                                _bcmFieldSliceSelFpf1, 8,
   1058                                _bcmFieldSliceSrcClassSelect, 2, 207, 6);
   1059     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 
   1060                                bcmFieldQualifyForwardingVlanId,
   1061                                _bcmFieldSliceSelFpf1, 8,
   1062                                _bcmFieldSliceFwdFieldSelect, 
   1063                                _bcmFieldFwdFieldVlan, 213, 12);
   1064     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIntCongestionNotification,
   1065                                _bcmFieldSliceSelFpf1, 8, 225, 2);
   1066 
   1067     /* F1_9 */
   1068     _FP_QUAL_ADD(unit, stage_fc, _bcmFieldQualifyData2,
   1069                                _bcmFieldSliceSelFpf1, 9, 191, 32);
   1070 
   1071     /* F1_10 */
   1072     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstPort,
   1073                                _bcmFieldSliceSelFpf1, 10,
   1074                                _bcmFieldSliceDstFwdEntitySelect,
   1075                                _bcmFieldFwdEntityGlp, 191, 18);
   1076     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstTrunk,
   1077                                _bcmFieldSliceSelFpf1, 10,
   1078                                _bcmFieldSliceDstFwdEntitySelect,
   1079                                _bcmFieldFwdEntityGlp, 191, 18);
   1080     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstL3Egress,
   1081                                _bcmFieldSliceSelFpf1, 10,
   1082                                _bcmFieldSliceDstFwdEntitySelect,
   1083                                _bcmFieldFwdEntityL3Egress, 191, 18);
   1084     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstL3EgressNextHops,
   1085                                _bcmFieldSliceSelFpf1, 10,
   1086                                _bcmFieldSliceDstFwdEntitySelect,
   1087                                _bcmFieldFwdEntityL3Egress, 191, 18);
   1088     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMulticastGroup,
   1089                                _bcmFieldSliceSelFpf1, 10,
   1090                                _bcmFieldSliceDstFwdEntitySelect,
   1091                                _bcmFieldFwdEntityMulticastGroup, 191, 18);
   1092     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstPort,
   1093                  _bcmFieldSliceSelFpf1, 10, 209, 15);
   1094     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstTrunk,
   1095                  _bcmFieldSliceSelFpf1, 10, 209, 15);
   1096     
   1097     /* F1_11 */
   1098     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcPort,
   1099                  _bcmFieldSliceSelFpf1, 11, 191, 15);
   1100     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcTrunk,
   1101                  _bcmFieldSliceSelFpf1, 11, 191, 15);
   1102     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcModPortGport,
   1103                  _bcmFieldSliceSelFpf1, 11, 191, 15);
   1104     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcModuleGport,
   1105                  _bcmFieldSliceSelFpf1, 11, 197, 8);
   1106     
   1107     /* F1_12 */
   1108     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId,
   1109                  _bcmFieldSliceSelFpf1, 12, 191, 12);
   1110     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL2,
   1111                                _bcmFieldSliceSelFpf1, 12,
   1112                                _bcmFieldSliceDstClassSelect, 0, 203, 6);
   1113     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL3,
   1114                                _bcmFieldSliceSelFpf1, 12,
   1115                                _bcmFieldSliceDstClassSelect, 1, 203, 6);
   1116     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField,
   1117                                _bcmFieldSliceSelFpf1, 12,
   1118                                _bcmFieldSliceDstClassSelect, 2, 203, 6);
   1119     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField,
   1120                                _bcmFieldSliceSelFpf1, 12,
   1121                                _bcmFieldSliceDstClassSelect, 3, 203, 6);
   1122     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL2,
   1123                                _bcmFieldSliceSelFpf1, 12,
   1124                                _bcmFieldSliceSrcClassSelect, 0, 209, 6);
   1125     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL3,
   1126                                _bcmFieldSliceSelFpf1, 12,
   1127                                _bcmFieldSliceSrcClassSelect, 1, 209, 6);
   1128     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField,
   1129                                _bcmFieldSliceSelFpf1, 12,
   1130                                _bcmFieldSliceSrcClassSelect, 2, 209, 6);
   1131     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField,
   1132                                _bcmFieldSliceSelFpf1, 12,
   1133                                _bcmFieldSliceSrcClassSelect, 3, 209, 6);
   1134 
   1135     /* F1_13 */
   1136     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVnTag,
   1137                                _bcmFieldSliceSelFpf1, 13,
   1138                                _bcmFieldSliceAuxTag1Select,
   1139                                _bcmFieldAuxTagVn, 191, 33);
   1140     if (soc_feature(unit, soc_feature_miml)) {
   1141         _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyMimlInnerTag,
   1142                                    _bcmFieldSliceSelFpf1, 13,
   1143                                    _bcmFieldSliceAuxTag1Select,
   1144                                    _bcmFieldAuxTagMimlHeader, 191, 33);
   1145     }
   1146     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyCustomHeaderData,
   1147                                _bcmFieldSliceSelFpf1, 13,
   1148                                _bcmFieldSliceAuxTag1Select,
   1149                                _bcmFieldAuxTagCustomHeader, 191, 33);
   1150 
   1151     _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadL4HdrParseable,
   1152                      _bcmFieldDevSelDisable, 0,
   1153                      _bcmFieldSliceSelFpf1, 13,
   1154                      _bcmFieldSliceAuxTag1Select, _bcmFieldAuxTagCapwapInfo,
   1155                      0,
   1156                      191, 1,
   1157                      223, 1,
   1158                      0,  0,
   1159                      0
   1160                      );
   1161     _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadL3HdrParseable,
   1162                      _bcmFieldDevSelDisable, 0,
   1163                      _bcmFieldSliceSelFpf1, 13,
   1164                      _bcmFieldSliceAuxTag1Select, _bcmFieldAuxTagCapwapInfo,
   1165                      0,
   1166                      192, 1,
   1167                      223, 1,
   1168                      0,  0,
   1169                      0
   1170                      );
   1171     _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadInnerVlan,
   1172                      _bcmFieldDevSelDisable, 0,
   1173                      _bcmFieldSliceSelFpf1, 13,
   1174                      _bcmFieldSliceAuxTag1Select, _bcmFieldAuxTagCapwapInfo,
   1175                      0,
   1176                      193, 16,
   1177                      223, 1,
   1178                      0,  0,
   1179                      0
   1180                      );
   1181     _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadInnerVlanId,
   1182                      _bcmFieldDevSelDisable, 0,
   1183                      _bcmFieldSliceSelFpf1, 13,
   1184                      _bcmFieldSliceAuxTag1Select, _bcmFieldAuxTagCapwapInfo,
   1185                      0,
   1186                      193, 12,
   1187                      223, 1,
   1188                      0,  0,
   1189                      0
   1190                      );
   1191     _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadInnerVlanCfi,
   1192                      _bcmFieldDevSelDisable, 0,
   1193                      _bcmFieldSliceSelFpf3, 12,
   1194                      _bcmFieldSliceAuxTag1Select, _bcmFieldAuxTagCapwapInfo,
   1195                      0,
   1196                      205, 1,
   1197                      223, 1,
   1198                      0,  0,
   1199                      0
   1200                      );
   1201     _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadInnerVlanPri,
   1202                      _bcmFieldDevSelDisable, 0,
   1203                      _bcmFieldSliceSelFpf1, 13,
   1204                      _bcmFieldSliceAuxTag1Select, _bcmFieldAuxTagCapwapInfo,
   1205                      0,
   1206                      206, 3,
   1207                      223, 1,
   1208                      0,  0,
   1209                      0
   1210                      );
   1211     _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadVlanFormat,
   1212                      _bcmFieldDevSelDisable, 0,
   1213                      _bcmFieldSliceSelFpf1, 13,
   1214                      _bcmFieldSliceAuxTag1Select, _bcmFieldAuxTagCapwapInfo,
   1215                      0,
   1216                      209, 2,
   1217                      223, 1,
   1218                      0,  0,
   1219                      0
   1220                      );
   1221     _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadSOF,
   1222                      _bcmFieldDevSelDisable, 0,
   1223                      _bcmFieldSliceSelFpf1, 13,
   1224                      _bcmFieldSliceAuxTag1Select, _bcmFieldAuxTagCapwapInfo,
   1225                      0,
   1226                      211, 1,
   1227                      223, 1,
   1228                      0,  0,
   1229                      0
   1230                      );
   1231     _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyCapwapHdrType,
   1232                      _bcmFieldDevSelDisable, 0,
   1233                      _bcmFieldSliceSelFpf1, 13,
   1234                      _bcmFieldSliceAuxTag1Select, _bcmFieldAuxTagCapwapInfo,
   1235                      0,
   1236                      212, 1,
   1237                      223, 1,
   1238                      0,  0,
   1239                      0
   1240                      );
   1241     _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyCapwapHdrRid,
   1242                      _bcmFieldDevSelDisable, 0,
   1243                      _bcmFieldSliceSelFpf1, 13,
   1244                      _bcmFieldSliceAuxTag1Select, _bcmFieldAuxTagCapwapInfo,
   1245                      0,
   1246                      213, 5,
   1247                      223, 1,
   1248                      0,  0,
   1249                      0
   1250                      );
   1251     
   1252     /* DWF4 */
   1253     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyTcpControl,
   1254                             _bcmFieldSliceSelFpf4, 1,
   1255                             _bcmFieldSliceTcpClassSelect, 0, 0, 6);
   1256     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyTcpClassZero,
   1257                             _bcmFieldSliceSelFpf4, 1,
   1258                             _bcmFieldSliceTcpClassSelect, 0, 0, 6);
   1259     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyTcpClassOne,
   1260                             _bcmFieldSliceSelFpf4, 1,
   1261                             _bcmFieldSliceTcpClassSelect, 1, 0, 6);
   1262 
   1263     /* DWF3 */
   1264     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyTos,
   1265                             _bcmFieldSliceSelDisable, 0,
   1266                             _bcmFieldSliceTosClassSelect, 0, 7, 8);
   1267     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyTosClassZero,
   1268                             _bcmFieldSliceSelDisable, 0,
   1269                             _bcmFieldSliceTosClassSelect, 0, 7, 8);
   1270     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyTosClassOne,
   1271                             _bcmFieldSliceSelDisable, 0,
   1272                             _bcmFieldSliceTosClassSelect, 1, 7, 8);
   1273     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol,
   1274                             _bcmFieldSliceSelDisable, 0,
   1275                             _bcmFieldSliceSelDisable, 0, 15, 8);
   1276     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc,
   1277                             bcmFieldQualifyExtensionHeaderSubCode,
   1278                             _bcmFieldSliceSelDisable, 0,
   1279                             _bcmFieldSliceSelDisable, 0, 23, 8);
   1280     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyExtensionHeaderType,
   1281                             _bcmFieldSliceSelDisable, 0,
   1282                             _bcmFieldSliceSelDisable, 0, 31, 8);
   1283 
   1284     /* DWF2 */
   1285     /* bcmFieldQualifyMplsTerminated is not supported */
   1286     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyVlanTranslationHit,
   1287                             _bcmFieldSliceSelFpf2, 0,
   1288                             _bcmFieldSliceSelDisable, 0, 56, 1);
   1289     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyForwardingVlanValid,
   1290                             _bcmFieldSliceSelFpf2, 0,
   1291                             _bcmFieldSliceSelDisable, 0, 57, 1);
   1292     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyIngressStpState,
   1293                             _bcmFieldSliceSelFpf2, 0,
   1294                             _bcmFieldSliceSelDisable, 0, 58, 2);
   1295     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyL2SrcHit,
   1296                             _bcmFieldSliceSelFpf2, 0,
   1297                             _bcmFieldSliceSelDisable, 0, 60, 1);
   1298     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyL2SrcStatic,
   1299                             _bcmFieldSliceSelFpf2, 0,
   1300                             _bcmFieldSliceSelDisable, 0, 61, 1);
   1301     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyL2DestHit,
   1302                             _bcmFieldSliceSelFpf2, 0,
   1303                             _bcmFieldSliceSelDisable, 0, 62, 1);
   1304     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyL2CacheHit,
   1305                             _bcmFieldSliceSelFpf2, 0,
   1306                             _bcmFieldSliceSelDisable, 0, 64, 1);
   1307     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyL3SrcHostHit,
   1308                             _bcmFieldSliceSelFpf2, 0,
   1309                             _bcmFieldSliceSelDisable, 0, 65, 1);
   1310     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyL3DestHostHit,
   1311                             _bcmFieldSliceSelFpf2, 0,
   1312                             _bcmFieldSliceSelDisable, 0, 66, 1);
   1313     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyIpmcStarGroupHit,
   1314                             _bcmFieldSliceSelFpf2, 0,
   1315                             _bcmFieldSliceSelDisable, 0, 67, 1);
   1316     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyL3DestRouteHit,
   1317                             _bcmFieldSliceSelFpf2, 0,
   1318                             _bcmFieldSliceSelDisable, 0, 68, 1);
   1319     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyL2StationMove,
   1320                             _bcmFieldSliceSelFpf2, 0,
   1321                             _bcmFieldSliceSelDisable, 0, 69, 1);
   1322     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyDosAttack,
   1323                             _bcmFieldSliceSelFpf2, 0,
   1324                             _bcmFieldSliceSelDisable, 0, 70, 1);
   1325     _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyRangeCheck,
   1326                      _bcmFieldDevSelDisable, 0,
   1327                      _bcmFieldSliceSelFpf2, 0,
   1328                      _bcmFieldSliceSelDisable, 0, 0x1,
   1329                      71, 24, 95, 8, 0, 0, 0);
   1330     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassPort,
   1331                             _bcmFieldSliceSelFpf2, 0,
   1332                             _bcmFieldSliceIntfClassSelect, 0, 95, 8);
   1333     /* bcmFieldQualifyInterfaceClassL3 is not supported */
   1334     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassL2,
   1335                             _bcmFieldSliceSelFpf2, 0,
   1336                             _bcmFieldSliceIntfClassSelect, 2, 95, 8);
   1337     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyDstIp,
   1338                             _bcmFieldSliceSelFpf2, 0,
   1339                             _bcmFieldSliceSelDisable, 0, 103, 32);
   1340     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifySrcIp,
   1341                             _bcmFieldSliceSelFpf2, 0,
   1342                             _bcmFieldSliceSelDisable, 0, 135, 32);
   1343     
   1344     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifySrcIp6,
   1345                             _bcmFieldSliceSelFpf2, 1,
   1346                             _bcmFieldSliceSelDisable, 0, 39, 128);
   1347     
   1348     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyDstIp6,
   1349                             _bcmFieldSliceSelFpf2, 2,
   1350                             _bcmFieldSliceSelDisable, 0, 39, 128);
   1351     
   1352     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, _bcmFieldQualifyData1,
   1353                             _bcmFieldSliceSelFpf2, 3,
   1354                             _bcmFieldSliceSelDisable, 0, 39, 128);
   1355     /* DWF2_4 */
   1356     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadOuterVlan,
   1357                             _bcmFieldSliceSelFpf2, 4,
   1358                             _bcmFieldSliceSelDisable, 0, 39, 16);
   1359     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadOuterVlanId,
   1360                             _bcmFieldSliceSelFpf2, 4,
   1361                             _bcmFieldSliceSelDisable, 0, 39, 12);
   1362     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadOuterVlanCfi,
   1363                             _bcmFieldSliceSelFpf2, 4,
   1364                             _bcmFieldSliceSelDisable, 0, 51, 1);
   1365     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadOuterVlanPri,
   1366                             _bcmFieldSliceSelFpf2, 4,
   1367                             _bcmFieldSliceSelDisable, 0, 52, 3);
   1368     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadEtherType,
   1369                             _bcmFieldSliceSelFpf2, 4,
   1370                             _bcmFieldSliceSelDisable, 0, 55, 16);
   1371     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadSrcMac,
   1372                             _bcmFieldSliceSelFpf2, 4,
   1373                             _bcmFieldSliceSelDisable, 0, 71, 48);
   1374     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadDstMac,
   1375                             _bcmFieldSliceSelFpf2, 4,
   1376                             _bcmFieldSliceSelDisable, 0, 119, 48);
   1377     /* DWF2_5 */
   1378     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadL4DstPort,
   1379                             _bcmFieldSliceSelFpf2, 5,
   1380                             _bcmFieldSliceSelDisable, 0, 39, 16);
   1381     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadL4SrcPort,
   1382                             _bcmFieldSliceSelFpf2, 5,
   1383                             _bcmFieldSliceSelDisable, 0, 55, 16);
   1384     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadTos,
   1385                             _bcmFieldSliceSelFpf2, 5,
   1386                             _bcmFieldSliceSelDisable, 0, 71, 8);
   1387     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadIpProtocol,
   1388                             _bcmFieldSliceSelFpf2, 5,
   1389                             _bcmFieldSliceSelDisable, 0, 79, 8);
   1390     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadDip,
   1391                             _bcmFieldSliceSelFpf2, 5,
   1392                             _bcmFieldSliceSelDisable, 0, 87, 32);
   1393     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadSip,
   1394                             _bcmFieldSliceSelFpf2, 5,
   1395                             _bcmFieldSliceSelDisable, 0, 119, 32);
   1396     /* DWF2_6 */
   1397     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadSip6,
   1398                             _bcmFieldSliceSelFpf2, 6,
   1399                             _bcmFieldSliceSelDisable, 0, 39, 128);
   1400     /* DWF2_7 */
   1401     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadDip6,
   1402                             _bcmFieldSliceSelFpf2, 7,
   1403                             _bcmFieldSliceSelDisable, 0, 39, 128);
   1404     
   1405     
   1406     /* DWF1_0 */
   1407     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyTtl,
   1408                             _bcmFieldSliceSelFpf1, 0,
   1409                             _bcmFieldSliceTtlClassSelect, 0, 167, 8);
   1410     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyTtlClassZero,
   1411                             _bcmFieldSliceSelFpf1, 0,
   1412                             _bcmFieldSliceTtlClassSelect, 0, 167, 8);
   1413     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyTtlClassOne,
   1414                             _bcmFieldSliceSelFpf1, 0,
   1415                             _bcmFieldSliceTtlClassSelect, 1, 167, 8);
   1416     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyIpFrag,
   1417                             _bcmFieldSliceSelFpf1, 0,
   1418                             _bcmFieldSliceSelDisable, 0, 175, 2);
   1419     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyL4DstPort,
   1420                             _bcmFieldSliceSelFpf1, 0,
   1421                             _bcmFieldSliceSelDisable, 0, 177, 16);
   1422     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyL4SrcPort,
   1423                             _bcmFieldSliceSelFpf1, 0,
   1424                             _bcmFieldSliceSelDisable, 0, 193, 16);
   1425 
   1426     _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstPort,
   1427                      _bcmFieldDevSelDisable, 0,
   1428                      _bcmFieldSliceSelFpf1, 0, 
   1429                      _bcmFieldSliceDstFwdEntitySelect, 
   1430                      _bcmFieldFwdEntityGlp, 0x1,
   1431                      209, 18, 0, 0, 0, 0, 0);
   1432     _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstTrunk,
   1433                      _bcmFieldDevSelDisable, 0,
   1434                                _bcmFieldSliceSelFpf1, 0,
   1435                                _bcmFieldSliceDstFwdEntitySelect,
   1436                      _bcmFieldFwdEntityGlp, 0x1,
   1437                      209, 18, 0, 0, 0, 0, 0);
   1438     _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstL3Egress,
   1439                      _bcmFieldDevSelDisable, 0,
   1440                                _bcmFieldSliceSelFpf1, 0,
   1441                                _bcmFieldSliceDstFwdEntitySelect,
   1442                      _bcmFieldFwdEntityL3Egress, 0x1,
   1443                      209, 18, 0, 0, 0, 0, 0);
   1444     _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstL3EgressNextHops,
   1445                      _bcmFieldDevSelDisable, 0,
   1446                                _bcmFieldSliceSelFpf1, 0,
   1447                                _bcmFieldSliceDstFwdEntitySelect,
   1448                      _bcmFieldFwdEntityL3Egress, 0x1,
   1449                      209, 18, 0, 0, 0, 0, 0);
   1450     _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstMulticastGroup,
   1451                      _bcmFieldDevSelDisable, 0,
   1452                                _bcmFieldSliceSelFpf1, 0,
   1453                                _bcmFieldSliceDstFwdEntitySelect,
   1454                      _bcmFieldFwdEntityMulticastGroup, 0x1,
   1455                      209, 18, 0, 0, 0, 0, 0);
   1456     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, 
   1457                             bcmFieldQualifyIntCongestionNotification,
   1458                             _bcmFieldSliceSelFpf1, 1,
   1459                             _bcmFieldSliceSelDisable, 0, 227, 2);
   1460 
   1461     /* DWF1_1 */
   1462     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadL4DstPort,
   1463                             _bcmFieldSliceSelFpf1, 1,
   1464                             _bcmFieldSliceSelDisable, 0, 167, 16);
   1465     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadL4SrcPort,
   1466                             _bcmFieldSliceSelFpf1, 1,
   1467                             _bcmFieldSliceSelDisable, 0, 183, 16);
   1468     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadTos,
   1469                             _bcmFieldSliceSelFpf1, 1,
   1470                             _bcmFieldSliceSelDisable, 0, 199, 8);
   1471     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadIpProtocol,
   1472                             _bcmFieldSliceSelFpf1, 1,
   1473                             _bcmFieldSliceSelDisable, 0, 207, 8);
   1474     
   1475     /* DONE DWF */
   1476     return (BCM_E_NONE);
   1477 }
   1478 
   1479 /*
   1480  * Function:
   1481  *     _field_hr3_lookup_qualifiers_init
   1482  * Purpose:
   1483  *     Initialize device stage lookup qaualifiers
   1484  *     select codes & offsets
   1485  * Parameters:
   1486  *     unit       - (IN) BCM device number.
   1487  *     stage_fc   - (IN) Field Processor stage control structure.
   1488  *
   1489  * Returns:
   1490  *     BCM_E_NONE
   1491  */
   1492 STATIC int
   1493 _field_hr3_lookup_qualifiers_init(int unit, _field_stage_t *stage_fc)
   1494 {
   1495     _FP_QUAL_DECL;
   1496 
   1497     /* Input parameters check. */
   1498     if (NULL == stage_fc) {
   1499         return (BCM_E_PARAM);
   1500     }
   1501 
   1502     /* Enable the overlay of Sender Ethernet Address onto MACSA
   1503      * on ARP/RARP packets.
   1504      */
   1505     BCM_IF_ERROR_RETURN
   1506         (soc_reg_field32_modify(unit, ING_CONFIG_64r, REG_PORT_ANY,
   1507                                 ARP_VALIDATION_ENf, 1));
   1508 
   1509     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyStageLookup,
   1510                  _bcmFieldSliceSelDisable, 0, 0, 0);
   1511     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIp4,
   1512                  _bcmFieldSliceSelDisable, 0, 0, 0);
   1513     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIp6,
   1514                  _bcmFieldSliceSelDisable, 0, 0, 0);
   1515 
   1516     /* FPF3 */
   1517     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlan,
   1518                  _bcmFieldSliceSelFpf3, 0, 0, 16);
   1519     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanId,
   1520                  _bcmFieldSliceSelFpf3, 0, 0, 12);
   1521     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanCfi,
   1522                  _bcmFieldSliceSelFpf3, 0, 12, 1);
   1523     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanPri,
   1524                  _bcmFieldSliceSelFpf3, 0, 13, 3);
   1525     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyEtherType,
   1526                  _bcmFieldSliceSelFpf3, 0, 16, 16);
   1527 
   1528     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4DstPort,
   1529                                _bcmFieldSliceSelFpf3, 1, 0, 16);
   1530     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4SrcPort,
   1531                                _bcmFieldSliceSelFpf3, 1, 16, 16);
   1532     
   1533     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTos,
   1534                                _bcmFieldSliceSelFpf3, 2, 0, 8);
   1535     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol,
   1536                                _bcmFieldSliceSelFpf3, 2, 8, 8);
   1537     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyExtensionHeaderSubCode,
   1538                  _bcmFieldSliceSelFpf3, 2, 16, 8);
   1539     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyExtensionHeaderType,
   1540                  _bcmFieldSliceSelFpf3, 2, 24, 8);
   1541 
   1542     /* TUNNEL_CLASSID is not supported */
   1543     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlan,
   1544                  _bcmFieldSliceSelFpf3, 3, 8, 16);
   1545     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanId,
   1546                  _bcmFieldSliceSelFpf3, 3, 8, 12);
   1547     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanCfi,
   1548                  _bcmFieldSliceSelFpf3, 3, 20, 1);
   1549     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanPri,
   1550                  _bcmFieldSliceSelFpf3, 3, 21, 3);
   1551     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcModuleGport,
   1552                  _bcmFieldSliceSelFpf3, 3, 24, 8);
   1553 
   1554     /* FPF2 */
   1555     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTtl,
   1556                                _bcmFieldSliceSelFpf2, 0, 32, 8);
   1557     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTcpControl,
   1558                  _bcmFieldSliceSelFpf2, 0, 40, 6);
   1559     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpFrag,
   1560                                _bcmFieldSliceSelFpf2, 0, 46, 2);
   1561     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTos,
   1562                                _bcmFieldSliceSelFpf2, 0, 48, 8);
   1563     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4DstPort,
   1564                                _bcmFieldSliceSelFpf2, 0, 56, 16);
   1565     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4SrcPort,
   1566                                _bcmFieldSliceSelFpf2, 0, 72, 16);
   1567     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol,
   1568                                _bcmFieldSliceSelFpf2, 0, 88, 8);
   1569     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstIp,
   1570                                _bcmFieldSliceSelFpf2, 0, 96, 32);
   1571     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcIp,
   1572                                _bcmFieldSliceSelFpf2, 0, 128, 32);
   1573     
   1574     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcIp6,
   1575                                _bcmFieldSliceSelFpf2, 1, 32, 128);
   1576     
   1577     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstIp6,
   1578                                _bcmFieldSliceSelFpf2, 2, 32, 128);
   1579     
   1580     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyEtherType,
   1581                  _bcmFieldSliceSelFpf2, 3, 48, 16);
   1582     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcMac,
   1583                  _bcmFieldSliceSelFpf2, 3, 64, 48);
   1584     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstMac,
   1585                  _bcmFieldSliceSelFpf2, 3, 112, 48);
   1586     
   1587     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTos,
   1588                                _bcmFieldSliceSelFpf2, 4, 32, 8);
   1589     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol,
   1590                                _bcmFieldSliceSelFpf2, 4, 40, 8);
   1591     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstIp,
   1592                                _bcmFieldSliceSelFpf2, 4, 48, 32);
   1593     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcIp,
   1594                                _bcmFieldSliceSelFpf2, 4, 80, 32);
   1595     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcMac,
   1596                  _bcmFieldSliceSelFpf2, 4, 112, 48);
   1597 
   1598     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTos,
   1599                                _bcmFieldSliceSelFpf2, 5, 32, 8);
   1600     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol,
   1601                                _bcmFieldSliceSelFpf2, 5, 40, 8);
   1602     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstIp,
   1603                                _bcmFieldSliceSelFpf2, 5, 48, 32);
   1604     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcIp,
   1605                                _bcmFieldSliceSelFpf2, 5, 80, 32);
   1606     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstMac,
   1607                  _bcmFieldSliceSelFpf2, 5, 112, 48);
   1608     
   1609     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcIp6High,
   1610                                _bcmFieldSliceSelFpf2, 6, 32, 64);
   1611     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstIp6High,
   1612                                _bcmFieldSliceSelFpf2, 6, 96, 64);
   1613 
   1614     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVnTag,
   1615                  _bcmFieldSliceSelFpf2, 7, 32, 33);
   1616     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySnap,
   1617                  _bcmFieldSliceSelFpf2, 7, 96, 40);
   1618     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyLlc,
   1619                  _bcmFieldSliceSelFpf2, 7, 136, 24);
   1620 
   1621     /* FPF1 */
   1622     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocolCommon,
   1623                  _bcmFieldSliceSelFpf1, 0, 160, 3);
   1624     /* bcmFieldQualifyTunnelTerminated is not supported */
   1625     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpInfo,
   1626                  _bcmFieldSliceSelFpf1, 0, 164, 1);
   1627     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerTpid,
   1628                  _bcmFieldSliceSelFpf1, 0, 165, 2);
   1629     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterTpid,
   1630                  _bcmFieldSliceSelFpf1, 0, 167, 2);
   1631     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2Format,
   1632                  _bcmFieldSliceSelFpf1, 0, 169, 2);
   1633     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyHiGigProxy,
   1634                  _bcmFieldSliceSelFpf1, 0, 171, 1);
   1635     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyHiGig,
   1636                  _bcmFieldSliceSelFpf1, 0, 172, 1);
   1637     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan,
   1638                  _bcmFieldSliceSelFpf1, 0, 173, 16);
   1639     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId,
   1640                  _bcmFieldSliceSelFpf1, 0, 173, 12);
   1641     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi,
   1642                  _bcmFieldSliceSelFpf1, 0, 185, 1);
   1643     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri,
   1644                  _bcmFieldSliceSelFpf1, 0, 186, 3);
   1645     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVlanFormat,
   1646                  _bcmFieldSliceSelFpf1, 0, 189, 2);
   1647     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInPort,
   1648                  _bcmFieldSliceSelFpf1, 0, 191, 6);
   1649     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassPort,
   1650                  _bcmFieldSliceSelFpf1, 0, 197, 8);
   1651     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpType,
   1652                                _bcmFieldSliceSelFpf1, 0, 205, 4);
   1653     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4Ports,
   1654                  _bcmFieldSliceSelFpf1, 0, 209, 1);
   1655 
   1656     return (BCM_E_NONE);
   1657 }
   1658 
   1659 
   1660 /*
   1661  * Function:
   1662  *     _field_hr3_egress_qualifiers_init
   1663  * Purpose:
   1664  *     Initialize device stage egress qaualifiers
   1665  *     select codes & offsets
   1666  * Parameters:
   1667  *     unit       - (IN) BCM device number.
   1668  *     stage_fc   - (IN) Field Processor stage control structure.
   1669  * 
   1670  * Returns:
   1671  *     BCM_E_NONE
   1672  */
   1673 STATIC int
   1674 _field_hr3_egress_qualifiers_init(int unit, _field_stage_t *stage_fc)
   1675 {
   1676     _FP_QUAL_DECL;
   1677     _key_fld_ = KEYf;
   1678 
   1679     /* Input parameters check. */
   1680     if (NULL == stage_fc) {
   1681         return (BCM_E_PARAM);
   1682     }
   1683 
   1684     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyStageEgress,
   1685                  _bcmFieldSliceSelDisable, 0, 0, 0);
   1686 
   1687     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4Ports,
   1688                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 0, 1);
   1689     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIntCongestionNotification,
   1690                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 1, 2);
   1691     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2Format,
   1692                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 25, 2);
   1693     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyEtherType,
   1694                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 27, 16);
   1695     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcMac,
   1696                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 43, 48);
   1697     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstMac,
   1698                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 91, 48);
   1699     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyCpuQueue,
   1700                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 139, 6);
   1701     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVlanTranslationHit,
   1702                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 145, 1);
   1703     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyHiGigProxy,
   1704                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 146, 1);
   1705     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyHiGig,
   1706                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 147, 1);
   1707     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanCfi,
   1708                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 148, 1);
   1709     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanPri,
   1710                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 149, 3);
   1711     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanId,
   1712                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 152, 12);
   1713     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInPort,
   1714                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 165, 6);
   1715     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3Routable,
   1716                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 171, 1);
   1717     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMirrorCopy,
   1718                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 172, 1);
   1719     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan,
   1720                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 173, 16);
   1721     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId,
   1722                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 173, 12);
   1723     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi,
   1724                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 185, 1);
   1725     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri,
   1726                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 186, 3);
   1727     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVlanFormat,
   1728                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 189, 2);
   1729     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstHiGig,
   1730                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 191, 1);
   1731     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassPort,
   1732                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 192, 8);
   1733     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOutPort,
   1734                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 200, 6);
   1735     /* L3_PKT_TYPE */
   1736     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyIpType,
   1737                                _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4,
   1738                                _bcmFieldSliceSelEgrMdlKey4, 0, 206, 4);
   1739     /* MDL */
   1740     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyOamMdl,
   1741                                _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4,
   1742                                _bcmFieldSliceSelEgrMdlKey4, 1, 206, 3);
   1743     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDrop,
   1744                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 210, 1);
   1745 
   1746     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4Ports,
   1747                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 0, 1);
   1748     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIntCongestionNotification,
   1749                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 1, 2);
   1750     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpFrag,
   1751                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 14, 2);
   1752     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTcpControl,
   1753                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 16, 6);
   1754     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4DstPort,
   1755                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 22, 16);
   1756     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4SrcPort,
   1757                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 38, 16);
   1758     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTtl,
   1759                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 54, 8);
   1760     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol,
   1761                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 62, 8);
   1762     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstIp,
   1763                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 70, 32);
   1764     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcIp,
   1765                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 102, 32);
   1766     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTos,
   1767                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 134, 8);
   1768     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyHiGigProxy,
   1769                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 142, 1);
   1770     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyHiGig,
   1771                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 143, 1);
   1772     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanId,
   1773                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 152, 12);
   1774     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInPort,
   1775                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 165, 6);
   1776     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3Routable,
   1777                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 171, 1);
   1778     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMirrorCopy,
   1779                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 172, 1);
   1780     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan,
   1781                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 173, 16);
   1782     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId,
   1783                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 173, 12);
   1784     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi,
   1785                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 185, 1);
   1786     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri,
   1787                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 186, 3);
   1788     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVlanFormat,
   1789                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 189, 2);
   1790     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstHiGig,
   1791                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 191, 1);
   1792     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassPort,
   1793                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 192, 8);
   1794     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOutPort,
   1795                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 200, 6);
   1796     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpType,
   1797                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 206, 4);
   1798     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDrop,
   1799                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 210, 1);
   1800     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIp4,
   1801                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 0, 0);
   1802  
   1803     /* KEY1 without v4 specific fields. */
   1804     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4Ports,
   1805                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 0, 1);
   1806     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTcpControl,
   1807                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 16, 6);
   1808     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4DstPort,
   1809                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 22, 16);
   1810     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4SrcPort,
   1811                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 38, 16);
   1812     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTtl,
   1813                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 54, 8);
   1814     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol,
   1815                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 62, 8);
   1816     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTos,
   1817                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 134, 8);
   1818     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyHiGigProxy,
   1819                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 142, 1);
   1820     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyHiGig,
   1821                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 143, 1);
   1822     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanId,
   1823                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 152, 12);
   1824     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInPort,
   1825                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 165, 6);
   1826     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3Routable,
   1827                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 171, 1);
   1828     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMirrorCopy,
   1829                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 172, 1);
   1830     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan,
   1831                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 173, 16);
   1832     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId,
   1833                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 173, 12);
   1834     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi,
   1835                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 185, 1);
   1836     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri,
   1837                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 186, 3);
   1838     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVlanFormat,
   1839                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 189, 2);
   1840     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstHiGig,
   1841                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 191, 1);
   1842     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassPort,
   1843                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 192, 8);
   1844     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOutPort,
   1845                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 200, 6);
   1846     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpType,
   1847                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 206, 4);
   1848     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDrop,
   1849                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 210, 1);
   1850 
   1851     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4Ports,
   1852                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 0, 1);
   1853     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIntCongestionNotification,
   1854                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 1, 2);
   1855     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol,
   1856                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 6, 8);
   1857     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcIp6,
   1858                                _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2,
   1859                                _bcmFieldSliceIp6AddrSelect,
   1860                                _BCM_FIELD_EGRESS_SLICE_V6_KEY_MODE_SIP6,
   1861                                14, 128);
   1862     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstIp6,
   1863                                _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2,
   1864                                _bcmFieldSliceIp6AddrSelect,
   1865                                _BCM_FIELD_EGRESS_SLICE_V6_KEY_MODE_DIP6,
   1866                                14, 128);
   1867     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcIp6High,
   1868                                _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2,
   1869                                _bcmFieldSliceIp6AddrSelect,
   1870                                _BCM_FIELD_EGRESS_SLICE_V6_KEY_MODE_SIP_DIP_64,
   1871                                14, 64);
   1872     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstIp6High,
   1873                                _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2,
   1874                                _bcmFieldSliceIp6AddrSelect,
   1875                                _BCM_FIELD_EGRESS_SLICE_V6_KEY_MODE_SIP_DIP_64,
   1876                                78, 64);
   1877     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTos,
   1878                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 142, 8);
   1879     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyHiGigProxy,
   1880                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 150, 1);
   1881     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyHiGig,
   1882                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 151, 1);
   1883     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanId,
   1884                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 152, 12);
   1885     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInPort,
   1886                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 165, 6);
   1887     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3Routable,
   1888                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 171, 1);
   1889     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMirrorCopy,
   1890                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 172, 1);
   1891     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan,
   1892                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 173, 16);
   1893     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId,
   1894                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 173, 12);
   1895     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi,
   1896                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 185, 1);
   1897     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri,
   1898                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 186, 3);
   1899     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVlanFormat,
   1900                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 189, 2);
   1901     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstHiGig,
   1902                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 191, 1);
   1903     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassPort,
   1904                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 192, 8);
   1905     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOutPort,
   1906                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 200, 6);
   1907     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpType,
   1908                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 206, 4);
   1909     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDrop,
   1910                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 210, 1);
   1911     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIp6,
   1912                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 0, 0);
   1913 
   1914     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4Ports,
   1915                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 0, 1);
   1916     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIntCongestionNotification,
   1917                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 1, 2);
   1918     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpFrag,
   1919                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 14, 2);
   1920     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTcpControl,
   1921                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 16, 6);
   1922     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4DstPort,
   1923                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 22, 16);
   1924     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4SrcPort,
   1925                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 38, 16);
   1926     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTtl,
   1927                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 54, 8);
   1928     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstIp6,
   1929                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 62, 128);
   1930     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyExtensionHeaderSubCode,
   1931                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 190, 8);
   1932     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyExtensionHeaderType,
   1933                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 198, 8);
   1934     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpType,
   1935                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 206, 4);
   1936     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDrop,
   1937                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 210, 1);
   1938     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIp6,
   1939                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 0, 0);
   1940 
   1941     return (BCM_E_NONE);
   1942 }
   1943 
   1944 
   1945 
   1946 /*
   1947  * Function:
   1948  *     _field_hr3_qualifiers_init
   1949  * Purpose:
   1950  *     Initialize device qaualifiers select codes & offsets
   1951  * Parameters:
   1952  *     unit       - (IN) BCM device number.
   1953  *     stage_fc   - (IN) Field Processor stage control structure. 
   1954  *
   1955  * Returns:
   1956  *     BCM_E_NONE
   1957  * Notes:
   1958  */
   1959 STATIC int
   1960 _field_hr3_qualifiers_init(int unit, _field_stage_t *stage_fc)
   1961 {
   1962     int rv;           /* Operation return status. */
   1963 
   1964     /* Input parameters check. */
   1965     if (NULL == stage_fc) {
   1966         return (BCM_E_PARAM);
   1967     }
   1968 
   1969     /* Allocated stage qualifiers configuration array. */
   1970     _FP_XGS3_ALLOC(stage_fc->f_qual_arr, 
   1971                    (_bcmFieldQualifyCount * sizeof(_bcm_field_qual_info_t *)), 
   1972                    "Field qualifiers");
   1973     if (NULL == stage_fc->f_qual_arr) {
   1974         return (BCM_E_MEMORY);
   1975     }
   1976     
   1977     switch (stage_fc->stage_id) {
   1978       case _BCM_FIELD_STAGE_INGRESS:
   1979           rv = _field_hr3_ingress_qualifiers_init(unit, stage_fc);
   1980           break;
   1981       case _BCM_FIELD_STAGE_LOOKUP:
   1982           rv = _field_hr3_lookup_qualifiers_init(unit, stage_fc);
   1983           break;
   1984       case _BCM_FIELD_STAGE_EGRESS:
   1985           rv = _field_hr3_egress_qualifiers_init(unit, stage_fc);
   1986           break;
   1987       case _BCM_FIELD_STAGE_EXTERNAL:  
   1988       default: 
   1989           sal_free(stage_fc->f_qual_arr);
   1990           return (BCM_E_PARAM);
   1991     }
   1992     return (rv);
   1993 }
   1994 
   1995 
   1996 /*
   1997  * Function:
   1998  *     _bcm_field_hr3_init
   1999  * Purpose:
   2000  *     Perform initializations that are specific to BCM56160. This
   2001  *     includes initializing the FP field select bit offset tables for FPF[1-3]
   2002  *     for every stage. 
   2003  * Parameters:
   2004  *     unit       - (IN) BCM device number.
   2005  *     fc         - (IN) Field Processor control structure. 
   2006  *
   2007  * Returns:
   2008  *     BCM_E_NONE
   2009  * Notes:
   2010  */
   2011 int
   2012 _bcm_field_hr3_init(int unit, _field_control_t *fc) 
   2013 {
   2014     _field_stage_t *stage_fc; /* Stages iteration pointer */
   2015 
   2016     /* Input parameters check. */
   2017     if (NULL == fc) {
   2018         return (BCM_E_PARAM);
   2019     }
   2020 
   2021     stage_fc = fc->stages;
   2022     while (stage_fc) {
   2023         /* Clear hardware table */
   2024         BCM_IF_ERROR_RETURN(_bcm_field_tr_hw_clear(unit, stage_fc));
   2025 
   2026         /* Initialize qualifiers info. */
   2027         BCM_IF_ERROR_RETURN(_field_hr3_qualifiers_init(unit, stage_fc));
   2028 
   2029         if (_BCM_FIELD_STAGE_EXTERNAL == stage_fc->stage_id) {
   2030             _bcm_field_tr_external_init(unit, stage_fc);
   2031             stage_fc = stage_fc->next;
   2032             continue;
   2033         }
   2034 
   2035         /* Goto next stage */
   2036         stage_fc = stage_fc->next;
   2037     }
   2038 
   2039     /* Initialize the TOS_FN, TTL_FN, TCP_FN tables */
   2040     BCM_IF_ERROR_RETURN(_bcm_field_trx_tcp_ttl_tos_init(unit));
   2041     
   2042     if (0 == SOC_WARM_BOOT(unit)) {
   2043         /* Enable filter processor */
   2044         BCM_IF_ERROR_RETURN(_field_port_filter_enable_set(unit, fc, TRUE));
   2045 
   2046         /* Enable meter refresh */
   2047         BCM_IF_ERROR_RETURN(_field_meter_refresh_enable_set(unit, fc, TRUE));
   2048     }
   2049 
   2050     /* Initialize the function pointers */
   2051     _field_hr3_functions_init(&fc->functions);;
   2052 
   2053     return (BCM_E_NONE);
   2054 }
   2055 
   2056 
   2057 /*
   2058  * Function:
   2059  *     _field_hr3_functions_init
   2060  *
   2061  * Purpose:
   2062  *     Set up functions pointers 
   2063  *
   2064  * Parameters:
   2065  *     stage_fc - (IN/OUT) pointers to stage control block whe the device 
   2066  *                         and stage specific functions will be registered.
   2067  *
   2068  * Returns:
   2069  *     nothing
   2070  * Notes:
   2071  */
   2072 STATIC void
   2073 _field_hr3_functions_init(_field_funct_t *functions)
   2074 {
   2075     functions->fp_detach               = _bcm_field_tr_detach;
   2076     functions->fp_group_install        = _bcm_field_fb_group_install;
   2077     functions->fp_selcodes_install     = _bcm_field_hu2_selcodes_install;
   2078     functions->fp_slice_clear          = _bcm_field_hu2_slice_clear;
   2079     functions->fp_entry_remove         = _bcm_field_fb_entry_remove;
   2080     functions->fp_entry_move           = _bcm_field_fb_entry_move;
   2081     functions->fp_selcode_get          = _bcm_field_tr_selcode_get;
   2082     functions->fp_selcode_to_qset      = _bcm_field_selcode_to_qset;
   2083     functions->fp_qual_list_get        = _bcm_field_qual_lists_get;
   2084     functions->fp_tcam_policy_clear    = NULL;
   2085     functions->fp_tcam_policy_install  = _bcm_field_tr_entry_install;
   2086     functions->fp_tcam_policy_reinstall  = _bcm_field_tr_entry_reinstall;
   2087     functions->fp_policer_install      = _bcm_field_trx_policer_install;
   2088 /*    functions->fp_slice_reinit       = NULL; */
   2089     functions->fp_write_slice_map      = _bcm_field_gh_write_slice_map;
   2090     functions->fp_qualify_ip_type      = _bcm_field_trx_qualify_ip_type;
   2091     functions->fp_qualify_ip_type_get  = _bcm_field_trx_qualify_ip_type_get;
   2092     functions->fp_action_support_check = _bcm_field_trx_action_support_check;
   2093     functions->fp_action_conflict_check = _bcm_field_trx_action_conflict_check;
   2094     functions->fp_counter_get          = _bcm_field_tr_counter_get;
   2095     functions->fp_counter_set          = _bcm_field_tr_counter_set;
   2096     functions->fp_stat_index_get       = _bcm_field_trx_stat_index_get;
   2097     functions->fp_action_params_check  = _bcm_field_trx_action_params_check;
   2098     functions->fp_egress_key_match_type_set = 
   2099         _bcm_field_trx_egress_key_match_type_set;
   2100     functions->fp_external_entry_install  = _bcm_field_tr_external_entry_install;
   2101     functions->fp_external_entry_reinstall  = _bcm_field_tr_external_entry_reinstall;
   2102     functions->fp_external_entry_remove   = _bcm_field_tr_external_entry_remove;
   2103     functions->fp_external_entry_prio_set = _bcm_field_tr_external_entry_prio_set;
   2104     functions->fp_data_qualifier_ethertype_add = 
   2105                        _bcm_field_fb_data_qualifier_ethertype_add;
   2106     functions->fp_data_qualifier_ethertype_delete= 
   2107                        _bcm_field_fb_data_qualifier_ethertype_delete;
   2108     functions->fp_data_qualifier_ip_protocol_add = 
   2109                        _bcm_field_fb_data_qualifier_ip_protocol_add;
   2110     functions->fp_data_qualifier_ip_protocol_delete= 
   2111                        _bcm_field_fb_data_qualifier_ip_protocol_delete;
   2112     functions->fp_data_qualifier_packet_format_add= 
   2113                        _bcm_field_fb_data_qualifier_packet_format_add;
   2114     functions->fp_data_qualifier_packet_format_delete=
   2115                        _bcm_field_fb_data_qualifier_packet_format_delete;
   2116     functions->fp_stat_value_get = NULL;
   2117     functions->fp_stat_value_set = NULL;
   2118     functions->fp_control_set = _bcm_field_control_set;
   2119     functions->fp_control_get = _bcm_field_control_get;
   2120     functions->fp_stat_hw_mode_get = _bcm_field_stat_hw_mode_get;
   2121     functions->fp_stat_hw_alloc = _bcm_field_stat_hw_alloc;
   2122     functions->fp_stat_hw_free = _bcm_field_stat_hw_free;
   2123     functions->fp_group_add = NULL;
   2124     functions->fp_qualify_trunk = _bcm_field_qualify_trunk;
   2125     functions->fp_qualify_trunk_get = _bcm_field_qualify_trunk_get;
   2126     functions->fp_qualify_inports = _bcm_field_qualify_InPorts;
   2127     functions->fp_entry_stat_extended_attach = NULL;
   2128     functions->fp_entry_stat_extended_get = NULL;
   2129     functions->fp_entry_stat_detach = _bcm_field_entry_stat_detach;
   2130     functions->fp_class_size_get = NULL;
   2131     functions->fp_qualify_packet_res = _field_qualify_PacketRes;
   2132     functions->fp_qualify_packet_res_get = _field_qualify_PacketRes_get;
   2133 }
   2134 #else /* BCM_HURRICANE3_SUPPORT && BCM_FIELD_SUPPORT */
   2135 int _hurricane3_field_not_empty;
   2136 #endif  /* BCM_HURRICANE3_SUPPORT && BCM_FIELD_SUPPORT */