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


      1 /*
      2  * 
      3  *
      4  * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file.
      5  * 
      6  * Copyright 2007-2019 Broadcom Inc. All rights reserved.
      7  */
      8 
      9 #include <soc/defs.h>
     10 #if defined(BCM_HURRICANE_SUPPORT) && defined(BCM_FIELD_SUPPORT)
     11 
     12 #include <soc/mem.h>
     13 #include <soc/drv.h>
     14 
     15 #include <bcm/error.h>
     16 #include <bcm/l3.h>
     17 #include <bcm/field.h>
     18 #include <bcm/tunnel.h>
     19 
     20 #include <bcm_int/esw_dispatch.h>
     21 
     22 #include <bcm_int/esw/field.h>
     23 #include <bcm_int/esw/l3.h>
     24 #include <bcm_int/esw/firebolt.h>
     25 #include <bcm_int/esw/trx.h>
     26 #include <bcm_int/esw/enduro.h>
     27 #include <bcm_int/esw/triumph.h>
     28 #include <bcm_int/esw/triumph2.h>
     29 #include <bcm_int/esw/hurricane.h>
     30 
     31 
     32 /* local/static function prototypes */
     33 STATIC void _field_hu_functions_init(_field_funct_t *functions) ;
     34 
     35 /*
     36  * Function:
     37  *     _field_hu_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_hu_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, bcmFieldQualifySrcVlanGport,
    140                                _bcmFieldSliceSelFpf3, 0,
    141                                _bcmFieldSliceIngressEntitySelect,
    142                                _bcmFieldFwdEntityVlanGport, 48, 13);
    143     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMimGport,
    144                                _bcmFieldSliceSelFpf3, 0,
    145                                _bcmFieldSliceIngressEntitySelect,
    146                                _bcmFieldFwdEntityMimGport, 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, bcmFieldQualifyDstTrunk,
    198                                _bcmFieldSliceSelFpf3, 2,
    199                                _bcmFieldSliceDstFwdEntitySelect,
    200                                _bcmFieldFwdEntityGlp, 24, 17);
    201     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMplsGport,
    202                                _bcmFieldSliceSelFpf3, 2,
    203                                _bcmFieldSliceDstFwdEntitySelect,
    204                                _bcmFieldFwdEntityMplsGport, 24, 17);
    205     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstVlanGport,
    206                                _bcmFieldSliceSelFpf3, 2,
    207                                _bcmFieldSliceDstFwdEntitySelect,
    208                                _bcmFieldFwdEntityVlanGport, 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, bcmFieldQualifyDstL3Egress,
    214                                _bcmFieldSliceSelFpf3, 2,
    215                                _bcmFieldSliceDstFwdEntitySelect,
    216                                _bcmFieldFwdEntityL3Egress, 24, 17);
    217     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstL3EgressNextHops,
    218                                _bcmFieldSliceSelFpf3, 2,
    219                                _bcmFieldSliceDstFwdEntitySelect,
    220                                _bcmFieldFwdEntityL3Egress, 24, 17);
    221     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMulticastGroup,
    222                                _bcmFieldSliceSelFpf3, 2,
    223                                _bcmFieldSliceDstFwdEntitySelect,
    224                                _bcmFieldFwdEntityMulticastGroup, 24, 17);
    225     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcPort,
    226                                _bcmFieldSliceSelFpf3, 2,
    227                                _bcmFieldSliceSrcEntitySelect,
    228                                _bcmFieldFwdEntityGlp, 41, 15);
    229     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcTrunk,
    230                                _bcmFieldSliceSelFpf3, 2,
    231                                _bcmFieldSliceSrcEntitySelect,
    232                                _bcmFieldFwdEntityGlp, 41, 15);
    233     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMplsGport,
    234                                _bcmFieldSliceSelFpf3, 2,
    235                                _bcmFieldSliceSrcEntitySelect,
    236                                _bcmFieldFwdEntityMplsGport, 41, 15);
    237     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVlanGport,
    238                                _bcmFieldSliceSelFpf3, 2,
    239                                _bcmFieldSliceSrcEntitySelect,
    240                                _bcmFieldFwdEntityVlanGport, 41, 15);
    241     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMimGport,
    242                                _bcmFieldSliceSelFpf3, 2,
    243                                _bcmFieldSliceSrcEntitySelect,
    244                                _bcmFieldFwdEntityMimGport, 41, 15);
    245     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcModPortGport,
    246                                _bcmFieldSliceSelFpf3, 2,
    247                                _bcmFieldSliceSrcEntitySelect,
    248                                _bcmFieldFwdEntityModPortGport, 41, 15);
    249     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcModuleGport,
    250                                _bcmFieldSliceSelFpf3, 2,
    251                                _bcmFieldSliceSrcEntitySelect,
    252                                _bcmFieldFwdEntityModPortGport, 47, 8);
    253     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTrunkMemberSourceModuleId,
    254                                _bcmFieldSliceSelFpf3, 2,
    255                                _bcmFieldSliceSrcEntitySelect,
    256                                _bcmFieldFwdEntityModPortGport, 41+7, 8);
    257     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMHOpcode,
    258                  _bcmFieldSliceSelFpf3, 2, 56, 3);
    259 
    260     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan,
    261                  _bcmFieldSliceSelFpf3, 3, 24, 16);
    262     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId,
    263                  _bcmFieldSliceSelFpf3, 3, 24, 12);
    264     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi,
    265                  _bcmFieldSliceSelFpf3, 3, 36, 1);
    266     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri,
    267                  _bcmFieldSliceSelFpf3, 3, 37, 3);
    268     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVlanFormat,
    269                  _bcmFieldSliceSelFpf3, 3, 40, 2);
    270     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2Format,
    271                  _bcmFieldSliceSelFpf3, 3, 42, 2);
    272     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTranslatedVlanFormat,
    273                  _bcmFieldSliceSelFpf3, 3, 44, 2);
    274     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMHOpcode,
    275                  _bcmFieldSliceSelFpf3, 3, 46, 3);
    276     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyPacketRes,
    277                  _bcmFieldSliceSelFpf3, 3, 49, 5);
    278     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpInfo,
    279                  _bcmFieldSliceSelFpf3, 3, 54, 3);
    280 
    281     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan,
    282                  _bcmFieldSliceSelFpf3, 4, 24, 16);
    283     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId,
    284                  _bcmFieldSliceSelFpf3, 4, 24, 12);
    285     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi,
    286                  _bcmFieldSliceSelFpf3, 4, 36, 1);
    287     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri,
    288                  _bcmFieldSliceSelFpf3, 4, 37, 3);
    289     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlan,
    290                  _bcmFieldSliceSelFpf3, 4, 40, 16);
    291     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanId,
    292                  _bcmFieldSliceSelFpf3, 4, 40, 12);
    293     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanCfi,
    294                  _bcmFieldSliceSelFpf3, 4, 52, 1);
    295     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanPri,
    296                  _bcmFieldSliceSelFpf3, 4, 53, 3);
    297 
    298     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan,
    299                  _bcmFieldSliceSelFpf3, 5, 24, 16);
    300     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId,
    301                  _bcmFieldSliceSelFpf3, 5, 24, 12);
    302     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi,
    303                  _bcmFieldSliceSelFpf3, 5, 36, 1);
    304     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri,
    305                  _bcmFieldSliceSelFpf3, 5, 37, 3);
    306     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyEtherType,
    307                  _bcmFieldSliceSelFpf3, 5, 40, 16);
    308 
    309     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMplsTerminated,
    310                  _bcmFieldSliceSelFpf3, 6, 24, 1);
    311     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVlanTranslationHit,
    312                  _bcmFieldSliceSelFpf3, 6, 25, 1);
    313     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyForwardingVlanValid,
    314                  _bcmFieldSliceSelFpf3, 6, 26, 1);
    315     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIngressStpState,
    316                  _bcmFieldSliceSelFpf3, 6, 27, 2);
    317     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2SrcHit,
    318                  _bcmFieldSliceSelFpf3, 6, 29, 1);
    319     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2SrcStatic,
    320                  _bcmFieldSliceSelFpf3, 6, 30, 1);
    321     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2DestHit,
    322                  _bcmFieldSliceSelFpf3, 6, 31, 1);
    323     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2CacheHit,
    324                  _bcmFieldSliceSelFpf3, 6, 33, 1);
    325     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3SrcHostHit,
    326                  _bcmFieldSliceSelFpf3, 6, 34, 1);
    327     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3DestHostHit,
    328                  _bcmFieldSliceSelFpf3, 6, 35, 1);
    329     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpmcStarGroupHit,
    330                  _bcmFieldSliceSelFpf3, 6, 36, 1);
    331     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3DestRouteHit,
    332                  _bcmFieldSliceSelFpf3, 6, 37, 1);
    333     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2StationMove,
    334                  _bcmFieldSliceSelFpf3, 6, 38, 1);
    335     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDosAttack,
    336                  _bcmFieldSliceSelFpf3, 6, 39, 1);
    337     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlan,
    338                  _bcmFieldSliceSelFpf3, 6, 40, 16);
    339     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanId,
    340                  _bcmFieldSliceSelFpf3, 6, 40, 12);
    341     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanCfi,
    342                  _bcmFieldSliceSelFpf3, 6, 52, 1);
    343     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanPri,
    344                  _bcmFieldSliceSelFpf3, 6, 53, 3);
    345     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyRangeCheck,
    346                  _bcmFieldSliceSelFpf3, 7, 24, 24);
    347     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, _bcmFieldQualifyRangeCheckBits24_31,
    348                                _bcmFieldSliceSelFpf3, 7,
    349                                _bcmFieldSliceIntfClassSelect, 3, 48, 8);
    350     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassPort,
    351                                _bcmFieldSliceSelFpf3, 7,
    352                                _bcmFieldSliceIntfClassSelect, 0, 48, 8);
    353     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassL3,
    354                                _bcmFieldSliceSelFpf3, 7,
    355                                _bcmFieldSliceIntfClassSelect, 1, 48, 8);
    356     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassL2,
    357                                _bcmFieldSliceSelFpf3, 7,
    358                                _bcmFieldSliceIntfClassSelect, 2, 48, 8);
    359     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIp6FlowLabel,
    360                  _bcmFieldSliceSelFpf3, 8, 24, 20);
    361     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVlanFormat,
    362                  _bcmFieldSliceSelFpf3, 8, 44, 2);
    363     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2Format,
    364                  _bcmFieldSliceSelFpf3, 8, 46, 2);
    365     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTranslatedVlanFormat,
    366                  _bcmFieldSliceSelFpf3, 8, 48, 2);
    367     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerTpid,
    368                  _bcmFieldSliceSelFpf3, 8, 50, 2);
    369     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterTpid,
    370                  _bcmFieldSliceSelFpf3, 8, 52, 2);
    371     _FP_QUAL_ADD(unit, stage_fc, _bcmFieldQualifyData3,
    372                  _bcmFieldSliceSelFpf3, 9, 24, 32);
    373 
    374     /* FPF2 */
    375     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTtl,
    376                  _bcmFieldSliceSelFpf2, 0,
    377                  _bcmFieldSliceTtlClassSelect, 0,
    378                  61, 8);
    379     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTtlClassZero,
    380                  _bcmFieldSliceSelFpf2, 0,
    381                  _bcmFieldSliceTtlClassSelect, 0,
    382                  61, 8);
    383     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTtlClassOne,
    384                  _bcmFieldSliceSelFpf2, 0,
    385                  _bcmFieldSliceTtlClassSelect, 1,
    386                  61, 8);
    387     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTcpControl,
    388                  _bcmFieldSliceSelFpf2, 0,
    389                  _bcmFieldSliceTcpClassSelect, 0,
    390                  69, 6);
    391     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTcpClassZero,
    392                  _bcmFieldSliceSelFpf2, 0,
    393                  _bcmFieldSliceTcpClassSelect, 0,
    394                  69, 6);
    395     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTcpClassOne,
    396                  _bcmFieldSliceSelFpf2, 0,
    397                  _bcmFieldSliceTcpClassSelect, 1,
    398                  69, 6);
    399     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpFlags,
    400                  _bcmFieldSliceSelFpf2, 0, 75, 2);
    401     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTos,
    402                  _bcmFieldSliceSelFpf2, 0,
    403                  _bcmFieldSliceTosClassSelect, 0,
    404                  77, 8);
    405     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTosClassZero,
    406                  _bcmFieldSliceSelFpf2, 0,
    407                  _bcmFieldSliceTosClassSelect, 0,
    408                  77, 8);
    409     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTosClassOne,
    410                  _bcmFieldSliceSelFpf2, 0,
    411                  _bcmFieldSliceTosClassSelect, 1,
    412                  77, 8);
    413     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4DstPort,
    414                  _bcmFieldSliceSelFpf2, 0, 85, 16);
    415     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4SrcPort,
    416                  _bcmFieldSliceSelFpf2, 0, 101, 16);
    417     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol,
    418                  _bcmFieldSliceSelFpf2, 0, 117, 8);
    419     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstIp,
    420                  _bcmFieldSliceSelFpf2, 0, 125, 32);
    421     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcIp,
    422                  _bcmFieldSliceSelFpf2, 0, 157, 32);
    423 
    424     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTtl,
    425                  _bcmFieldSliceSelFpf2, 1,
    426                  _bcmFieldSliceTtlClassSelect, 0,
    427                  61, 8);
    428     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTtlClassZero,
    429                  _bcmFieldSliceSelFpf2, 1,
    430                  _bcmFieldSliceTtlClassSelect, 0,
    431                  61, 8);
    432     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTtlClassOne,
    433                  _bcmFieldSliceSelFpf2, 1,
    434                  _bcmFieldSliceTtlClassSelect, 1,
    435                  61, 8);
    436     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTcpControl,
    437                  _bcmFieldSliceSelFpf2, 1,
    438                  _bcmFieldSliceTcpClassSelect, 0,
    439                  69, 6);
    440     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTcpClassZero,
    441                  _bcmFieldSliceSelFpf2, 1,
    442                  _bcmFieldSliceTcpClassSelect, 0,
    443                  69, 6);
    444     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTcpClassOne,
    445                  _bcmFieldSliceSelFpf2, 1,
    446                  _bcmFieldSliceTcpClassSelect, 1,
    447                  69, 6);
    448     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpFrag,
    449                  _bcmFieldSliceSelFpf2, 1, 75, 2);
    450     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTos,
    451                  _bcmFieldSliceSelFpf2, 1,
    452                  _bcmFieldSliceTosClassSelect, 0,
    453                  77, 8);
    454     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTosClassZero,
    455                  _bcmFieldSliceSelFpf2, 1,
    456                  _bcmFieldSliceTosClassSelect, 0,
    457                  77, 8);
    458     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTosClassOne,
    459                  _bcmFieldSliceSelFpf2, 1,
    460                  _bcmFieldSliceTosClassSelect, 1,
    461                  77, 8);
    462     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4DstPort,
    463                  _bcmFieldSliceSelFpf2, 1, 85, 16);
    464     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4SrcPort,
    465                  _bcmFieldSliceSelFpf2, 1, 101, 16);
    466     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol,
    467                  _bcmFieldSliceSelFpf2, 1, 117, 8);
    468     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstIp,
    469                  _bcmFieldSliceSelFpf2, 1, 125, 32);
    470     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcIp,
    471                  _bcmFieldSliceSelFpf2, 1, 157, 32);
    472 
    473     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcIp6,
    474                  _bcmFieldSliceSelFpf2, 2, 61, 128);
    475 
    476     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstIp6,
    477                  _bcmFieldSliceSelFpf2, 3, 61, 128);
    478 
    479     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTtl,
    480                  _bcmFieldSliceSelFpf2, 4,
    481                  _bcmFieldSliceTtlClassSelect, 0,
    482                  61, 8);
    483     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTtlClassZero,
    484                  _bcmFieldSliceSelFpf2, 4,
    485                  _bcmFieldSliceTtlClassSelect, 0,
    486                  61, 8);
    487     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTtlClassOne,
    488                  _bcmFieldSliceSelFpf2, 4,
    489                  _bcmFieldSliceTtlClassSelect, 1,
    490                  61, 8);
    491     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTcpControl,
    492                  _bcmFieldSliceSelFpf2, 4,
    493                  _bcmFieldSliceTcpClassSelect, 0,
    494                  69, 6);
    495     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTcpClassZero,
    496                  _bcmFieldSliceSelFpf2, 4,
    497                  _bcmFieldSliceTcpClassSelect, 0,
    498                  69, 6);
    499     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTcpClassOne,
    500                  _bcmFieldSliceSelFpf2, 4,
    501                  _bcmFieldSliceTcpClassSelect, 1,
    502                  69, 6);
    503     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIp6FlowLabel,
    504                  _bcmFieldSliceSelFpf2, 4, 75, 20);
    505     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTos,
    506                  _bcmFieldSliceSelFpf2, 4,
    507                  _bcmFieldSliceTosClassSelect, 0,
    508                  95, 8);
    509     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTosClassZero,
    510                  _bcmFieldSliceSelFpf2, 4,
    511                  _bcmFieldSliceTosClassSelect, 0,
    512                  95, 8);
    513     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTosClassOne,
    514                  _bcmFieldSliceSelFpf2, 4,
    515                  _bcmFieldSliceTosClassSelect, 1,
    516                  95, 8);
    517     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol,
    518                  _bcmFieldSliceSelFpf2, 4, 103, 8);
    519     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstIp6High,
    520                  _bcmFieldSliceSelFpf2, 4, 125, 64);
    521 
    522     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan,
    523                  _bcmFieldSliceSelFpf2, 5, 61, 16);
    524     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId,
    525                  _bcmFieldSliceSelFpf2, 5, 61, 12);
    526     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi,
    527                  _bcmFieldSliceSelFpf2, 5, 73, 1);
    528     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri,
    529                  _bcmFieldSliceSelFpf2, 5, 74, 3);
    530     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyEtherType,
    531                  _bcmFieldSliceSelFpf2, 5, 77, 16);
    532     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcMac,
    533                  _bcmFieldSliceSelFpf2, 5, 93, 48);
    534     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstMac,
    535                  _bcmFieldSliceSelFpf2, 5, 141, 48);
    536 
    537     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan,
    538                  _bcmFieldSliceSelFpf2, 6, 61, 16);
    539     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId,
    540                  _bcmFieldSliceSelFpf2, 6, 61, 12);
    541     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi,
    542                  _bcmFieldSliceSelFpf2, 6, 73, 1);
    543     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri,
    544                  _bcmFieldSliceSelFpf2, 6, 74, 3);
    545     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyEtherType,
    546                  _bcmFieldSliceSelFpf2, 6, 77, 16);
    547     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcMac,
    548                  _bcmFieldSliceSelFpf2, 6, 93, 48);
    549     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcIp,
    550                  _bcmFieldSliceSelFpf2, 6, 141, 32);
    551 
    552     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan,
    553                  _bcmFieldSliceSelFpf2, 7, 61, 16);
    554     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId,
    555                  _bcmFieldSliceSelFpf2, 7, 61, 12);
    556     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi,
    557                  _bcmFieldSliceSelFpf2, 7, 73, 1);
    558     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri,
    559                  _bcmFieldSliceSelFpf2, 7, 74, 3);
    560     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyEtherType,
    561                  _bcmFieldSliceSelFpf2, 7, 77, 16);
    562     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTtl,
    563                  _bcmFieldSliceSelFpf2, 7,
    564                  _bcmFieldSliceTtlClassSelect, 0,
    565                  93, 8);
    566     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTtlClassZero,
    567                  _bcmFieldSliceSelFpf2, 7,
    568                  _bcmFieldSliceTtlClassSelect, 0,
    569                  93, 8);
    570     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTtlClassOne,
    571                  _bcmFieldSliceSelFpf2, 7,
    572                  _bcmFieldSliceTtlClassSelect, 1,
    573                  93, 8);
    574     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol,
    575                  _bcmFieldSliceSelFpf2, 7, 101, 8);
    576     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstIp,
    577                  _bcmFieldSliceSelFpf2, 7, 109, 32);
    578     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstMac,
    579                  _bcmFieldSliceSelFpf2, 7, 141, 48);
    580 
    581     _FP_QUAL_ADD(unit, stage_fc, _bcmFieldQualifyData0,
    582                  _bcmFieldSliceSelFpf2, 8, 61, 128);
    583 
    584     _FP_QUAL_ADD(unit, stage_fc, _bcmFieldQualifyData1,
    585                  _bcmFieldSliceSelFpf2, 9, 61, 128);
    586 
    587     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcIp6High,
    588                  _bcmFieldSliceSelFpf2, 10, 61, 64);
    589     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstIp6High,
    590                  _bcmFieldSliceSelFpf2, 10, 125, 64);
    591 
    592 
    593     /* FPF1 */ 
    594     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL2,
    595                                _bcmFieldSliceSelFpf1, 0,
    596                                _bcmFieldSliceDstClassSelect, 0, 189, 6);
    597     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL3,
    598                                _bcmFieldSliceSelFpf1, 0,
    599                                _bcmFieldSliceDstClassSelect, 1, 189, 6);
    600     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField,
    601                                _bcmFieldSliceSelFpf1, 0,
    602                                _bcmFieldSliceDstClassSelect, 2, 189, 6);
    603     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField,
    604                                _bcmFieldSliceSelFpf1, 0,
    605                                _bcmFieldSliceSrcClassSelect, 2, 195, 6);
    606     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL2,
    607                                _bcmFieldSliceSelFpf1, 0,
    608                                _bcmFieldSliceSrcClassSelect, 0, 195, 6);
    609     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL3,
    610                                _bcmFieldSliceSelFpf1, 0,
    611                                _bcmFieldSliceSrcClassSelect, 1, 195, 6);
    612     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField,
    613                                _bcmFieldSliceSelFpf1, 0,
    614                                _bcmFieldSliceSrcClassSelect, 3, 195, 6);
    615     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField,
    616                                _bcmFieldSliceSelFpf1, 0,
    617                                _bcmFieldSliceDstClassSelect, 3, 189, 6);
    618     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVrf,
    619                                _bcmFieldSliceSelFpf1, 0,
    620                                _bcmFieldSliceFwdFieldSelect, 
    621                                _bcmFieldFwdFieldVrf, 201, 12);
    622     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVpn,
    623                                _bcmFieldSliceSelFpf1, 0,
    624                                _bcmFieldSliceFwdFieldSelect, 
    625                                _bcmFieldFwdFieldVpn, 201, 12);
    626     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 
    627                                bcmFieldQualifyForwardingVlanId,
    628                                _bcmFieldSliceSelFpf1, 0,
    629                                _bcmFieldSliceFwdFieldSelect, 
    630                                _bcmFieldFwdFieldVlan, 201, 12);
    631     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMplsGport,
    632                                _bcmFieldSliceSelFpf1, 0,
    633                                _bcmFieldSliceIngressEntitySelect,
    634                                _bcmFieldFwdEntityMplsGport, 213, 13);
    635     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVlanGport,
    636                                _bcmFieldSliceSelFpf1, 0,
    637                                _bcmFieldSliceIngressEntitySelect,
    638                                _bcmFieldFwdEntityVlanGport, 213, 13);
    639     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMimGport,
    640                                _bcmFieldSliceSelFpf1, 0,
    641                                _bcmFieldSliceIngressEntitySelect,
    642                                _bcmFieldFwdEntityMimGport, 213, 13);
    643     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyL3Ingress,
    644                                _bcmFieldSliceSelFpf1, 0,
    645                                _bcmFieldSliceIngressEntitySelect,
    646                                _bcmFieldFwdEntityL3Egress, 213, 13);
    647 
    648     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstPort,
    649                                _bcmFieldSliceSelFpf1, 1,
    650                                _bcmFieldSliceDstFwdEntitySelect,
    651                                _bcmFieldFwdEntityGlp, 189, 17);
    652     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstTrunk,
    653                                _bcmFieldSliceSelFpf1, 1,
    654                                _bcmFieldSliceDstFwdEntitySelect,
    655                                _bcmFieldFwdEntityGlp, 189, 17);
    656     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMplsGport,
    657                                _bcmFieldSliceSelFpf1, 1,
    658                                _bcmFieldSliceDstFwdEntitySelect,
    659                                _bcmFieldFwdEntityMplsGport, 189, 17);
    660     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstVlanGport,
    661                                _bcmFieldSliceSelFpf1, 1,
    662                                _bcmFieldSliceDstFwdEntitySelect,
    663                                _bcmFieldFwdEntityVlanGport, 189, 17);
    664     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMimGport,
    665                                _bcmFieldSliceSelFpf1, 1,
    666                                _bcmFieldSliceDstFwdEntitySelect,
    667                                _bcmFieldFwdEntityMimGport, 189, 17);
    668     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstL3Egress,
    669                                _bcmFieldSliceSelFpf1, 1,
    670                                _bcmFieldSliceDstFwdEntitySelect,
    671                                _bcmFieldFwdEntityL3Egress, 189, 17);
    672     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstL3EgressNextHops,
    673                                _bcmFieldSliceSelFpf1, 1,
    674                                _bcmFieldSliceDstFwdEntitySelect,
    675                                _bcmFieldFwdEntityL3Egress, 189, 17);
    676     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMulticastGroup,
    677                                _bcmFieldSliceSelFpf1, 1,
    678                                _bcmFieldSliceDstFwdEntitySelect,
    679                                _bcmFieldFwdEntityMulticastGroup, 189, 17);
    680     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcPort,
    681                                _bcmFieldSliceSelFpf1, 1,
    682                                _bcmFieldSliceSrcEntitySelect,
    683                                _bcmFieldFwdEntityGlp, 206, 15);
    684     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcTrunk,
    685                                _bcmFieldSliceSelFpf1, 1,
    686                                _bcmFieldSliceSrcEntitySelect,
    687                                _bcmFieldFwdEntityGlp, 206, 15);
    688     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMplsGport,
    689                                _bcmFieldSliceSelFpf1, 1,
    690                                _bcmFieldSliceSrcEntitySelect,
    691                                _bcmFieldFwdEntityMplsGport, 206, 15);
    692     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVlanGport,
    693                                _bcmFieldSliceSelFpf1, 1,
    694                                _bcmFieldSliceSrcEntitySelect,
    695                                _bcmFieldFwdEntityVlanGport, 206, 15);
    696     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMimGport,
    697                                _bcmFieldSliceSelFpf1, 1,
    698                                _bcmFieldSliceSrcEntitySelect,
    699                                _bcmFieldFwdEntityMimGport, 206, 15);
    700     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcModPortGport,
    701                                _bcmFieldSliceSelFpf1, 1,
    702                                _bcmFieldSliceSrcEntitySelect,
    703                                _bcmFieldFwdEntityModPortGport, 206, 15);
    704     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcModuleGport,
    705                                _bcmFieldSliceSelFpf1, 1,
    706                                _bcmFieldSliceSrcEntitySelect,
    707                                _bcmFieldFwdEntityModPortGport, 212, 8);
    708     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTrunkMemberSourceModuleId,
    709                                _bcmFieldSliceSelFpf1, 1,
    710                                _bcmFieldSliceSrcEntitySelect,
    711                                _bcmFieldFwdEntityModPortGport, 206 + 7, 8);
    712     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMHOpcode,
    713                  _bcmFieldSliceSelFpf1, 1, 221, 3);
    714 
    715 
    716     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstPort,
    717                                _bcmFieldSliceSelFpf1, 2,
    718                                _bcmFieldSliceDstFwdEntitySelect,
    719                                _bcmFieldFwdEntityGlp, 189, 17);
    720     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstTrunk,
    721                                _bcmFieldSliceSelFpf1, 2,
    722                                _bcmFieldSliceDstFwdEntitySelect,
    723                                _bcmFieldFwdEntityGlp, 189, 17);
    724     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMplsGport,
    725                                _bcmFieldSliceSelFpf1, 2,
    726                                _bcmFieldSliceDstFwdEntitySelect,
    727                                _bcmFieldFwdEntityMplsGport, 189, 17);
    728     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstVlanGport,
    729                                _bcmFieldSliceSelFpf1, 2,
    730                                _bcmFieldSliceDstFwdEntitySelect,
    731                                _bcmFieldFwdEntityVlanGport, 189, 17);
    732     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMimGport,
    733                                _bcmFieldSliceSelFpf1, 2,
    734                                _bcmFieldSliceDstFwdEntitySelect,
    735                                _bcmFieldFwdEntityMimGport, 189, 17);
    736     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstL3Egress,
    737                                _bcmFieldSliceSelFpf1, 2,
    738                                _bcmFieldSliceDstFwdEntitySelect,
    739                                _bcmFieldFwdEntityL3Egress, 189, 17);
    740     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstL3EgressNextHops,
    741                                _bcmFieldSliceSelFpf1, 2,
    742                                _bcmFieldSliceDstFwdEntitySelect,
    743                                _bcmFieldFwdEntityL3Egress, 189, 17);
    744     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMulticastGroup,
    745                                _bcmFieldSliceSelFpf1, 2,
    746                                _bcmFieldSliceDstFwdEntitySelect,
    747                                _bcmFieldFwdEntityMulticastGroup, 189, 17);
    748     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMHOpcode,
    749                  _bcmFieldSliceSelFpf1, 2, 206, 3);
    750     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL2,
    751                                _bcmFieldSliceSelFpf1, 2,
    752                                _bcmFieldSliceDstClassSelect, 0, 209, 6);
    753     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL3,
    754                                _bcmFieldSliceSelFpf1, 2,
    755                                _bcmFieldSliceDstClassSelect, 1, 209, 6);
    756     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField,
    757                                _bcmFieldSliceSelFpf1, 2,
    758                                _bcmFieldSliceDstClassSelect, 2, 209, 6);
    759     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField,
    760                                _bcmFieldSliceSelFpf1, 2,
    761                                _bcmFieldSliceSrcClassSelect, 2, 215, 6);
    762     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL2,
    763                                _bcmFieldSliceSelFpf1, 2,
    764                                _bcmFieldSliceSrcClassSelect, 0, 215, 6);
    765     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL3,
    766                                _bcmFieldSliceSelFpf1, 2,
    767                                _bcmFieldSliceSrcClassSelect, 1, 215, 6);
    768     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField,
    769                                _bcmFieldSliceSelFpf1, 2,
    770                                _bcmFieldSliceSrcClassSelect, 3, 215, 6);
    771     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField,
    772                                _bcmFieldSliceSelFpf1, 2,
    773                                _bcmFieldSliceDstClassSelect, 3, 209, 6);
    774 
    775     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan,
    776                  _bcmFieldSliceSelFpf1, 3, 189, 16);
    777     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId,
    778                  _bcmFieldSliceSelFpf1, 3, 189, 12);
    779     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi,
    780                  _bcmFieldSliceSelFpf1, 3, 201, 1);
    781     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri,
    782                  _bcmFieldSliceSelFpf1, 3, 202, 3);
    783     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlan,
    784                  _bcmFieldSliceSelFpf1, 3, 205, 16);
    785     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanId,
    786                  _bcmFieldSliceSelFpf1, 3, 205, 12);
    787     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanCfi,
    788                  _bcmFieldSliceSelFpf1, 3, 217, 1);
    789     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanPri,
    790                  _bcmFieldSliceSelFpf1, 3, 218, 3);
    791     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterTpid,
    792                  _bcmFieldSliceSelFpf1, 3, 221, 2);
    793 
    794     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan,
    795                  _bcmFieldSliceSelFpf1, 4, 189, 16);
    796     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId,
    797                  _bcmFieldSliceSelFpf1, 4, 189, 12);
    798     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi,
    799                  _bcmFieldSliceSelFpf1, 4, 201, 1);
    800     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri,
    801                  _bcmFieldSliceSelFpf1, 4, 202, 3);
    802     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyEtherType,
    803                  _bcmFieldSliceSelFpf1, 4, 205, 16);
    804 
    805     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMplsTerminated,
    806                  _bcmFieldSliceSelFpf1, 5, 189, 1);
    807     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVlanTranslationHit,
    808                  _bcmFieldSliceSelFpf1, 5, 190, 1);
    809     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyForwardingVlanValid,
    810                  _bcmFieldSliceSelFpf1, 5, 191, 1);
    811     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIngressStpState,
    812                  _bcmFieldSliceSelFpf1, 5, 192, 2);
    813     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2SrcHit,
    814                  _bcmFieldSliceSelFpf1, 5, 194, 1);
    815     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2SrcStatic,
    816                  _bcmFieldSliceSelFpf1, 5, 195, 1);
    817     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2DestHit,
    818                  _bcmFieldSliceSelFpf1, 5, 196, 1);
    819     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2CacheHit,
    820                  _bcmFieldSliceSelFpf1, 5, 198, 1);
    821     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3SrcHostHit,
    822                  _bcmFieldSliceSelFpf1, 5, 199, 1);
    823     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3DestHostHit,
    824                  _bcmFieldSliceSelFpf1, 5, 200, 1);
    825     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpmcStarGroupHit,
    826                  _bcmFieldSliceSelFpf1, 5, 201, 1);
    827     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3DestRouteHit,
    828                  _bcmFieldSliceSelFpf1, 5, 202, 1);
    829     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2StationMove,
    830                  _bcmFieldSliceSelFpf1, 5, 203, 1);
    831     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDosAttack,
    832                  _bcmFieldSliceSelFpf1, 5, 204, 1);
    833     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlan,
    834                  _bcmFieldSliceSelFpf1, 5, 205, 16);
    835     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanId,
    836                  _bcmFieldSliceSelFpf1, 5, 205, 12);
    837     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanCfi,
    838                  _bcmFieldSliceSelFpf1, 5, 217, 1);
    839     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanPri,
    840                  _bcmFieldSliceSelFpf1, 5, 218, 3);
    841     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerTpid,
    842                  _bcmFieldSliceSelFpf1, 5, 221, 2);
    843 
    844     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan,
    845                  _bcmFieldSliceSelFpf1, 6, 189, 16);
    846     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId,
    847                  _bcmFieldSliceSelFpf1, 6, 189, 12);
    848     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi,
    849                  _bcmFieldSliceSelFpf1, 6, 201, 1);
    850     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri,
    851                  _bcmFieldSliceSelFpf1, 6, 202, 3);
    852     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVlanFormat,
    853                  _bcmFieldSliceSelFpf1, 6, 205, 2);
    854     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2Format,
    855                  _bcmFieldSliceSelFpf1, 6, 207, 2);
    856     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTranslatedVlanFormat,
    857                  _bcmFieldSliceSelFpf1, 6, 209, 2);
    858     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMHOpcode,
    859                  _bcmFieldSliceSelFpf1, 6, 211, 3);
    860     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyPacketRes,
    861                  _bcmFieldSliceSelFpf1, 6, 214, 5);
    862     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpInfo,
    863                  _bcmFieldSliceSelFpf1, 6, 219, 3);
    864 
    865 
    866     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan,
    867                  _bcmFieldSliceSelFpf1, 7, 189, 16);
    868     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId,
    869                  _bcmFieldSliceSelFpf1, 7, 189, 12);
    870     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi,
    871                  _bcmFieldSliceSelFpf1, 7, 201, 1);
    872     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri,
    873                  _bcmFieldSliceSelFpf1, 7, 202, 3);
    874     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL2,
    875                                _bcmFieldSliceSelFpf1, 7,
    876                                _bcmFieldSliceDstClassSelect, 0, 205, 6);
    877     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL3,
    878                                _bcmFieldSliceSelFpf1, 7,
    879                                _bcmFieldSliceDstClassSelect, 1, 205, 6);
    880     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField,
    881                                _bcmFieldSliceSelFpf1, 7,
    882                                _bcmFieldSliceSrcClassSelect, 3, 205, 6);
    883     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField,
    884                                _bcmFieldSliceSelFpf1, 7,
    885                                _bcmFieldSliceSrcClassSelect, 2, 205, 6);
    886     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVrf,
    887                                _bcmFieldSliceSelFpf1, 7,
    888                                _bcmFieldSliceFwdFieldSelect, 
    889                                _bcmFieldFwdFieldVrf, 211, 12);
    890     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVpn,
    891                                _bcmFieldSliceSelFpf1, 7,
    892                                _bcmFieldSliceFwdFieldSelect, 
    893                                _bcmFieldFwdFieldVpn, 211, 12);
    894     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 
    895                                bcmFieldQualifyForwardingVlanId,
    896                                _bcmFieldSliceSelFpf1, 7,
    897                                _bcmFieldSliceFwdFieldSelect, 
    898                                _bcmFieldFwdFieldVlan, 211, 12);
    899 
    900 
    901     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol,
    902                  _bcmFieldSliceSelFpf1, 8, 189, 8);
    903     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTos,
    904                  _bcmFieldSliceSelFpf1, 8,
    905                  _bcmFieldSliceTosClassSelect, 0,
    906                  197, 8);
    907     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTosClassZero,
    908                  _bcmFieldSliceSelFpf1, 8,
    909                  _bcmFieldSliceTosClassSelect, 0,
    910                  197, 8);
    911     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTosClassOne,
    912                  _bcmFieldSliceSelFpf1, 8,
    913                  _bcmFieldSliceTosClassSelect, 1,
    914                  197, 8);
    915     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL2,
    916                                _bcmFieldSliceSelFpf1, 8,
    917                                _bcmFieldSliceDstClassSelect, 0, 205, 6);
    918     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL3,
    919                                _bcmFieldSliceSelFpf1, 8,
    920                                _bcmFieldSliceDstClassSelect, 1, 205, 6);
    921     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField,
    922                                _bcmFieldSliceSelFpf1, 8,
    923                                _bcmFieldSliceSrcClassSelect, 3, 205, 6);
    924     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField,
    925                                _bcmFieldSliceSelFpf1, 8,
    926                                _bcmFieldSliceSrcClassSelect, 2, 205, 6);
    927     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVrf,
    928                                _bcmFieldSliceSelFpf1, 8,
    929                                _bcmFieldSliceFwdFieldSelect, 
    930                                _bcmFieldFwdFieldVrf, 211, 12);
    931     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVpn,
    932                                _bcmFieldSliceSelFpf1, 8,
    933                                _bcmFieldSliceFwdFieldSelect, 
    934                                _bcmFieldFwdFieldVpn, 211, 12);
    935     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 
    936                                bcmFieldQualifyForwardingVlanId,
    937                                _bcmFieldSliceSelFpf1, 8,
    938                                _bcmFieldSliceFwdFieldSelect, 
    939                                _bcmFieldFwdFieldVlan, 211, 12);
    940     _FP_QUAL_ADD(unit, stage_fc, _bcmFieldQualifyData2,
    941                                _bcmFieldSliceSelFpf1, 9, 189, 32);
    942 
    943     /* DWF4 */
    944     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyTcpControl,
    945                             _bcmFieldSliceSelFpf4, 1,
    946                             _bcmFieldSliceTcpClassSelect, 0, 0, 6);
    947     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyTcpClassZero,
    948                             _bcmFieldSliceSelFpf4, 1,
    949                             _bcmFieldSliceTcpClassSelect, 0, 0, 6);
    950     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyTcpClassOne,
    951                             _bcmFieldSliceSelFpf4, 1,
    952                             _bcmFieldSliceTcpClassSelect, 1, 0, 6);
    953 
    954     /* DWF3 */
    955     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyTos,
    956                             _bcmFieldSliceSelDisable, 0,
    957                             _bcmFieldSliceTosClassSelect, 0, 7, 8);
    958     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyTosClassZero,
    959                             _bcmFieldSliceSelDisable, 0,
    960                             _bcmFieldSliceTosClassSelect, 0, 7, 8);
    961     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyTosClassOne,
    962                             _bcmFieldSliceSelDisable, 0,
    963                             _bcmFieldSliceTosClassSelect, 1, 7, 8);
    964     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol,
    965                             _bcmFieldSliceSelDisable, 0,
    966                             _bcmFieldSliceSelDisable, 0, 15, 8);
    967     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc,
    968                             bcmFieldQualifyExtensionHeaderSubCode,
    969                             _bcmFieldSliceSelDisable, 0,
    970                             _bcmFieldSliceSelDisable, 0, 23, 8);
    971     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyExtensionHeaderType,
    972                             _bcmFieldSliceSelDisable, 0,
    973                             _bcmFieldSliceSelDisable, 0, 31, 8);
    974 
    975     /* DWF2 */
    976     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyMplsTerminated,
    977                             _bcmFieldSliceSelFpf2, 0,
    978                             _bcmFieldSliceSelDisable, 0, 55, 1);
    979     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyVlanTranslationHit,
    980                             _bcmFieldSliceSelFpf2, 0,
    981                             _bcmFieldSliceSelDisable, 0, 56, 1);
    982     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyForwardingVlanValid,
    983                             _bcmFieldSliceSelFpf2, 0,
    984                             _bcmFieldSliceSelDisable, 0, 57, 1);
    985     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyIngressStpState,
    986                             _bcmFieldSliceSelFpf2, 0,
    987                             _bcmFieldSliceSelDisable, 0, 58, 2);
    988     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyL2SrcHit,
    989                             _bcmFieldSliceSelFpf2, 0,
    990                             _bcmFieldSliceSelDisable, 0, 60, 1);
    991     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyL2SrcStatic,
    992                             _bcmFieldSliceSelFpf2, 0,
    993                             _bcmFieldSliceSelDisable, 0, 61, 1);
    994     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyL2DestHit,
    995                             _bcmFieldSliceSelFpf2, 0,
    996                             _bcmFieldSliceSelDisable, 0, 62, 1);
    997     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyL2CacheHit,
    998                             _bcmFieldSliceSelFpf2, 0,
    999                             _bcmFieldSliceSelDisable, 0, 64, 1);
   1000     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyL3SrcHostHit,
   1001                             _bcmFieldSliceSelFpf2, 0,
   1002                             _bcmFieldSliceSelDisable, 0, 65, 1);
   1003     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyL3DestHostHit,
   1004                             _bcmFieldSliceSelFpf2, 0,
   1005                             _bcmFieldSliceSelDisable, 0, 66, 1);
   1006     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyIpmcStarGroupHit,
   1007                             _bcmFieldSliceSelFpf2, 0,
   1008                             _bcmFieldSliceSelDisable, 0, 67, 1);
   1009     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyL3DestRouteHit,
   1010                             _bcmFieldSliceSelFpf2, 0,
   1011                             _bcmFieldSliceSelDisable, 0, 68, 1);
   1012     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyL2StationMove,
   1013                             _bcmFieldSliceSelFpf2, 0,
   1014                             _bcmFieldSliceSelDisable, 0, 69, 1);
   1015     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyDosAttack,
   1016                             _bcmFieldSliceSelFpf2, 0,
   1017                             _bcmFieldSliceSelDisable, 0, 70, 1);
   1018     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyRangeCheck,
   1019                             _bcmFieldSliceSelFpf2, 0,
   1020                             _bcmFieldSliceSelDisable, 0, 71, 24);
   1021     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, _bcmFieldQualifyRangeCheckBits24_31,
   1022                             _bcmFieldSliceSelFpf2, 0,
   1023                             _bcmFieldSliceIntfClassSelect, 3, 95, 8);
   1024     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassPort,
   1025                             _bcmFieldSliceSelFpf2, 0,
   1026                             _bcmFieldSliceIntfClassSelect, 0, 95, 8);
   1027     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassL3,
   1028                             _bcmFieldSliceSelFpf2, 0,
   1029                             _bcmFieldSliceIntfClassSelect, 1, 95, 8);
   1030     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassL2,
   1031                             _bcmFieldSliceSelFpf2, 0,
   1032                             _bcmFieldSliceIntfClassSelect, 2, 95, 8);
   1033     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyDstIp,
   1034                             _bcmFieldSliceSelFpf2, 0,
   1035                             _bcmFieldSliceSelDisable, 0, 103, 32);
   1036     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifySrcIp,
   1037                             _bcmFieldSliceSelFpf2, 0,
   1038                             _bcmFieldSliceSelDisable, 0, 135, 32);
   1039     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifySrcIp6,
   1040                             _bcmFieldSliceSelFpf2, 1,
   1041                             _bcmFieldSliceSelDisable, 0, 39, 128);
   1042     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyDstIp6,
   1043                             _bcmFieldSliceSelFpf2, 2,
   1044                             _bcmFieldSliceSelDisable, 0, 39, 128);
   1045     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, _bcmFieldQualifyData1,
   1046                             _bcmFieldSliceSelFpf2, 3,
   1047                             _bcmFieldSliceSelDisable, 0, 39, 128);
   1048     /* DWF1 */
   1049     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyTtl,
   1050                             _bcmFieldSliceSelDisable, 0,
   1051                             _bcmFieldSliceTtlClassSelect, 0, 167, 8);
   1052     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyTtlClassZero,
   1053                             _bcmFieldSliceSelDisable, 0,
   1054                             _bcmFieldSliceTtlClassSelect, 0, 167, 8);
   1055     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyTtlClassOne,
   1056                             _bcmFieldSliceSelDisable, 0,
   1057                             _bcmFieldSliceTtlClassSelect, 1, 167, 8);
   1058     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyIpFrag,
   1059                             _bcmFieldSliceSelDisable, 0,
   1060                             _bcmFieldSliceSelDisable, 0, 175, 2);
   1061     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyL4DstPort,
   1062                             _bcmFieldSliceSelDisable, 0,
   1063                             _bcmFieldSliceSelDisable, 0, 177, 16);
   1064     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyL4SrcPort,
   1065                             _bcmFieldSliceSelDisable, 0,
   1066                             _bcmFieldSliceSelDisable, 0, 193, 16);
   1067 
   1068     _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstPort,
   1069                      _bcmFieldDevSelDisable, 0,
   1070                      _bcmFieldSliceSelDisable, 0, 
   1071                      _bcmFieldSliceDstFwdEntitySelect, 
   1072                      _bcmFieldFwdEntityGlp, 0x1,
   1073                      209, 17, 0, 0, 0, 0, 0);
   1074     _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstTrunk,
   1075                      _bcmFieldDevSelDisable, 0,
   1076                                _bcmFieldSliceSelDisable, 0,
   1077                                _bcmFieldSliceDstFwdEntitySelect,
   1078                      _bcmFieldFwdEntityGlp, 0x1,
   1079                      209, 17, 0, 0, 0, 0, 0);
   1080     _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstMplsGport,
   1081                      _bcmFieldDevSelDisable, 0,
   1082                                _bcmFieldSliceSelDisable, 0,
   1083                                _bcmFieldSliceDstFwdEntitySelect,
   1084                      _bcmFieldFwdEntityMplsGport, 0x1,
   1085                      209, 17, 0, 0, 0, 0, 0);
   1086     _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstVlanGport,
   1087                      _bcmFieldDevSelDisable, 0,
   1088                                _bcmFieldSliceSelDisable, 0,
   1089                                _bcmFieldSliceDstFwdEntitySelect,
   1090                      _bcmFieldFwdEntityVlanGport, 0x1,
   1091                      209, 17, 0, 0, 0, 0, 0);
   1092     _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstMimGport,
   1093                      _bcmFieldDevSelDisable, 0,
   1094                                _bcmFieldSliceSelDisable, 0,
   1095                                _bcmFieldSliceDstFwdEntitySelect,
   1096                      _bcmFieldFwdEntityMimGport, 0x1,
   1097                      209, 17, 0, 0, 0, 0, 0);
   1098     _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstL3Egress,
   1099                      _bcmFieldDevSelDisable, 0,
   1100                                _bcmFieldSliceSelDisable, 0,
   1101                                _bcmFieldSliceDstFwdEntitySelect,
   1102                      _bcmFieldFwdEntityL3Egress, 0x1,
   1103                      209, 17, 0, 0, 0, 0, 0);
   1104     _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstL3EgressNextHops,
   1105                      _bcmFieldDevSelDisable, 0,
   1106                                _bcmFieldSliceSelDisable, 0,
   1107                                _bcmFieldSliceDstFwdEntitySelect,
   1108                      _bcmFieldFwdEntityL3Egress, 0x1,
   1109                      209, 17, 0, 0, 0, 0, 0);
   1110     _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstMulticastGroup,
   1111                      _bcmFieldDevSelDisable, 0,
   1112                                _bcmFieldSliceSelDisable, 0,
   1113                                _bcmFieldSliceDstFwdEntitySelect,
   1114                      _bcmFieldFwdEntityMulticastGroup, 0x1,
   1115                      209, 17, 0, 0, 0, 0, 0);
   1116     /* DONE DWF */
   1117     return (BCM_E_NONE);
   1118 }
   1119 
   1120 /*
   1121  * Function:
   1122  *     _field_hu_qualifiers_init
   1123  * Purpose:
   1124  *     Initialize device qaualifiers select codes & offsets
   1125  * Parameters:
   1126  *     unit       - (IN) BCM device number.
   1127  *     stage_fc   - (IN) Field Processor stage control structure. 
   1128  *
   1129  * Returns:
   1130  *     BCM_E_NONE
   1131  * Notes:
   1132  */
   1133 STATIC int
   1134 _field_hu_qualifiers_init(int unit, _field_stage_t *stage_fc)
   1135 {
   1136     int rv;           /* Operation return status. */
   1137 
   1138     /* Input parameters check. */
   1139     if (NULL == stage_fc) {
   1140         return (BCM_E_PARAM);
   1141     }
   1142 
   1143     /* Allocated stage qualifiers configuration array. */
   1144     _FP_XGS3_ALLOC(stage_fc->f_qual_arr, 
   1145                    (_bcmFieldQualifyCount * sizeof(_bcm_field_qual_info_t *)), 
   1146                    "Field qualifiers");
   1147     if (NULL == stage_fc->f_qual_arr) {
   1148         return (BCM_E_MEMORY);
   1149     }
   1150     
   1151     switch (stage_fc->stage_id) {
   1152       case _BCM_FIELD_STAGE_INGRESS:
   1153           rv = _field_hu_ingress_qualifiers_init(unit, stage_fc);
   1154           break;
   1155       case _BCM_FIELD_STAGE_LOOKUP:
   1156       case _BCM_FIELD_STAGE_EGRESS:
   1157       case _BCM_FIELD_STAGE_EXTERNAL:  
   1158       default: 
   1159           sal_free(stage_fc->f_qual_arr);
   1160           return (BCM_E_PARAM);
   1161     }
   1162     return (rv);
   1163 }
   1164 
   1165 
   1166 
   1167 /*
   1168  * Function:
   1169  *     _field_hu_write_slice_map_ingress
   1170  *
   1171  * Purpose:
   1172  *     Write the FP_SLICE_MAP (INGRESS)
   1173  *
   1174  * Parameters:
   1175  *     unit
   1176  *     stage_fc - pointer to stage control block
   1177  *     new_fp_virtual_map - virtual map to be written
   1178  *
   1179  * Returns:
   1180  *     nothing
   1181  *     
   1182  * Notes:
   1183  */
   1184 STATIC int
   1185 _field_hu_write_slice_map_ingress(int unit, _field_stage_t *stage_fc)
   1186 {
   1187     fp_slice_map_entry_t map_entry;  /* HW entry buffer.         */
   1188     soc_field_t field;               /* HW entry fields.         */
   1189     int vmap_size;                   /* Virtual map index count. */
   1190     uint32 value;                    /* Field entry value.       */
   1191     int idx;                         /* Map fields iterator.     */     
   1192     int rv;                          /* Operation return status. */
   1193     uint32 virtual_to_physical_map_hu[4] = {
   1194             VIRTUAL_SLICE_0_PHYSICAL_SLICE_NUMBER_ENTRY_0f,
   1195             VIRTUAL_SLICE_1_PHYSICAL_SLICE_NUMBER_ENTRY_0f,
   1196             VIRTUAL_SLICE_2_PHYSICAL_SLICE_NUMBER_ENTRY_0f,
   1197             VIRTUAL_SLICE_3_PHYSICAL_SLICE_NUMBER_ENTRY_0f
   1198     };
   1199 		
   1200     uint32 virtual_to_group_map_hu[4] = {
   1201             VIRTUAL_SLICE_0_VIRTUAL_SLICE_GROUP_ENTRY_0f,
   1202             VIRTUAL_SLICE_1_VIRTUAL_SLICE_GROUP_ENTRY_0f,
   1203             VIRTUAL_SLICE_2_VIRTUAL_SLICE_GROUP_ENTRY_0f,
   1204             VIRTUAL_SLICE_3_VIRTUAL_SLICE_GROUP_ENTRY_0f
   1205     };
   1206 
   1207     /* Calculate virtual map size. */
   1208     rv = _bcm_field_virtual_map_size_get(unit, stage_fc, &vmap_size); 
   1209     BCM_IF_ERROR_RETURN(rv);
   1210 
   1211     rv = READ_FP_SLICE_MAPm(unit, MEM_BLOCK_ANY, 0, &map_entry);
   1212     BCM_IF_ERROR_RETURN(rv);
   1213 
   1214     for (idx = 0; idx < vmap_size; idx++) {
   1215         value = (stage_fc->vmap[_FP_DEF_INST][0][idx]).vmap_key;
   1216         field = virtual_to_physical_map_hu[idx];
   1217         soc_FP_SLICE_MAPm_field32_set(unit, &map_entry, field, value);
   1218 
   1219         value = (stage_fc->vmap[_FP_DEF_INST][0][idx]).virtual_group;
   1220         field = virtual_to_group_map_hu[idx];
   1221         soc_FP_SLICE_MAPm_field32_set(unit, &map_entry, field, value);
   1222     }
   1223 
   1224     rv = WRITE_FP_SLICE_MAPm(unit, MEM_BLOCK_ALL, 0, &map_entry);
   1225     return (rv);
   1226 }
   1227 
   1228 
   1229 /*
   1230  * Function:
   1231  *     _bcm_field_hu_write_slice_map
   1232  *
   1233  * Purpose:
   1234  *     Write the FP_SLICE_MAP
   1235  *
   1236  * Parameters:
   1237  *     unit
   1238  *     stage_fc - pointer to stage control block
   1239  *     fg - Reference to Field group structure.
   1240  *
   1241  * Returns:
   1242  *     nothing
   1243  *     
   1244  * Notes:
   1245  */
   1246 int
   1247 _bcm_field_hu_write_slice_map(int unit, _field_stage_t *stage_fc,
   1248                               _field_group_t *fg)
   1249 {
   1250     int rv = BCM_E_PARAM;   /* Operation return status. */
   1251 
   1252     if (stage_fc->stage_id == _BCM_FIELD_STAGE_INGRESS) {
   1253         rv = _field_hu_write_slice_map_ingress(unit, stage_fc);
   1254     }
   1255     return (rv);
   1256 }
   1257 
   1258 
   1259 
   1260 /*
   1261  * Function:
   1262  *     _bcm_field_hu_init
   1263  * Purpose:
   1264  *     Perform initializations that are specific to BCM56142. This
   1265  *     includes initializing the FP field select bit offset tables for FPF[1-3]
   1266  *     for every stage. 
   1267  * Parameters:
   1268  *     unit       - (IN) BCM device number.
   1269  *     fc         - (IN) Field Processor control structure. 
   1270  *
   1271  * Returns:
   1272  *     BCM_E_NONE
   1273  * Notes:
   1274  */
   1275 int
   1276 _bcm_field_hu_init(int unit, _field_control_t *fc) 
   1277 {
   1278     _field_stage_t *stage_fc; /* Stages iteration pointer */
   1279 
   1280     /* Input parameters check. */
   1281     if (NULL == fc) {
   1282         return (BCM_E_PARAM);
   1283     }
   1284 
   1285     stage_fc = fc->stages;
   1286     while (stage_fc) {
   1287         /* Clear hardware table */
   1288         BCM_IF_ERROR_RETURN(_bcm_field_tr_hw_clear(unit, stage_fc));
   1289 
   1290         /* Initialize qualifiers info. */
   1291         BCM_IF_ERROR_RETURN(_field_hu_qualifiers_init(unit, stage_fc));
   1292 
   1293         if (_BCM_FIELD_STAGE_EXTERNAL == stage_fc->stage_id) {
   1294             _bcm_field_tr_external_init(unit, stage_fc);
   1295             stage_fc = stage_fc->next;
   1296             continue;
   1297         }
   1298 
   1299         /* Goto next stage */
   1300         stage_fc = stage_fc->next;
   1301     }
   1302 
   1303     /* Initialize the TOS_FN, TTL_FN, TCP_FN tables */
   1304     BCM_IF_ERROR_RETURN(_bcm_field_trx_tcp_ttl_tos_init(unit));
   1305     
   1306     if (0 == SOC_WARM_BOOT(unit)) {
   1307         /* Enable filter processor */
   1308         BCM_IF_ERROR_RETURN(_field_port_filter_enable_set(unit, fc, TRUE));
   1309 
   1310         /* Enable meter refresh */
   1311         BCM_IF_ERROR_RETURN(_field_meter_refresh_enable_set(unit, fc, TRUE));
   1312     }
   1313 
   1314     /* Initialize the function pointers */
   1315     _field_hu_functions_init(&fc->functions);;
   1316 
   1317     return (BCM_E_NONE);
   1318 }
   1319 
   1320 
   1321 /*
   1322  * Function:
   1323  *     _field_hu_functions_init
   1324  *
   1325  * Purpose:
   1326  *     Set up functions pointers 
   1327  *
   1328  * Parameters:
   1329  *     stage_fc - (IN/OUT) pointers to stage control block whe the device 
   1330  *                         and stage specific functions will be registered.
   1331  *
   1332  * Returns:
   1333  *     nothing
   1334  * Notes:
   1335  */
   1336 STATIC void
   1337 _field_hu_functions_init(_field_funct_t *functions)
   1338 {
   1339     functions->fp_detach               = _bcm_field_tr_detach;
   1340     functions->fp_group_install        = _bcm_field_fb_group_install;
   1341     functions->fp_selcodes_install     = _bcm_field_trx_selcodes_install;
   1342     functions->fp_slice_clear          = _bcm_field_trx_slice_clear;
   1343     functions->fp_entry_remove         = _bcm_field_fb_entry_remove;
   1344     functions->fp_entry_move           = _bcm_field_fb_entry_move;
   1345     functions->fp_selcode_get          = _bcm_field_tr_selcode_get;
   1346     functions->fp_selcode_to_qset      = _bcm_field_selcode_to_qset;
   1347     functions->fp_qual_list_get        = _bcm_field_qual_lists_get;
   1348     functions->fp_tcam_policy_clear    = NULL;
   1349     functions->fp_tcam_policy_install  = _bcm_field_tr_entry_install;
   1350     functions->fp_tcam_policy_reinstall  = _bcm_field_tr_entry_reinstall;
   1351     functions->fp_policer_install      = _bcm_field_trx_policer_install;
   1352     functions->fp_write_slice_map      = _bcm_field_hu_write_slice_map;
   1353     functions->fp_qualify_ip_type      = _bcm_field_trx_qualify_ip_type;
   1354     functions->fp_qualify_ip_type_get  = _bcm_field_trx_qualify_ip_type_get;
   1355     functions->fp_action_support_check = _bcm_field_trx_action_support_check;
   1356     functions->fp_action_conflict_check = _bcm_field_trx_action_conflict_check;
   1357     functions->fp_counter_get          = _bcm_field_tr_counter_get;
   1358     functions->fp_counter_set          = _bcm_field_tr_counter_set;
   1359     functions->fp_stat_index_get       = _bcm_field_trx_stat_index_get;
   1360     functions->fp_action_params_check  = _bcm_field_trx_action_params_check;
   1361     functions->fp_egress_key_match_type_set = 
   1362         _bcm_field_trx_egress_key_match_type_set;
   1363     functions->fp_external_entry_install  = _bcm_field_tr_external_entry_install;
   1364     functions->fp_external_entry_reinstall  = _bcm_field_tr_external_entry_reinstall;
   1365     functions->fp_external_entry_remove   = _bcm_field_tr_external_entry_remove;
   1366     functions->fp_external_entry_prio_set = _bcm_field_tr_external_entry_prio_set;
   1367     functions->fp_data_qualifier_ethertype_add = 
   1368                        _bcm_field_fb_data_qualifier_ethertype_add;
   1369     functions->fp_data_qualifier_ethertype_delete= 
   1370                        _bcm_field_fb_data_qualifier_ethertype_delete;
   1371     functions->fp_data_qualifier_ip_protocol_add = 
   1372                        _bcm_field_fb_data_qualifier_ip_protocol_add;
   1373     functions->fp_data_qualifier_ip_protocol_delete= 
   1374                        _bcm_field_fb_data_qualifier_ip_protocol_delete;
   1375     functions->fp_data_qualifier_packet_format_add= 
   1376                        _bcm_field_fb_data_qualifier_packet_format_add;
   1377     functions->fp_data_qualifier_packet_format_delete=
   1378                        _bcm_field_fb_data_qualifier_packet_format_delete;
   1379     functions->fp_stat_value_get = NULL;
   1380     functions->fp_stat_value_set = NULL;
   1381     functions->fp_control_set = _bcm_field_control_set;
   1382     functions->fp_control_get = _bcm_field_control_get;
   1383     functions->fp_stat_hw_mode_get = _bcm_field_stat_hw_mode_get;
   1384     functions->fp_stat_hw_alloc = _bcm_field_stat_hw_alloc;
   1385     functions->fp_stat_hw_free = _bcm_field_stat_hw_free;
   1386     functions->fp_group_add = NULL;
   1387     functions->fp_qualify_trunk = _bcm_field_qualify_trunk;
   1388     functions->fp_qualify_trunk_get = _bcm_field_qualify_trunk_get;
   1389     functions->fp_qualify_inports = _bcm_field_qualify_InPorts;
   1390     functions->fp_entry_stat_extended_attach = NULL;
   1391     functions->fp_entry_stat_extended_get = NULL;
   1392     functions->fp_entry_stat_detach = _bcm_field_entry_stat_detach;
   1393     functions->fp_class_size_get = NULL;
   1394     functions->fp_qualify_packet_res = _field_qualify_PacketRes;
   1395     functions->fp_qualify_packet_res_get = _field_qualify_PacketRes_get;
   1396 }
   1397 #else /* BCM_HURRICANE_SUPPORT && BCM_FIELD_SUPPORT */
   1398 int _hurricane_field_not_empty;
   1399 #endif  /* BCM_HURRICANE_SUPPORT && BCM_FIELD_SUPPORT */