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 (103970B)


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