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


      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_GREYHOUND2_SUPPORT) && defined(BCM_FIELD_SUPPORT)
     11 
     12 #include <soc/mem.h>
     13 #include <soc/drv.h>
     14 
     15 #include <bcm/error.h>
     16 #include <bcm/l3.h>
     17 #include <bcm/field.h>
     18 #include <bcm/tunnel.h>
     19 
     20 #include <bcm_int/esw_dispatch.h>
     21 
     22 #include <bcm_int/esw/field.h>
     23 #include <bcm_int/esw/l3.h>
     24 #include <bcm_int/esw/firebolt.h>
     25 #include <bcm_int/esw/trx.h>
     26 #include <bcm_int/esw/enduro.h>
     27 #include <bcm_int/esw/triumph.h>
     28 #include <bcm_int/esw/triumph2.h>
     29 #include <bcm_int/esw/hurricane2.h>
     30 #include <bcm_int/esw/greyhound.h>
     31 
     32 
     33 
     34 /* local/static function prototypes */
     35 STATIC void _field_gh2_functions_init(_field_funct_t *functions) ;
     36 
     37 /*
     38  * Function:
     39  *     _field_gh2_ingress_qualifiers_init
     40  * Purpose:
     41  *     Initialize device stage ingress qaualifiers
     42  *     select codes & offsets
     43  * Parameters:
     44  *     unit       - (IN) BCM device number.
     45  *     stage_fc   - (IN) Field Processor stage control structure.
     46  *
     47  * Returns:
     48  *     BCM_E_NONE
     49  */
     50 STATIC int
     51 _field_gh2_ingress_qualifiers_init(int unit, _field_stage_t *stage_fc)
     52 {
     53     /* Singal wide DATA_KEY format for GH2:
     54         F1(39b), F2(128b), F3(39b), FIXED(21b), F4(8b)
     55     */
     56     const unsigned int fixed_offset = 8;
     57     const unsigned int f3_offset = fixed_offset + 21;  /* = 29 */
     58     const unsigned int f2_offset = f3_offset + 39;     /* = 68 */
     59     const unsigned int f1_offset = f2_offset + 128;    /* = 196 */
     60 
     61     /* Double wide DATA_KEY format for GH2:
     62         RSV(1b), WF1(66b), DWF2(128b), DWF3(32b), DWF4(8b)
     63     */
     64     const unsigned int dwf4_offset = 0;
     65     const unsigned int dwf3_offset = 8;
     66     const unsigned int dwf2_offset = dwf3_offset + 32;     /* = 40 */
     67     const unsigned int dwf1_offset = dwf2_offset + 128;    /* = 168 */
     68 
     69     _FP_QUAL_DECL;
     70 
     71     /* Input parameters check. */
     72     if (NULL == stage_fc) {
     73         return (BCM_E_PARAM);
     74     }
     75 
     76     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyStage,
     77                  _bcmFieldSliceSelDisable, 0, 0, 0);
     78     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyStageIngress,
     79                  _bcmFieldSliceSelDisable, 0, 0, 0);
     80     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIp4,
     81                  _bcmFieldSliceSelDisable, 0, 0, 0);
     82     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIp6,
     83                  _bcmFieldSliceSelDisable, 0, 0, 0);
     84     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInPort,
     85                  _bcmFieldSliceSelDisable, 0, 0, 0);
     86     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInPorts,
     87                  _bcmFieldSliceSelDisable, 0, 0, 0);
     88 
     89     /* FP_FIXED */
     90     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyHiGig,
     91                  _bcmFieldSliceSelDisable, 0, fixed_offset, 1);
     92     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyForwardingType,
     93                  _bcmFieldSliceSelDisable, 0, fixed_offset + 1, 3);
     94     /* SVP_OR_L3IIF (fixed_offset + 4, 1) no support */
     95     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpType,
     96                  _bcmFieldSliceSelDisable, 0, fixed_offset + 5, 4);
     97     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4Ports,
     98                  _bcmFieldSliceSelDisable, 0, fixed_offset + 9, 1);
     99     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3Routable,
    100                  _bcmFieldSliceSelDisable, 0, fixed_offset + 10, 1);
    101     /* TUNNEL_TYPE_LOOPBACK_TYPE (fixed_offset + 11, 4) no support */
    102     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDrop,
    103                  _bcmFieldSliceSelDisable, 0, fixed_offset + 15, 1);
    104     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMirrorCopy,
    105                  _bcmFieldSliceSelDisable, 0, fixed_offset + 16, 1);
    106     if (soc_feature(unit, soc_feature_miml)) {
    107         _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMimlPkt,
    108                      _bcmFieldSliceSelDisable, 0, fixed_offset + 17, 1);
    109     }
    110     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyCustomHeaderPkt,
    111                  _bcmFieldSliceSelDisable, 0, fixed_offset + 18, 1);
    112     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyPreemptablePacket,
    113                  _bcmFieldSliceSelDisable, 0, fixed_offset + 19, 1);
    114     
    115 
    116 
    117     /* FPF3 */
    118     /* F3_0 */
    119     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL2,
    120                                _bcmFieldSliceSelFpf3, 0,
    121                                _bcmFieldSliceDstClassSelect, 0, f3_offset, 6);
    122     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL3,
    123                                _bcmFieldSliceSelFpf3, 0,
    124                                _bcmFieldSliceDstClassSelect, 1, f3_offset, 6);
    125     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField,
    126                                _bcmFieldSliceSelFpf3, 0,
    127                                _bcmFieldSliceDstClassSelect, 2, f3_offset, 6);
    128     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField,
    129                                _bcmFieldSliceSelFpf3, 0,
    130                                _bcmFieldSliceDstClassSelect, 3, f3_offset, 6);
    131     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL2,
    132                                _bcmFieldSliceSelFpf3, 0,
    133                                _bcmFieldSliceSrcClassSelect, 0,
    134                                f3_offset + 6, 6);
    135     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL3,
    136                                _bcmFieldSliceSelFpf3, 0,
    137                                _bcmFieldSliceSrcClassSelect, 1,
    138                                f3_offset + 6, 6);
    139     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField,
    140                                _bcmFieldSliceSelFpf3, 0,
    141                                _bcmFieldSliceSrcClassSelect, 2,
    142                                f3_offset + 6, 6);
    143     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField,
    144                                _bcmFieldSliceSelFpf3, 0,
    145                                _bcmFieldSliceSrcClassSelect, 3,
    146                                f3_offset + 6, 6);
    147     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVrf,
    148                                _bcmFieldSliceSelFpf3, 0,
    149                                _bcmFieldSliceFwdFieldSelect,
    150                                _bcmFieldFwdFieldVrf, f3_offset + 12, 12);
    151     /* VFI (bcmFieldQualifyVpn) are not supported in ForwardingField */
    152     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyForwardingVlanId,
    153                                _bcmFieldSliceSelFpf3, 0,
    154                                _bcmFieldSliceFwdFieldSelect,
    155                                _bcmFieldFwdFieldVlan, f3_offset + 12, 12);
    156     /* SVP_L3IIF_OVERLAY (f3_offset + 24, 13) no support */
    157 
    158     /* F3_1 */
    159     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL2,
    160                                _bcmFieldSliceSelFpf3, 1,
    161                                _bcmFieldSliceDstClassSelect, 0, f3_offset, 6);
    162     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL3,
    163                                _bcmFieldSliceSelFpf3, 1,
    164                                _bcmFieldSliceDstClassSelect, 1, f3_offset, 6);
    165     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField,
    166                                _bcmFieldSliceSelFpf3, 1,
    167                                _bcmFieldSliceDstClassSelect, 2, f3_offset, 6);
    168     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField,
    169                                _bcmFieldSliceSelFpf3, 1,
    170                                _bcmFieldSliceDstClassSelect, 3, f3_offset, 6);
    171     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL2,
    172                                _bcmFieldSliceSelFpf3, 1,
    173                                _bcmFieldSliceSrcClassSelect, 0,
    174                                f3_offset + 6, 6);
    175     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL3,
    176                                _bcmFieldSliceSelFpf3, 1,
    177                                _bcmFieldSliceSrcClassSelect, 1,
    178                                f3_offset + 6, 6);
    179     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField,
    180                                _bcmFieldSliceSelFpf3, 1,
    181                                _bcmFieldSliceSrcClassSelect, 2,
    182                                f3_offset + 6, 6);
    183     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField,
    184                                _bcmFieldSliceSelFpf3, 1,
    185                                _bcmFieldSliceSrcClassSelect, 3,
    186                                f3_offset + 6, 6);
    187     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc,
    188                                bcmFieldQualifyVrf,
    189                                _bcmFieldSliceSelFpf3, 1,
    190                                _bcmFieldSliceFwdFieldSelect,
    191                                _bcmFieldFwdFieldVrf, f3_offset + 12, 12);
    192     /* VFI (bcmFieldQualifyVpn) are not supported in ForwardingField */
    193     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc,
    194                                bcmFieldQualifyForwardingVlanId,
    195                                _bcmFieldSliceSelFpf3, 1,
    196                                _bcmFieldSliceFwdFieldSelect,
    197                                _bcmFieldFwdFieldVlan, f3_offset + 12, 12);
    198     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId,
    199                  _bcmFieldSliceSelFpf3, 1, f3_offset + 24, 12);
    200 
    201     /* F3_2 */
    202     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstPort,
    203                                _bcmFieldSliceSelFpf3, 2,
    204                                _bcmFieldSliceDstFwdEntitySelect,
    205                                _bcmFieldFwdEntityGlp, f3_offset, 19);
    206     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstTrunk,
    207                                _bcmFieldSliceSelFpf3, 2,
    208                                _bcmFieldSliceDstFwdEntitySelect,
    209                                _bcmFieldFwdEntityGlp, f3_offset, 19);
    210     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstL3Egress,
    211                                _bcmFieldSliceSelFpf3, 2,
    212                                _bcmFieldSliceDstFwdEntitySelect,
    213                                _bcmFieldFwdEntityL3Egress, f3_offset, 19);
    214     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc,
    215                                bcmFieldQualifyDstL3EgressNextHops,
    216                                _bcmFieldSliceSelFpf3, 2,
    217                                _bcmFieldSliceDstFwdEntitySelect,
    218                                _bcmFieldFwdEntityL3Egress, f3_offset, 19);
    219     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMulticastGroup,
    220                                _bcmFieldSliceSelFpf3, 2,
    221                                _bcmFieldSliceDstFwdEntitySelect,
    222                                _bcmFieldFwdEntityMulticastGroup, f3_offset, 19);
    223     /* GLP: T(1b), MODID(8b) ,PORT(7b) */
    224     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcPort,
    225                                _bcmFieldSliceSelFpf3, 2,
    226                                _bcmFieldSliceSrcEntitySelect,
    227                                _bcmFieldFwdEntityGlp, f3_offset + 19, 16);
    228     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcTrunk,
    229                                _bcmFieldSliceSelFpf3, 2,
    230                                _bcmFieldSliceSrcEntitySelect,
    231                                _bcmFieldFwdEntityGlp, f3_offset + 19, 16);
    232     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcModPortGport,
    233                                _bcmFieldSliceSelFpf3, 2,
    234                                _bcmFieldSliceSrcEntitySelect,
    235                                _bcmFieldFwdEntityModPortGport,
    236                                f3_offset + 19, 16);
    237     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcModuleGport,
    238                                _bcmFieldSliceSelFpf3, 2,
    239                                _bcmFieldSliceSrcEntitySelect,
    240                                _bcmFieldFwdEntityModPortGport,
    241                                f3_offset + 26, 8);
    242     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc,
    243                                bcmFieldQualifyTrunkMemberSourceModuleId,
    244                                _bcmFieldSliceSelFpf3, 2,
    245                                _bcmFieldSliceSrcEntitySelect,
    246                                _bcmFieldFwdEntityModPortGport,
    247                                f3_offset + 26, 8);
    248     /* SVP_VALID (f3_offset + 35, 1) no support */
    249     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMHOpcode,
    250                  _bcmFieldSliceSelFpf3, 2, f3_offset + 36, 3);
    251 
    252     /* F3_3 */
    253     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan,
    254                  _bcmFieldSliceSelFpf3, 3, f3_offset, 16);
    255     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId,
    256                  _bcmFieldSliceSelFpf3, 3, f3_offset, 12);
    257     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi,
    258                  _bcmFieldSliceSelFpf3, 3, f3_offset + 12, 1);
    259     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri,
    260                  _bcmFieldSliceSelFpf3, 3, f3_offset + 13, 3);
    261     /* PACKET_FORMAT: pkt_fmt(2b), outer_tagged(1b), inner_tagged(1b) */
    262     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVlanFormat,
    263                  _bcmFieldSliceSelFpf3, 3, f3_offset + 16, 2);
    264     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2Format,
    265                  _bcmFieldSliceSelFpf3, 3, f3_offset + 18, 2);
    266     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTranslatedVlanFormat,
    267                  _bcmFieldSliceSelFpf3, 3, f3_offset + 20, 2);
    268     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMHOpcode,
    269                  _bcmFieldSliceSelFpf3, 3, f3_offset + 22, 3);
    270     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyPacketRes,
    271                  _bcmFieldSliceSelFpf3, 3, f3_offset + 25, 5);
    272     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpInfo,
    273                  _bcmFieldSliceSelFpf3, 3, f3_offset + 30, 3);
    274 
    275     /* F3_4 */
    276     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan,
    277                  _bcmFieldSliceSelFpf3, 4, f3_offset, 16);
    278     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId,
    279                  _bcmFieldSliceSelFpf3, 4, f3_offset, 12);
    280     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi,
    281                  _bcmFieldSliceSelFpf3, 4, f3_offset + 12, 1);
    282     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri,
    283                  _bcmFieldSliceSelFpf3, 4, f3_offset + 13, 3);
    284     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlan,
    285                  _bcmFieldSliceSelFpf3, 4, f3_offset + 16, 16);
    286     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanId,
    287                  _bcmFieldSliceSelFpf3, 4, f3_offset + 16, 12);
    288     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanCfi,
    289                  _bcmFieldSliceSelFpf3, 4, f3_offset + 28, 1);
    290     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanPri,
    291                  _bcmFieldSliceSelFpf3, 4, f3_offset + 29, 3);
    292 
    293     /* F3_5 */
    294     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan,
    295                  _bcmFieldSliceSelFpf3, 5, f3_offset, 16);
    296     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId,
    297                  _bcmFieldSliceSelFpf3, 5, f3_offset, 12);
    298     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi,
    299                  _bcmFieldSliceSelFpf3, 5, f3_offset + 12, 1);
    300     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri,
    301                  _bcmFieldSliceSelFpf3, 5, f3_offset + 13, 3);
    302     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyEtherType,
    303                  _bcmFieldSliceSelFpf3, 5, f3_offset + 16, 16);
    304 
    305     /* F3_6 */
    306     /* MPLS Terminated (f3_offset, 1) is not supported */
    307     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVlanTranslationHit,
    308                  _bcmFieldSliceSelFpf3, 6, f3_offset + 1, 1);
    309     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyForwardingVlanValid,
    310                  _bcmFieldSliceSelFpf3, 6, f3_offset + 2, 1);
    311     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIngressStpState,
    312                  _bcmFieldSliceSelFpf3, 6, f3_offset + 3, 2);
    313     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2SrcHit,
    314                  _bcmFieldSliceSelFpf3, 6, f3_offset + 5, 1);
    315     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2SrcStatic,
    316                  _bcmFieldSliceSelFpf3, 6, f3_offset + 6, 1);
    317     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2DestHit,
    318                  _bcmFieldSliceSelFpf3, 6, f3_offset + 7, 1);
    319     /* OUTER_LABEL_POP (f3_offset + 8, 1) */
    320     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2CacheHit,
    321                  _bcmFieldSliceSelFpf3, 6, f3_offset + 9, 1);
    322     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3SrcHostHit,
    323                  _bcmFieldSliceSelFpf3, 6, f3_offset + 10, 1);
    324     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3DestHostHit,
    325                  _bcmFieldSliceSelFpf3, 6, f3_offset + 11, 1);
    326     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpmcStarGroupHit,
    327                  _bcmFieldSliceSelFpf3, 6, f3_offset + 12, 1);
    328     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3DestRouteHit,
    329                  _bcmFieldSliceSelFpf3, 6, f3_offset + 13, 1);
    330     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2StationMove,
    331                  _bcmFieldSliceSelFpf3, 6, f3_offset + 14, 1);
    332     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDosAttack,
    333                  _bcmFieldSliceSelFpf3, 6, f3_offset + 15, 1);
    334     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlan,
    335                  _bcmFieldSliceSelFpf3, 6, f3_offset + 16, 16);
    336     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanId,
    337                  _bcmFieldSliceSelFpf3, 6, f3_offset + 16, 12);
    338     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanCfi,
    339                  _bcmFieldSliceSelFpf3, 6, f3_offset + 28, 1);
    340     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanPri,
    341                  _bcmFieldSliceSelFpf3, 6, f3_offset + 29, 3);
    342 
    343     /* F3_7 */
    344     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyRangeCheck,
    345                  _bcmFieldSliceSelFpf3, 7, f3_offset, 32);
    346     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc,
    347                                bcmFieldQualifyInterfaceClassPort,
    348                                _bcmFieldSliceSelFpf3, 7,
    349                                _bcmFieldSliceIntfClassSelect, 0,
    350                                f3_offset + 24, 8);
    351     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc,
    352                                bcmFieldQualifyInterfaceClassL3,
    353                                _bcmFieldSliceSelFpf3, 7,
    354                                _bcmFieldSliceIntfClassSelect, 1,
    355                                f3_offset + 24, 8);
    356     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc,
    357                                bcmFieldQualifyInterfaceClassL2,
    358                                _bcmFieldSliceSelFpf3, 7,
    359                                _bcmFieldSliceIntfClassSelect, 2,
    360                                f3_offset + 24, 8);
    361    _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc,
    362                               _bcmFieldQualifyRangeCheckBits24_31,
    363                               _bcmFieldSliceSelFpf3, 7,
    364                               _bcmFieldSliceIntfClassSelect, 3,
    365                               f3_offset + 24, 8);
    366 
    367     /* F3_8 */
    368     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIp6FlowLabel,
    369                  _bcmFieldSliceSelFpf3, 8, f3_offset, 20);
    370     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVlanFormat,
    371                  _bcmFieldSliceSelFpf3, 8, f3_offset + 20, 2);
    372     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2Format,
    373                  _bcmFieldSliceSelFpf3, 8, f3_offset + 22, 2);
    374     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTranslatedVlanFormat,
    375                  _bcmFieldSliceSelFpf3, 8, f3_offset + 24, 2);
    376     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerTpid,
    377                  _bcmFieldSliceSelFpf3, 8, f3_offset + 26, 2);
    378     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterTpid,
    379                  _bcmFieldSliceSelFpf3, 8, f3_offset + 28, 2);
    380 
    381     /* F3_9 */
    382     _FP_QUAL_ADD(unit, stage_fc, _bcmFieldQualifyData3,
    383                  _bcmFieldSliceSelFpf3, 9, f3_offset, 32);
    384     /* MPLS_INFO (f3_offset + 32, 2) no support */
    385 
    386     /* F3_10 */
    387     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstPort,
    388                                _bcmFieldSliceSelFpf3, 10,
    389                                _bcmFieldSliceDstFwdEntitySelect,
    390                                _bcmFieldFwdEntityGlp, f3_offset, 19);
    391     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstTrunk,
    392                                _bcmFieldSliceSelFpf3, 10,
    393                                _bcmFieldSliceDstFwdEntitySelect,
    394                                _bcmFieldFwdEntityGlp, f3_offset, 19);
    395     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstL3Egress,
    396                                _bcmFieldSliceSelFpf3, 10,
    397                                _bcmFieldSliceDstFwdEntitySelect,
    398                                _bcmFieldFwdEntityL3Egress, f3_offset, 19);
    399     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc,
    400                                bcmFieldQualifyDstL3EgressNextHops,
    401                                _bcmFieldSliceSelFpf3, 10,
    402                                _bcmFieldSliceDstFwdEntitySelect,
    403                                _bcmFieldFwdEntityL3Egress, f3_offset, 19);
    404     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMulticastGroup,
    405                                _bcmFieldSliceSelFpf3, 10,
    406                                _bcmFieldSliceDstFwdEntitySelect,
    407                                _bcmFieldFwdEntityMulticastGroup, f3_offset, 19);
    408     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstPort,
    409                  _bcmFieldSliceSelFpf3, 10, f3_offset + 19, 16);
    410     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstTrunk,
    411                  _bcmFieldSliceSelFpf3, 10, f3_offset + 19, 16);
    412 
    413     /* F3_11 */
    414     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcPort,
    415                  _bcmFieldSliceSelFpf3, 11, f3_offset, 16);
    416     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcTrunk,
    417                  _bcmFieldSliceSelFpf3, 11, f3_offset, 16);
    418     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcModPortGport,
    419                  _bcmFieldSliceSelFpf3, 11, f3_offset, 16);
    420     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcModuleGport,
    421                  _bcmFieldSliceSelFpf3, 11, f3_offset + 7, 8);
    422     /* SVP (f1_offset + 16, 15) no support */
    423     /* SVP_VALID (f1_offset + 31, 1) no support */
    424 
    425     /* F3_12 */
    426     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVnTag,
    427                                _bcmFieldSliceSelFpf3, 12,
    428                                _bcmFieldSliceAuxTag2Select,
    429                                _bcmFieldAuxTagVn, f3_offset, 33);
    430     if (soc_feature(unit, soc_feature_miml)) {
    431         _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyMimlInnerTag,
    432                                    _bcmFieldSliceSelFpf3, 12,
    433                                    _bcmFieldSliceAuxTag2Select,
    434                                    _bcmFieldAuxTagMimlHeader, f3_offset, 33);
    435     }
    436     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyCustomHeaderData,
    437                                _bcmFieldSliceSelFpf3, 12,
    438                                _bcmFieldSliceAuxTag2Select,
    439                                _bcmFieldAuxTagCustomHeader, f3_offset, 33);
    440 
    441     _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadL4HdrParseable,
    442                      _bcmFieldDevSelDisable, 0,
    443                      _bcmFieldSliceSelFpf3, 12,
    444                      _bcmFieldSliceAuxTag2Select, _bcmFieldAuxTagCapwapInfo,
    445                      0,
    446                      f3_offset, 1,
    447                      f3_offset + 32, 1,
    448                      0,  0,
    449                      0
    450                      );
    451     _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadL3HdrParseable,
    452                      _bcmFieldDevSelDisable, 0,
    453                      _bcmFieldSliceSelFpf3, 12,
    454                      _bcmFieldSliceAuxTag2Select, _bcmFieldAuxTagCapwapInfo,
    455                      0,
    456                      f3_offset + 1, 1,
    457                      f3_offset + 32, 1,
    458                      0,  0,
    459                      0
    460                      );
    461     _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadInnerVlan,
    462                      _bcmFieldDevSelDisable, 0,
    463                      _bcmFieldSliceSelFpf3, 12,
    464                      _bcmFieldSliceAuxTag2Select, _bcmFieldAuxTagCapwapInfo,
    465                      0,
    466                      f3_offset + 2, 16,
    467                      f3_offset + 32, 1,
    468                      0,  0,
    469                      0
    470                      );
    471     _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadInnerVlanId,
    472                      _bcmFieldDevSelDisable, 0,
    473                      _bcmFieldSliceSelFpf3, 12,
    474                      _bcmFieldSliceAuxTag2Select, _bcmFieldAuxTagCapwapInfo,
    475                      0,
    476                      f3_offset + 2, 12,
    477                      f3_offset + 32, 1,
    478                      0,  0,
    479                      0
    480                      );
    481     _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadInnerVlanCfi,
    482                      _bcmFieldDevSelDisable, 0,
    483                      _bcmFieldSliceSelFpf3, 12,
    484                      _bcmFieldSliceAuxTag2Select, _bcmFieldAuxTagCapwapInfo,
    485                      0,
    486                      f3_offset + 14, 1,
    487                      f3_offset + 32, 1,
    488                      0,  0,
    489                      0
    490                      );
    491     _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadInnerVlanPri,
    492                      _bcmFieldDevSelDisable, 0,
    493                      _bcmFieldSliceSelFpf3, 12,
    494                      _bcmFieldSliceAuxTag2Select, _bcmFieldAuxTagCapwapInfo,
    495                      0,
    496                      f3_offset + 15, 3,
    497                      f3_offset + 32, 1,
    498                      0,  0,
    499                      0
    500                      );
    501     _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadVlanFormat,
    502                      _bcmFieldDevSelDisable, 0,
    503                      _bcmFieldSliceSelFpf3, 12,
    504                      _bcmFieldSliceAuxTag2Select, _bcmFieldAuxTagCapwapInfo,
    505                      0,
    506                      f3_offset + 18, 2,
    507                      f3_offset + 32, 1,
    508                      0,  0,
    509                      0
    510                      );
    511     _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadSOF,
    512                      _bcmFieldDevSelDisable, 0,
    513                      _bcmFieldSliceSelFpf3, 12,
    514                      _bcmFieldSliceAuxTag2Select, _bcmFieldAuxTagCapwapInfo,
    515                      0,
    516                      f3_offset + 20, 1,
    517                      f3_offset + 32, 1,
    518                      0,  0,
    519                      0
    520                      );
    521     _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyCapwapHdrType,
    522                      _bcmFieldDevSelDisable, 0,
    523                      _bcmFieldSliceSelFpf3, 12,
    524                      _bcmFieldSliceAuxTag2Select, _bcmFieldAuxTagCapwapInfo,
    525                      0,
    526                      f3_offset + 21, 1,
    527                      f3_offset + 32, 1,
    528                      0,  0,
    529                      0
    530                      );
    531     _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyCapwapHdrRid,
    532                      _bcmFieldDevSelDisable, 0,
    533                      _bcmFieldSliceSelFpf3, 12,
    534                      _bcmFieldSliceAuxTag2Select, _bcmFieldAuxTagCapwapInfo,
    535                      0,
    536                      f3_offset + 22, 5,
    537                      f3_offset + 32, 1,
    538                      0,  0,
    539                      0
    540                      );
    541 
    542     /* F3_13 */
    543     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyRoceVer1Pkt,
    544                  _bcmFieldSliceSelFpf3, 13, f3_offset, 1);
    545     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyRoceVer2Pkt,
    546                  _bcmFieldSliceSelFpf3, 13, f3_offset + 1, 1);
    547     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyRoceBthFlags,
    548                  _bcmFieldSliceSelFpf3, 13, f3_offset + 2, 8);
    549     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyRoceBthDstQueuePair,
    550                  _bcmFieldSliceSelFpf3, 13, f3_offset + 10, 24);
    551 
    552     /* FPF2 */
    553     /* F2_0 */
    554     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTtl,
    555                  _bcmFieldSliceSelFpf2, 0, f2_offset, 8);
    556     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTcpControl,
    557                  _bcmFieldSliceSelFpf2, 0, f2_offset + 8, 6);
    558     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpFlags,
    559                  _bcmFieldSliceSelFpf2, 0, f2_offset + 14, 2);
    560     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTos,
    561                  _bcmFieldSliceSelFpf2, 0, f2_offset + 16, 8);
    562     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4DstPort,
    563                  _bcmFieldSliceSelFpf2, 0, f2_offset + 24, 16);
    564     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4SrcPort,
    565                  _bcmFieldSliceSelFpf2, 0, f2_offset + 40, 16);
    566     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol,
    567                  _bcmFieldSliceSelFpf2, 0, f2_offset + 56, 8);
    568     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstIp,
    569                  _bcmFieldSliceSelFpf2, 0, f2_offset + 64, 32);
    570     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcIp,
    571                  _bcmFieldSliceSelFpf2, 0, f2_offset + 96, 32);
    572 
    573     /* F2_1 */
    574     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTtl,
    575                  _bcmFieldSliceSelFpf2, 1, f2_offset, 8);
    576     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTcpControl,
    577                  _bcmFieldSliceSelFpf2, 1, f2_offset + 8, 6);
    578     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpFrag,
    579                  _bcmFieldSliceSelFpf2, 1, f2_offset + 14, 2);
    580     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTos,
    581                  _bcmFieldSliceSelFpf2, 1, f2_offset + 16, 8);
    582     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4DstPort,
    583                  _bcmFieldSliceSelFpf2, 1, f2_offset + 24, 16);
    584     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4SrcPort,
    585                  _bcmFieldSliceSelFpf2, 1, f2_offset + 40, 16);
    586     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol,
    587                  _bcmFieldSliceSelFpf2, 1, f2_offset + 56, 8);
    588     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstIp,
    589                  _bcmFieldSliceSelFpf2, 1, f2_offset + 64, 32);
    590     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcIp,
    591                  _bcmFieldSliceSelFpf2, 1, f2_offset + 96, 32);
    592 
    593     /* F2_2 */
    594     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcIp6,
    595                  _bcmFieldSliceSelFpf2, 2, f2_offset, 128);
    596 
    597     /* F2_3 */
    598     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstIp6,
    599                  _bcmFieldSliceSelFpf2, 3, f2_offset, 128);
    600 
    601     /* F2_4 */
    602     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTtl,
    603                  _bcmFieldSliceSelFpf2, 4, f2_offset, 8);
    604     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTcpControl,
    605                  _bcmFieldSliceSelFpf2, 4, f2_offset + 8, 6);
    606     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIp6FlowLabel,
    607                  _bcmFieldSliceSelFpf2, 4, f2_offset + 14, 20);
    608     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTos,
    609                  _bcmFieldSliceSelFpf2, 4, f2_offset + 34, 8);
    610     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol,
    611                  _bcmFieldSliceSelFpf2, 4, f2_offset + 42, 8);
    612     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIntCongestionNotification,
    613                  _bcmFieldSliceSelFpf2, 4, f2_offset + 50, 2);
    614     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstIp6High,
    615                  _bcmFieldSliceSelFpf2, 4, f2_offset + 64, 64);
    616 
    617     /* F2_5 */
    618     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan,
    619                  _bcmFieldSliceSelFpf2, 5, f2_offset, 16);
    620     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId,
    621                  _bcmFieldSliceSelFpf2, 5, f2_offset, 12);
    622     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi,
    623                  _bcmFieldSliceSelFpf2, 5, f2_offset + 12, 1);
    624     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri,
    625                  _bcmFieldSliceSelFpf2, 5, f2_offset + 13, 3);
    626     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyEtherType,
    627                  _bcmFieldSliceSelFpf2, 5, f2_offset + 16, 16);
    628     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcMac,
    629                  _bcmFieldSliceSelFpf2, 5, f2_offset + 32, 48);
    630     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstMac,
    631                  _bcmFieldSliceSelFpf2, 5, f2_offset + 80, 48);
    632 
    633     /* F2_6 */
    634     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan,
    635                  _bcmFieldSliceSelFpf2, 6, f2_offset, 16);
    636     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId,
    637                  _bcmFieldSliceSelFpf2, 6, f2_offset, 12);
    638     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi,
    639                  _bcmFieldSliceSelFpf2, 6, f2_offset + 12, 1);
    640     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri,
    641                  _bcmFieldSliceSelFpf2, 6, f2_offset + 13, 3);
    642     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyEtherType,
    643                  _bcmFieldSliceSelFpf2, 6, f2_offset + 16, 16);
    644     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcMac,
    645                  _bcmFieldSliceSelFpf2, 6, f2_offset + 32, 48);
    646     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcIp,
    647                  _bcmFieldSliceSelFpf2, 6, f2_offset + 80, 32);
    648 
    649     /* F2_7 */
    650     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan,
    651                  _bcmFieldSliceSelFpf2, 7, f2_offset, 16);
    652     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId,
    653                  _bcmFieldSliceSelFpf2, 7, f2_offset, 12);
    654     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi,
    655                  _bcmFieldSliceSelFpf2, 7, f2_offset + 12, 1);
    656     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri,
    657                  _bcmFieldSliceSelFpf2, 7, f2_offset + 13, 3);
    658     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyEtherType,
    659                  _bcmFieldSliceSelFpf2, 7, f2_offset + 16, 16);
    660     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTtl,
    661                  _bcmFieldSliceSelFpf2, 7, f2_offset + 32, 8);
    662     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol,
    663                  _bcmFieldSliceSelFpf2, 7, f2_offset + 40, 8);
    664     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstIp,
    665                  _bcmFieldSliceSelFpf2, 7, f2_offset + 48, 32);
    666     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstMac,
    667                  _bcmFieldSliceSelFpf2, 7, f2_offset + 80, 48);
    668 
    669     /* F2_8 */
    670     _FP_QUAL_ADD(unit, stage_fc, _bcmFieldQualifyData0,
    671                  _bcmFieldSliceSelFpf2, 8, f2_offset, 128);
    672 
    673     /* F2_9 */
    674     _FP_QUAL_ADD(unit, stage_fc, _bcmFieldQualifyData1,
    675                  _bcmFieldSliceSelFpf2, 9, f2_offset, 128);
    676 
    677     /* F2_10 */
    678     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcIp6High,
    679                  _bcmFieldSliceSelFpf2, 10, f2_offset, 64);
    680     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstIp6High,
    681                  _bcmFieldSliceSelFpf2, 10, f2_offset + 64, 64);
    682 
    683     /* F2_11 */
    684     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcMac,
    685                  _bcmFieldSliceSelFpf2, 11, f2_offset + 32, 48);
    686     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstMac,
    687                  _bcmFieldSliceSelFpf2, 11, f2_offset + 80, 48);
    688 
    689     /* F2_12 */
    690     if (soc_feature(unit, soc_feature_miml)) {
    691         _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMimlSrcMac,
    692                      _bcmFieldSliceSelFpf2, 12, f2_offset, 48);
    693         _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMimlDstMac,
    694                      _bcmFieldSliceSelFpf2, 12, f2_offset + 48, 48);
    695         _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMimlVlan,
    696                      _bcmFieldSliceSelFpf2, 12, f2_offset + 96, 16);
    697         _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMimlVlanId,
    698                      _bcmFieldSliceSelFpf2, 12, f2_offset + 96, 12);
    699         _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMimlVlanCfi,
    700                      _bcmFieldSliceSelFpf2, 12, f2_offset + 108, 1);
    701         _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMimlVlanPri,
    702                      _bcmFieldSliceSelFpf2, 12, f2_offset + 109, 3);
    703     }
    704 
    705     /* F2_13 */
    706     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadOuterVlan,
    707                  _bcmFieldSliceSelFpf2, 13, f2_offset, 16);
    708     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadOuterVlanId,
    709                  _bcmFieldSliceSelFpf2, 13, f2_offset, 12);
    710     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadOuterVlanCfi,
    711                  _bcmFieldSliceSelFpf2, 13, f2_offset + 12, 1);
    712     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadOuterVlanPri,
    713                  _bcmFieldSliceSelFpf2, 13, f2_offset + 13, 3);
    714     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadEtherType,
    715                  _bcmFieldSliceSelFpf2, 13, f2_offset + 16, 16);
    716     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadSrcMac,
    717                  _bcmFieldSliceSelFpf2, 13, f2_offset + 32, 48);
    718     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadDstMac,
    719                  _bcmFieldSliceSelFpf2, 13, f2_offset + 80, 48);
    720 
    721     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTunnelPayloadOuterVlan,
    722                  _bcmFieldSliceSelFpf2, 13, f2_offset, 16);
    723     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTunnelPayloadOuterVlanId,
    724                  _bcmFieldSliceSelFpf2, 13, f2_offset, 12);
    725     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTunnelPayloadOuterVlanCfi,
    726                  _bcmFieldSliceSelFpf2, 13, f2_offset + 12, 1);
    727     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTunnelPayloadOuterVlanPri,
    728                  _bcmFieldSliceSelFpf2, 13, f2_offset + 13, 3);
    729     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTunnelPayloadEtherType,
    730                  _bcmFieldSliceSelFpf2, 13, f2_offset + 16, 16);
    731     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTunnelPayloadSrcMac,
    732                  _bcmFieldSliceSelFpf2, 13, f2_offset + 32, 48);
    733     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTunnelPayloadDstMac,
    734                  _bcmFieldSliceSelFpf2, 13, f2_offset + 80, 48);
    735 
    736     /* F2_14 */
    737     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadL4DstPort,
    738                  _bcmFieldSliceSelFpf2, 14, f2_offset, 16);
    739     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadL4SrcPort,
    740                  _bcmFieldSliceSelFpf2, 14, f2_offset + 16, 16);
    741     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadTos,
    742                  _bcmFieldSliceSelFpf2, 14, f2_offset + 32, 8);
    743     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadIpProtocol,
    744                  _bcmFieldSliceSelFpf2, 14, f2_offset + 40, 8);
    745     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadDip,
    746                  _bcmFieldSliceSelFpf2, 14, f2_offset + 48, 32);
    747     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadSip,
    748                  _bcmFieldSliceSelFpf2, 14, f2_offset + 80, 32);
    749 
    750     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTunnelPayloadL4DstPort,
    751                  _bcmFieldSliceSelFpf2, 14, f2_offset, 16);
    752     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTunnelPayloadL4SrcPort,
    753                  _bcmFieldSliceSelFpf2, 14, f2_offset + 16, 16);
    754     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerTos,
    755                  _bcmFieldSliceSelFpf2, 14, f2_offset + 32, 8);
    756     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTunnelPayloadIpProtocol,
    757                  _bcmFieldSliceSelFpf2, 14, f2_offset + 40, 8);
    758     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTunnelPayloadDip,
    759                  _bcmFieldSliceSelFpf2, 14, f2_offset + 48, 32);
    760     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTunnelPayloadSip,
    761                  _bcmFieldSliceSelFpf2, 14, f2_offset + 80, 32);
    762 
    763     /* F2_15 */
    764     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadSip6,
    765                  _bcmFieldSliceSelFpf2, 15, f2_offset, 128);
    766 
    767     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTunnelPayloadSip6,
    768                  _bcmFieldSliceSelFpf2, 15, f2_offset, 128);
    769 
    770     /* F2_16 */
    771     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadDip6,
    772                  _bcmFieldSliceSelFpf2, 16, f2_offset, 128);
    773 
    774     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTunnelPayloadDip6,
    775                  _bcmFieldSliceSelFpf2, 16, f2_offset, 128);
    776 
    777     /* SINGLE F2 17 */
    778     if (soc_feature(unit, soc_feature_tsn_taf)) {
    779         _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTafEnable,
    780                      _bcmFieldSliceSelFpf2, 17,
    781                      f2_offset + 113, 1);
    782         _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTafGateId,
    783                      _bcmFieldSliceSelFpf2, 17,
    784                      f2_offset + 106, 7);
    785         _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTafGateState,
    786                      _bcmFieldSliceSelFpf2, 17,
    787                      f2_offset + 105, 1);
    788         _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTafCosProfile,
    789                      _bcmFieldSliceSelFpf2, 17,
    790                      f2_offset + 101, 4);
    791     }
    792     /* not support: PACKET_IS_1588 */
    793     /* not support: PTP_DOMAIN_ID_MISMATCH */
    794     /* not support: PTP_SOURCE_PORT_IDENTITY */
    795     /* not support: PTP_MESSAGE_TYPE */
    796     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySRSrcNodeIsSan,
    797                  _bcmFieldSliceSelFpf2, 17,
    798                  f2_offset + 76, 1);
    799     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2SrcMulticastHit,
    800                  _bcmFieldSliceSelFpf2, 17,
    801                  f2_offset + 73, 2);
    802     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2DstMulticastHit,
    803                  _bcmFieldSliceSelFpf2, 17,
    804                  f2_offset + 71, 2);
    805     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2DestSRNodeType,
    806                  _bcmFieldSliceSelFpf2, 17,
    807                  f2_offset + 69, 2);
    808     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySRSupervisionType,
    809                  _bcmFieldSliceSelFpf2, 17,
    810                  f2_offset + 67, 2);
    811     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySRTagType,
    812                  _bcmFieldSliceSelFpf2, 17,
    813                  f2_offset + 64, 3);
    814     _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifySRLanId,
    815                      _bcmFieldDevSelDisable, 0,
    816                      _bcmFieldSliceSelFpf2, 17,
    817                      0, 0,
    818                      0,
    819                      f2_offset + 63, 1,
    820                      f2_offset + 31, 1,
    821                      0, 0,
    822                      0
    823                      );
    824     _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifySRNetId,
    825                      _bcmFieldDevSelDisable, 0,
    826                      _bcmFieldSliceSelFpf2, 17,
    827                      0, 0,
    828                      0,
    829                      f2_offset + 60, 3,
    830                      f2_offset + 30, 1,
    831                      0, 0,
    832                      0
    833                      );
    834     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcPortSRRoleInterlink,
    835                  _bcmFieldSliceSelFpf2, 17,
    836                  f2_offset + 58, 1);
    837     _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifySrcPortSRType,
    838                      _bcmFieldDevSelDisable, 0,
    839                      _bcmFieldSliceSelFpf2, 17,
    840                      0, 0,
    841                      0,
    842                      f2_offset + 55, 3,
    843                      f2_offset + 59, 1,
    844                      0, 0,
    845                      0
    846                      );
    847     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcPortSRLanId,
    848                  _bcmFieldSliceSelFpf2, 17,
    849                  f2_offset + 54, 1);
    850     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcPortSRNetId,
    851                  _bcmFieldSliceSelFpf2, 17,
    852                  f2_offset + 51, 3);
    853     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcPortSRMode,
    854                  _bcmFieldSliceSelFpf2, 17,
    855                  f2_offset + 48, 3);
    856     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstPortSRRoleInterlink,
    857                  _bcmFieldSliceSelFpf2, 17,
    858                  f2_offset + 46, 1);
    859     _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstPortSRType,
    860                      _bcmFieldDevSelDisable, 0,
    861                      _bcmFieldSliceSelFpf2, 17,
    862                      0, 0,
    863                      0,
    864                      f2_offset + 43, 3,
    865                      f2_offset + 47, 1,
    866                      0, 0,
    867                      0
    868                      );
    869     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstPortSRLanId,
    870                  _bcmFieldSliceSelFpf2, 17,
    871                  f2_offset + 42, 1);
    872     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstPortSRNetId,
    873                  _bcmFieldSliceSelFpf2, 17,
    874                  f2_offset + 39, 3);
    875     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstPortSRMode,
    876                  _bcmFieldSliceSelFpf2, 17,
    877                  f2_offset + 36, 3);
    878     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVlanSREnable,
    879                  _bcmFieldSliceSelFpf2, 17,
    880                  f2_offset + 35, 1);
    881     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVlanSRLanId,
    882                  _bcmFieldSliceSelFpf2, 17,
    883                  f2_offset + 34, 1);
    884     _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifySRError,
    885                      _bcmFieldDevSelDisable, 0,
    886                      _bcmFieldSliceSelFpf2, 17,
    887                      0, 0,
    888                      0,
    889                      f2_offset + 75, 1,
    890                      f2_offset + 32, 2,
    891                      0, 0,
    892                      0
    893                      );
    894     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySRFlowId,
    895                  _bcmFieldSliceSelFpf2, 17,
    896                  f2_offset + 17, 13);
    897     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTsnFlowId,
    898                  _bcmFieldSliceSelFpf2, 17,
    899                  f2_offset + 5, 12);
    900     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIntPriority,
    901                  _bcmFieldSliceSelFpf2, 17,
    902                  f2_offset + 1, 4);
    903     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySRNetIdMatched,
    904                  _bcmFieldSliceSelFpf2, 17,
    905                  f2_offset, 1);
    906 
    907     /* F2_18 */
    908     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcIp,
    909                  _bcmFieldSliceSelFpf2, 18, f2_offset, 32);
    910     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstIp,
    911                  _bcmFieldSliceSelFpf2, 18, f2_offset + 32, 32);
    912     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTunnelPayloadDstMac,
    913                  _bcmFieldSliceSelFpf2, 18, f2_offset + 64, 48);
    914     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerTos,
    915                  _bcmFieldSliceSelFpf2, 18, f2_offset + 112, 8);
    916     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIntCongestionNotification,
    917                  _bcmFieldSliceSelFpf2, 18, f2_offset + 120, 2);
    918 
    919     /* FPF1 */
    920     /* F1_0 */
    921     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL2,
    922                                _bcmFieldSliceSelFpf1, 0,
    923                                _bcmFieldSliceDstClassSelect, 0, f1_offset, 6);
    924     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL3,
    925                                _bcmFieldSliceSelFpf1, 0,
    926                                _bcmFieldSliceDstClassSelect, 1, f1_offset, 6);
    927     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField,
    928                                _bcmFieldSliceSelFpf1, 0,
    929                                _bcmFieldSliceDstClassSelect, 2, f1_offset, 6);
    930     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField,
    931                                _bcmFieldSliceSelFpf1, 0,
    932                                _bcmFieldSliceDstClassSelect, 3, f1_offset, 6);
    933     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL2,
    934                                _bcmFieldSliceSelFpf1, 0,
    935                                _bcmFieldSliceSrcClassSelect, 0,
    936                                f1_offset + 6, 6);
    937     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL3,
    938                                _bcmFieldSliceSelFpf1, 0,
    939                                _bcmFieldSliceSrcClassSelect, 1,
    940                                f1_offset + 6, 6);
    941     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField,
    942                                _bcmFieldSliceSelFpf1, 0,
    943                                _bcmFieldSliceSrcClassSelect, 2,
    944                                f1_offset + 6, 6);
    945     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField,
    946                                _bcmFieldSliceSelFpf1, 0,
    947                                _bcmFieldSliceSrcClassSelect, 3,
    948                                f1_offset + 6, 6);
    949     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc,
    950                                bcmFieldQualifyVrf,
    951                                _bcmFieldSliceSelFpf1, 0,
    952                                _bcmFieldSliceFwdFieldSelect,
    953                                _bcmFieldFwdFieldVrf, f1_offset + 12, 12);
    954     /* VFI (bcmFieldQualifyVpn) are not supported in ForwardingField */
    955     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc,
    956                                bcmFieldQualifyForwardingVlanId,
    957                                _bcmFieldSliceSelFpf1, 0,
    958                                _bcmFieldSliceFwdFieldSelect,
    959                                _bcmFieldFwdFieldVlan, f1_offset + 12, 12);
    960     /* SVP_L3_IIF (f1_offset + 24, 13) no support */
    961 
    962     /* F1_1 */
    963     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstPort,
    964                                _bcmFieldSliceSelFpf1, 1,
    965                                _bcmFieldSliceDstFwdEntitySelect,
    966                                _bcmFieldFwdEntityGlp, f1_offset, 19);
    967     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstTrunk,
    968                                _bcmFieldSliceSelFpf1, 1,
    969                                _bcmFieldSliceDstFwdEntitySelect,
    970                                _bcmFieldFwdEntityGlp, f1_offset, 19);
    971     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstL3Egress,
    972                                _bcmFieldSliceSelFpf1, 1,
    973                                _bcmFieldSliceDstFwdEntitySelect,
    974                                _bcmFieldFwdEntityL3Egress, f1_offset, 19);
    975     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc,
    976                                bcmFieldQualifyDstL3EgressNextHops,
    977                                _bcmFieldSliceSelFpf1, 1,
    978                                _bcmFieldSliceDstFwdEntitySelect,
    979                                _bcmFieldFwdEntityL3Egress, f1_offset, 19);
    980     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMulticastGroup,
    981                                _bcmFieldSliceSelFpf1, 1,
    982                                _bcmFieldSliceDstFwdEntitySelect,
    983                                _bcmFieldFwdEntityMulticastGroup, f1_offset, 19);
    984     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcPort,
    985                                _bcmFieldSliceSelFpf1, 1,
    986                                _bcmFieldSliceSrcEntitySelect,
    987                                _bcmFieldFwdEntityGlp, f1_offset + 19, 16);
    988     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcTrunk,
    989                                _bcmFieldSliceSelFpf1, 1,
    990                                _bcmFieldSliceSrcEntitySelect,
    991                                _bcmFieldFwdEntityGlp, f1_offset + 19, 16);
    992     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcModPortGport,
    993                                _bcmFieldSliceSelFpf1, 1,
    994                                _bcmFieldSliceSrcEntitySelect,
    995                                _bcmFieldFwdEntityModPortGport,
    996                                f1_offset + 19, 16);
    997     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcModuleGport,
    998                                _bcmFieldSliceSelFpf1, 1,
    999                                _bcmFieldSliceSrcEntitySelect,
   1000                                _bcmFieldFwdEntityModPortGport,
   1001                                f1_offset + 26, 8);
   1002     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc,
   1003                                bcmFieldQualifyTrunkMemberSourceModuleId,
   1004                                _bcmFieldSliceSelFpf1, 1,
   1005                                _bcmFieldSliceSrcEntitySelect,
   1006                                _bcmFieldFwdEntityModPortGport,
   1007                                f1_offset + 26, 8);
   1008     /* SVP_VALID (f1_offset + 35, 1) no support */
   1009     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMHOpcode,
   1010                  _bcmFieldSliceSelFpf1, 1, f1_offset + 36, 3);
   1011 
   1012     /* F1_2 */
   1013     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstPort,
   1014                                _bcmFieldSliceSelFpf1, 2,
   1015                                _bcmFieldSliceDstFwdEntitySelect,
   1016                                _bcmFieldFwdEntityGlp, f1_offset, 19);
   1017     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstTrunk,
   1018                                _bcmFieldSliceSelFpf1, 2,
   1019                                _bcmFieldSliceDstFwdEntitySelect,
   1020                                _bcmFieldFwdEntityGlp, f1_offset, 19);
   1021     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstL3Egress,
   1022                                _bcmFieldSliceSelFpf1, 2,
   1023                                _bcmFieldSliceDstFwdEntitySelect,
   1024                                _bcmFieldFwdEntityL3Egress, f1_offset, 19);
   1025     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc,
   1026                                bcmFieldQualifyDstL3EgressNextHops,
   1027                                _bcmFieldSliceSelFpf1, 2,
   1028                                _bcmFieldSliceDstFwdEntitySelect,
   1029                                _bcmFieldFwdEntityL3Egress, f1_offset, 19);
   1030     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMulticastGroup,
   1031                                _bcmFieldSliceSelFpf1, 2,
   1032                                _bcmFieldSliceDstFwdEntitySelect,
   1033                                _bcmFieldFwdEntityMulticastGroup, f1_offset, 19);
   1034     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMHOpcode,
   1035                  _bcmFieldSliceSelFpf1, 2, f1_offset + 19, 3);
   1036     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL2,
   1037                                _bcmFieldSliceSelFpf1, 2,
   1038                                _bcmFieldSliceDstClassSelect, 0,
   1039                                f1_offset + 22, 6);
   1040     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL3,
   1041                                _bcmFieldSliceSelFpf1, 2,
   1042                                _bcmFieldSliceDstClassSelect, 1,
   1043                                f1_offset + 22, 6);
   1044     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField,
   1045                                _bcmFieldSliceSelFpf1, 2,
   1046                                _bcmFieldSliceDstClassSelect, 2,
   1047                                f1_offset + 22, 6);
   1048     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField,
   1049                                _bcmFieldSliceSelFpf1, 2,
   1050                                _bcmFieldSliceDstClassSelect, 3,
   1051                                f1_offset + 22, 6);
   1052     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL2,
   1053                                _bcmFieldSliceSelFpf1, 2,
   1054                                _bcmFieldSliceSrcClassSelect, 0,
   1055                                f1_offset + 28, 6);
   1056     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL3,
   1057                                _bcmFieldSliceSelFpf1, 2,
   1058                                _bcmFieldSliceSrcClassSelect, 1,
   1059                                f1_offset + 28, 6);
   1060     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField,
   1061                                _bcmFieldSliceSelFpf1, 2,
   1062                                _bcmFieldSliceSrcClassSelect, 2,
   1063                                f1_offset + 28, 6);
   1064     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField,
   1065                                _bcmFieldSliceSelFpf1, 2,
   1066                                _bcmFieldSliceSrcClassSelect, 3,
   1067                                f1_offset + 28, 6);
   1068 
   1069     /* F1_3 */
   1070     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan,
   1071                  _bcmFieldSliceSelFpf1, 3, f1_offset, 16);
   1072     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId,
   1073                  _bcmFieldSliceSelFpf1, 3, f1_offset, 12);
   1074     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi,
   1075                  _bcmFieldSliceSelFpf1, 3, f1_offset + 12, 1);
   1076     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri,
   1077                  _bcmFieldSliceSelFpf1, 3, f1_offset + 13, 3);
   1078     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlan,
   1079                  _bcmFieldSliceSelFpf1, 3, f1_offset + 16, 16);
   1080     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanId,
   1081                  _bcmFieldSliceSelFpf1, 3, f1_offset + 16, 12);
   1082     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanCfi,
   1083                  _bcmFieldSliceSelFpf1, 3, f1_offset + 28, 1);
   1084     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanPri,
   1085                  _bcmFieldSliceSelFpf1, 3, f1_offset + 29, 3);
   1086     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterTpid,
   1087                  _bcmFieldSliceSelFpf1, 3, f1_offset + 32, 2);
   1088 
   1089     /* F1_4 */
   1090     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan,
   1091                  _bcmFieldSliceSelFpf1, 4, f1_offset, 16);
   1092     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId,
   1093                  _bcmFieldSliceSelFpf1, 4, f1_offset, 12);
   1094     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi,
   1095                  _bcmFieldSliceSelFpf1, 4, f1_offset + 12, 1);
   1096     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri,
   1097                  _bcmFieldSliceSelFpf1, 4, f1_offset + 13, 3);
   1098     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyEtherType,
   1099                  _bcmFieldSliceSelFpf1, 4, f1_offset + 16, 16);
   1100 
   1101     /* F1_5 */
   1102     /* bcmFieldQualifyMplsTerminated is not supported */
   1103     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVlanTranslationHit,
   1104                  _bcmFieldSliceSelFpf1, 5, f1_offset + 1, 1);
   1105     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyForwardingVlanValid,
   1106                  _bcmFieldSliceSelFpf1, 5, f1_offset + 2, 1);
   1107     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIngressStpState,
   1108                  _bcmFieldSliceSelFpf1, 5, f1_offset + 3, 2);
   1109     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2SrcHit,
   1110                  _bcmFieldSliceSelFpf1, 5, f1_offset + 5, 1);
   1111     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2SrcStatic,
   1112                  _bcmFieldSliceSelFpf1, 5, f1_offset + 6, 1);
   1113     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2DestHit,
   1114                  _bcmFieldSliceSelFpf1, 5, f1_offset + 7, 1);
   1115     /* OUTER_LABEL_POP */
   1116     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2CacheHit,
   1117                  _bcmFieldSliceSelFpf1, 5, f1_offset + 9, 1);
   1118     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3SrcHostHit,
   1119                  _bcmFieldSliceSelFpf1, 5, f1_offset + 10, 1);
   1120     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3DestHostHit,
   1121                  _bcmFieldSliceSelFpf1, 5, f1_offset + 11, 1);
   1122     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpmcStarGroupHit,
   1123                  _bcmFieldSliceSelFpf1, 5, f1_offset + 12, 1);
   1124     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3DestRouteHit,
   1125                  _bcmFieldSliceSelFpf1, 5, f1_offset + 13, 1);
   1126     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2StationMove,
   1127                  _bcmFieldSliceSelFpf1, 5, f1_offset + 14, 1);
   1128     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDosAttack,
   1129                  _bcmFieldSliceSelFpf1, 5, f1_offset + 15, 1);
   1130     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlan,
   1131                  _bcmFieldSliceSelFpf1, 5, f1_offset + 16, 16);
   1132     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanId,
   1133                  _bcmFieldSliceSelFpf1, 5, f1_offset + 16, 12);
   1134     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanCfi,
   1135                  _bcmFieldSliceSelFpf1, 5, f1_offset + 28, 1);
   1136     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanPri,
   1137                  _bcmFieldSliceSelFpf1, 5, f1_offset + 29, 3);
   1138     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerTpid,
   1139                  _bcmFieldSliceSelFpf1, 5, f1_offset + 32, 2);
   1140 
   1141     /* F1_6 */
   1142     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan,
   1143                  _bcmFieldSliceSelFpf1, 6, f1_offset, 16);
   1144     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId,
   1145                  _bcmFieldSliceSelFpf1, 6, f1_offset, 12);
   1146     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi,
   1147                  _bcmFieldSliceSelFpf1, 6, f1_offset + 12, 1);
   1148     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri,
   1149                  _bcmFieldSliceSelFpf1, 6, f1_offset + 13, 3);
   1150     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVlanFormat,
   1151                  _bcmFieldSliceSelFpf1, 6, f1_offset + 16, 2);
   1152     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2Format,
   1153                  _bcmFieldSliceSelFpf1, 6, f1_offset + 18, 2);
   1154     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTranslatedVlanFormat,
   1155                  _bcmFieldSliceSelFpf1, 6, f1_offset + 20, 2);
   1156     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMHOpcode,
   1157                  _bcmFieldSliceSelFpf1, 6, f1_offset + 22, 3);
   1158     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyPacketRes,
   1159                  _bcmFieldSliceSelFpf1, 6, f1_offset + 25, 5);
   1160     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpInfo,
   1161                  _bcmFieldSliceSelFpf1, 6, f1_offset + 30, 3);
   1162 
   1163     /* F1_7 */
   1164     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan,
   1165                  _bcmFieldSliceSelFpf1, 7, f1_offset, 16);
   1166     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId,
   1167                  _bcmFieldSliceSelFpf1, 7, f1_offset, 12);
   1168     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi,
   1169                  _bcmFieldSliceSelFpf1, 7, f1_offset + 12, 1);
   1170     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri,
   1171                  _bcmFieldSliceSelFpf1, 7, f1_offset + 13, 3);
   1172     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL2,
   1173                                _bcmFieldSliceSelFpf1, 7,
   1174                                _bcmFieldSliceDstClassSelect, 0,
   1175                                f1_offset + 16, 6);
   1176     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL3,
   1177                                _bcmFieldSliceSelFpf1, 7,
   1178                                _bcmFieldSliceDstClassSelect, 1,
   1179                                f1_offset + 16, 6);
   1180     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField,
   1181                                _bcmFieldSliceSelFpf1, 7,
   1182                                _bcmFieldSliceSrcClassSelect, 2,
   1183                                f1_offset + 16, 6);
   1184     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField,
   1185                                _bcmFieldSliceSelFpf1, 7,
   1186                                _bcmFieldSliceSrcClassSelect, 3,
   1187                                f1_offset + 16, 6);
   1188     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVrf,
   1189                                _bcmFieldSliceSelFpf1, 7,
   1190                                _bcmFieldSliceFwdFieldSelect,
   1191                                _bcmFieldFwdFieldVrf, f1_offset + 22, 12);
   1192     /* VFI (bcmFieldQualifyVpn) are not supported in ForwardingField */
   1193     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc,
   1194                                bcmFieldQualifyForwardingVlanId,
   1195                                _bcmFieldSliceSelFpf1, 7,
   1196                                _bcmFieldSliceFwdFieldSelect,
   1197                                _bcmFieldFwdFieldVlan, f1_offset + 22, 12);
   1198 
   1199     /* F1_8 */
   1200     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol,
   1201                  _bcmFieldSliceSelFpf1, 8, f1_offset, 8);
   1202     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTos,
   1203                  _bcmFieldSliceSelFpf1, 8, f1_offset + 8, 8);
   1204     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL2,
   1205                                _bcmFieldSliceSelFpf1, 8,
   1206                                _bcmFieldSliceDstClassSelect, 0,
   1207                                f1_offset + 16, 6);
   1208     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL3,
   1209                                _bcmFieldSliceSelFpf1, 8,
   1210                                _bcmFieldSliceDstClassSelect, 1,
   1211                                f1_offset + 16, 6);
   1212     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField,
   1213                                _bcmFieldSliceSelFpf1, 8,
   1214                                _bcmFieldSliceSrcClassSelect, 2,
   1215                                f1_offset + 16, 6);
   1216     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField,
   1217                                _bcmFieldSliceSelFpf1, 8,
   1218                                _bcmFieldSliceSrcClassSelect, 3,
   1219                                f1_offset + 16, 6);
   1220     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc,
   1221                                bcmFieldQualifyVrf,
   1222                                _bcmFieldSliceSelFpf1, 8,
   1223                                _bcmFieldSliceFwdFieldSelect,
   1224                                _bcmFieldFwdFieldVrf, f1_offset + 22, 12);
   1225     /* VFI (bcmFieldQualifyVpn) are not supported in ForwardingField */
   1226     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc,
   1227                                bcmFieldQualifyForwardingVlanId,
   1228                                _bcmFieldSliceSelFpf1, 8,
   1229                                _bcmFieldSliceFwdFieldSelect,
   1230                                _bcmFieldFwdFieldVlan, f1_offset + 22, 12);
   1231     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIntCongestionNotification,
   1232                                _bcmFieldSliceSelFpf1, 8, f1_offset + 34, 2);
   1233 
   1234     /* F1_9 */
   1235     _FP_QUAL_ADD(unit, stage_fc, _bcmFieldQualifyData2,
   1236                                _bcmFieldSliceSelFpf1, 9, f1_offset, 32);
   1237 
   1238     /* F1_10 */
   1239     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstPort,
   1240                                _bcmFieldSliceSelFpf1, 10,
   1241                                _bcmFieldSliceDstFwdEntitySelect,
   1242                                _bcmFieldFwdEntityGlp, f1_offset, 19);
   1243     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstTrunk,
   1244                                _bcmFieldSliceSelFpf1, 10,
   1245                                _bcmFieldSliceDstFwdEntitySelect,
   1246                                _bcmFieldFwdEntityGlp, f1_offset, 19);
   1247     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstL3Egress,
   1248                                _bcmFieldSliceSelFpf1, 10,
   1249                                _bcmFieldSliceDstFwdEntitySelect,
   1250                                _bcmFieldFwdEntityL3Egress, f1_offset, 19);
   1251     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc,
   1252                                bcmFieldQualifyDstL3EgressNextHops,
   1253                                _bcmFieldSliceSelFpf1, 10,
   1254                                _bcmFieldSliceDstFwdEntitySelect,
   1255                                _bcmFieldFwdEntityL3Egress, f1_offset, 19);
   1256     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMulticastGroup,
   1257                                _bcmFieldSliceSelFpf1, 10,
   1258                                _bcmFieldSliceDstFwdEntitySelect,
   1259                                _bcmFieldFwdEntityMulticastGroup, f1_offset, 19);
   1260     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstPort,
   1261                  _bcmFieldSliceSelFpf1, 10, f1_offset + 19, 16);
   1262     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstTrunk,
   1263                  _bcmFieldSliceSelFpf1, 10, f1_offset + 19, 16);
   1264 
   1265     /* F1_11 */
   1266     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcPort,
   1267                  _bcmFieldSliceSelFpf1, 11, f1_offset, 16);
   1268     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcTrunk,
   1269                  _bcmFieldSliceSelFpf1, 11, f1_offset, 16);
   1270     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcModPortGport,
   1271                  _bcmFieldSliceSelFpf1, 11, f1_offset, 16);
   1272     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcModuleGport,
   1273                  _bcmFieldSliceSelFpf1, 11, f1_offset + 7, 8);
   1274     /* SVP (f1_offset + 16, 15) no support */
   1275     /* SVP_VALID (f1_offset + 31, 1) no support */
   1276 
   1277     /* F1_12 */
   1278     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId,
   1279                  _bcmFieldSliceSelFpf1, 12, f1_offset, 12);
   1280     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL2,
   1281                                _bcmFieldSliceSelFpf1, 12,
   1282                                _bcmFieldSliceDstClassSelect, 0,
   1283                                f1_offset + 12, 6);
   1284     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL3,
   1285                                _bcmFieldSliceSelFpf1, 12,
   1286                                _bcmFieldSliceDstClassSelect, 1,
   1287                                f1_offset + 12, 6);
   1288     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField,
   1289                                _bcmFieldSliceSelFpf1, 12,
   1290                                _bcmFieldSliceDstClassSelect, 2,
   1291                                f1_offset + 12, 6);
   1292     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField,
   1293                                _bcmFieldSliceSelFpf1, 12,
   1294                                _bcmFieldSliceDstClassSelect, 3,
   1295                                f1_offset + 12, 6);
   1296     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL2,
   1297                                _bcmFieldSliceSelFpf1, 12,
   1298                                _bcmFieldSliceSrcClassSelect, 0,
   1299                                f1_offset + 18, 6);
   1300     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL3,
   1301                                _bcmFieldSliceSelFpf1, 12,
   1302                                _bcmFieldSliceSrcClassSelect, 1,
   1303                                f1_offset + 18, 6);
   1304     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField,
   1305                                _bcmFieldSliceSelFpf1, 12,
   1306                                _bcmFieldSliceSrcClassSelect, 2,
   1307                                f1_offset + 18, 6);
   1308     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField,
   1309                                _bcmFieldSliceSelFpf1, 12,
   1310                                _bcmFieldSliceSrcClassSelect, 3,
   1311                                f1_offset + 18, 6);
   1312     /* SVP (f1_offset + 24, 15) no support */
   1313 
   1314     /* F1_13 */
   1315     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVnTag,
   1316                                _bcmFieldSliceSelFpf1, 13,
   1317                                _bcmFieldSliceAuxTag1Select,
   1318                                _bcmFieldAuxTagVn, f1_offset, 33);
   1319     if (soc_feature(unit, soc_feature_miml)) {
   1320         _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyMimlInnerTag,
   1321                                    _bcmFieldSliceSelFpf1, 13,
   1322                                    _bcmFieldSliceAuxTag1Select,
   1323                                    _bcmFieldAuxTagMimlHeader, f1_offset, 33);
   1324     }
   1325     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyCustomHeaderData,
   1326                                _bcmFieldSliceSelFpf1, 13,
   1327                                _bcmFieldSliceAuxTag1Select,
   1328                                _bcmFieldAuxTagCustomHeader, f1_offset, 33);
   1329 
   1330     _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadL4HdrParseable,
   1331                      _bcmFieldDevSelDisable, 0,
   1332                      _bcmFieldSliceSelFpf1, 13,
   1333                      _bcmFieldSliceAuxTag1Select, _bcmFieldAuxTagCapwapInfo,
   1334                      0,
   1335                      f1_offset, 1,
   1336                      f1_offset + 32, 1,
   1337                      0,  0,
   1338                      0
   1339                      );
   1340     _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadL3HdrParseable,
   1341                      _bcmFieldDevSelDisable, 0,
   1342                      _bcmFieldSliceSelFpf1, 13,
   1343                      _bcmFieldSliceAuxTag1Select, _bcmFieldAuxTagCapwapInfo,
   1344                      0,
   1345                      f1_offset + 1, 1,
   1346                      f1_offset + 32, 1,
   1347                      0,  0,
   1348                      0
   1349                      );
   1350     _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadInnerVlan,
   1351                      _bcmFieldDevSelDisable, 0,
   1352                      _bcmFieldSliceSelFpf1, 13,
   1353                      _bcmFieldSliceAuxTag1Select, _bcmFieldAuxTagCapwapInfo,
   1354                      0,
   1355                      f1_offset + 2, 16,
   1356                      f1_offset + 32, 1,
   1357                      0,  0,
   1358                      0
   1359                      );
   1360     _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadInnerVlanId,
   1361                      _bcmFieldDevSelDisable, 0,
   1362                      _bcmFieldSliceSelFpf1, 13,
   1363                      _bcmFieldSliceAuxTag1Select, _bcmFieldAuxTagCapwapInfo,
   1364                      0,
   1365                      f1_offset + 2, 12,
   1366                      f1_offset + 32, 1,
   1367                      0,  0,
   1368                      0
   1369                      );
   1370     _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadInnerVlanCfi,
   1371                      _bcmFieldDevSelDisable, 0,
   1372                      _bcmFieldSliceSelFpf1, 13,
   1373                      _bcmFieldSliceAuxTag1Select, _bcmFieldAuxTagCapwapInfo,
   1374                      0,
   1375                      f1_offset + 14, 1,
   1376                      f1_offset + 32, 1,
   1377                      0,  0,
   1378                      0
   1379                      );
   1380     _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadInnerVlanPri,
   1381                      _bcmFieldDevSelDisable, 0,
   1382                      _bcmFieldSliceSelFpf1, 13,
   1383                      _bcmFieldSliceAuxTag1Select, _bcmFieldAuxTagCapwapInfo,
   1384                      0,
   1385                      f1_offset + 15, 3,
   1386                      f1_offset + 32, 1,
   1387                      0,  0,
   1388                      0
   1389                      );
   1390     _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadVlanFormat,
   1391                      _bcmFieldDevSelDisable, 0,
   1392                      _bcmFieldSliceSelFpf1, 13,
   1393                      _bcmFieldSliceAuxTag1Select, _bcmFieldAuxTagCapwapInfo,
   1394                      0,
   1395                      f1_offset + 18, 2,
   1396                      f1_offset + 32, 1,
   1397                      0,  0,
   1398                      0
   1399                      );
   1400     _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadSOF,
   1401                      _bcmFieldDevSelDisable, 0,
   1402                      _bcmFieldSliceSelFpf1, 13,
   1403                      _bcmFieldSliceAuxTag1Select, _bcmFieldAuxTagCapwapInfo,
   1404                      0,
   1405                      f1_offset + 20, 1,
   1406                      f1_offset + 32, 1,
   1407                      0,  0,
   1408                      0
   1409                      );
   1410     _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyCapwapHdrType,
   1411                      _bcmFieldDevSelDisable, 0,
   1412                      _bcmFieldSliceSelFpf1, 13,
   1413                      _bcmFieldSliceAuxTag1Select, _bcmFieldAuxTagCapwapInfo,
   1414                      0,
   1415                      f1_offset + 21, 1,
   1416                      f1_offset + 32, 1,
   1417                      0,  0,
   1418                      0
   1419                      );
   1420     _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyCapwapHdrRid,
   1421                      _bcmFieldDevSelDisable, 0,
   1422                      _bcmFieldSliceSelFpf1, 13,
   1423                      _bcmFieldSliceAuxTag1Select, _bcmFieldAuxTagCapwapInfo,
   1424                      0,
   1425                      f1_offset + 22, 5,
   1426                      f1_offset + 32, 1,
   1427                      0,  0,
   1428                      0
   1429                      );
   1430 
   1431     /* F1_14 */
   1432     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMyStationHit,
   1433                  _bcmFieldSliceSelFpf1, 14, f1_offset, 1);
   1434     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVxlanClassValid,
   1435                  _bcmFieldSliceSelFpf1, 14, f1_offset + 1, 1);
   1436     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVxlanNetworkId,
   1437                  _bcmFieldSliceSelFpf1, 14, f1_offset + 2, 24);
   1438     /* Not required for VXLAN-LITE: VXLAN_CLASS_ID (f1_offset + 26, 6) */
   1439     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVxlanPacket,
   1440                  _bcmFieldSliceSelFpf1, 14, f1_offset + 32, 1);
   1441     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTunnelTerminated,
   1442                  _bcmFieldSliceSelFpf1, 14, f1_offset + 33, 1);
   1443     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVxlanPayloadVlanFormat,
   1444                  _bcmFieldSliceSelFpf1, 14, f1_offset + 34, 2);
   1445     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVxlanVnidVlanTranslateHit,
   1446                  _bcmFieldSliceSelFpf1, 14, f1_offset + 36, 1);
   1447 
   1448     /* F1_15 */
   1449     
   1450     
   1451     
   1452     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyRoceVer1Pkt,
   1453                  _bcmFieldSliceSelFpf1, 15, f1_offset + 13, 1);
   1454     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyRoceVer2Pkt,
   1455                  _bcmFieldSliceSelFpf1, 15, f1_offset + 14, 1);
   1456     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyRoceBthOpcode,
   1457                  _bcmFieldSliceSelFpf1, 15, f1_offset + 15, 8);
   1458     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyRoceBthPartitionKey,
   1459                  _bcmFieldSliceSelFpf1, 15, f1_offset + 23, 16);
   1460 
   1461 
   1462     /* DWF4 */
   1463     /* DWF4_1 */
   1464     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyTcpControl,
   1465                             _bcmFieldSliceSelFpf4, 1,
   1466                             _bcmFieldSliceSelDisable, 0, dwf4_offset, 6);
   1467 
   1468     /* DWF3 */
   1469     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyTos,
   1470                             _bcmFieldSliceSelFpf3, 0,
   1471                             _bcmFieldSliceSelDisable, 0, dwf3_offset, 8);
   1472     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol,
   1473                             _bcmFieldSliceSelFpf3, 0,
   1474                             _bcmFieldSliceSelDisable, 0, dwf3_offset + 8, 8);
   1475     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc,
   1476                             bcmFieldQualifyExtensionHeaderSubCode,
   1477                             _bcmFieldSliceSelFpf3, 0,
   1478                             _bcmFieldSliceSelDisable, 0, dwf3_offset + 16, 8);
   1479     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyExtensionHeaderType,
   1480                             _bcmFieldSliceSelFpf3, 0,
   1481                             _bcmFieldSliceSelDisable, 0, dwf3_offset + 24, 8);
   1482 
   1483     /* DWF2 */
   1484     /* DWF2_0 */
   1485     /* bcmFieldQualifyMplsTerminated is not supported */
   1486     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyVlanTranslationHit,
   1487                             _bcmFieldSliceSelFpf2, 0,
   1488                             _bcmFieldSliceSelDisable, 0, dwf2_offset + 17, 1);
   1489     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyForwardingVlanValid,
   1490                             _bcmFieldSliceSelFpf2, 0,
   1491                             _bcmFieldSliceSelDisable, 0, dwf2_offset + 18, 1);
   1492     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyIngressStpState,
   1493                             _bcmFieldSliceSelFpf2, 0,
   1494                             _bcmFieldSliceSelDisable, 0, dwf2_offset + 19, 2);
   1495     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyL2SrcHit,
   1496                             _bcmFieldSliceSelFpf2, 0,
   1497                             _bcmFieldSliceSelDisable, 0, dwf2_offset + 21, 1);
   1498     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyL2SrcStatic,
   1499                             _bcmFieldSliceSelFpf2, 0,
   1500                             _bcmFieldSliceSelDisable, 0, dwf2_offset + 22, 1);
   1501     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyL2DestHit,
   1502                             _bcmFieldSliceSelFpf2, 0,
   1503                             _bcmFieldSliceSelDisable, 0, dwf2_offset + 23, 1);
   1504     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyL2CacheHit,
   1505                             _bcmFieldSliceSelFpf2, 0,
   1506                             _bcmFieldSliceSelDisable, 0, dwf2_offset + 25, 1);
   1507     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyL3SrcHostHit,
   1508                             _bcmFieldSliceSelFpf2, 0,
   1509                             _bcmFieldSliceSelDisable, 0, dwf2_offset + 26, 1);
   1510     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyL3DestHostHit,
   1511                             _bcmFieldSliceSelFpf2, 0,
   1512                             _bcmFieldSliceSelDisable, 0, dwf2_offset + 27, 1);
   1513     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyIpmcStarGroupHit,
   1514                             _bcmFieldSliceSelFpf2, 0,
   1515                             _bcmFieldSliceSelDisable, 0, dwf2_offset + 28, 1);
   1516     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyL3DestRouteHit,
   1517                             _bcmFieldSliceSelFpf2, 0,
   1518                             _bcmFieldSliceSelDisable, 0, dwf2_offset + 29, 1);
   1519     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyL2StationMove,
   1520                             _bcmFieldSliceSelFpf2, 0,
   1521                             _bcmFieldSliceSelDisable, 0, dwf2_offset + 30, 1);
   1522     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyDosAttack,
   1523                             _bcmFieldSliceSelFpf2, 0,
   1524                             _bcmFieldSliceSelDisable, 0, dwf2_offset + 31, 1);
   1525     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyRangeCheck,
   1526                             _bcmFieldSliceSelFpf2, 0,
   1527                             _bcmFieldSliceSelDisable, 0, dwf2_offset + 32, 32);
   1528     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassPort,
   1529                             _bcmFieldSliceSelFpf2, 0,
   1530                             _bcmFieldSliceIntfClassSelect, 0,
   1531                             dwf2_offset + 56, 8);
   1532     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassL3,
   1533                             _bcmFieldSliceSelFpf2, 0,
   1534                             _bcmFieldSliceIntfClassSelect, 1,
   1535                             dwf2_offset + 56, 8);
   1536     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassL2,
   1537                             _bcmFieldSliceSelFpf2, 0,
   1538                             _bcmFieldSliceIntfClassSelect, 2,
   1539                             dwf2_offset + 56, 8);
   1540     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, _bcmFieldQualifyRangeCheckBits24_31,
   1541                             _bcmFieldSliceSelFpf2, 0,
   1542                             _bcmFieldSliceIntfClassSelect, 3,
   1543                             dwf2_offset + 56, 8);
   1544     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyDstIp,
   1545                             _bcmFieldSliceSelFpf2, 0,
   1546                             _bcmFieldSliceSelDisable, 0, dwf2_offset + 64, 32);
   1547     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifySrcIp,
   1548                             _bcmFieldSliceSelFpf2, 0,
   1549                             _bcmFieldSliceSelDisable, 0, dwf2_offset + 96, 32);
   1550 
   1551     /* DWF2_1 */
   1552     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifySrcIp6,
   1553                             _bcmFieldSliceSelFpf2, 1,
   1554                             _bcmFieldSliceSelDisable, 0, dwf2_offset, 128);
   1555 
   1556     /* DWF2_2 */
   1557     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyDstIp6,
   1558                             _bcmFieldSliceSelFpf2, 2,
   1559                             _bcmFieldSliceSelDisable, 0, dwf2_offset, 128);
   1560 
   1561     /* DWF2_3 */
   1562     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, _bcmFieldQualifyData1,
   1563                             _bcmFieldSliceSelFpf2, 3,
   1564                             _bcmFieldSliceSelDisable, 0, dwf2_offset, 128);
   1565 
   1566     /* DWF2_4 */
   1567     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc,
   1568                             bcmFieldQualifyCapwapPayloadOuterVlan,
   1569                             _bcmFieldSliceSelFpf2, 4,
   1570                             _bcmFieldSliceSelDisable, 0, dwf2_offset, 16);
   1571     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc,
   1572                             bcmFieldQualifyCapwapPayloadOuterVlanId,
   1573                             _bcmFieldSliceSelFpf2, 4,
   1574                             _bcmFieldSliceSelDisable, 0, dwf2_offset, 12);
   1575     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc,
   1576                             bcmFieldQualifyCapwapPayloadOuterVlanCfi,
   1577                             _bcmFieldSliceSelFpf2, 4,
   1578                             _bcmFieldSliceSelDisable, 0, dwf2_offset + 12, 1);
   1579     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc,
   1580                             bcmFieldQualifyCapwapPayloadOuterVlanPri,
   1581                             _bcmFieldSliceSelFpf2, 4,
   1582                             _bcmFieldSliceSelDisable, 0, dwf2_offset + 13, 3);
   1583     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc,
   1584                             bcmFieldQualifyCapwapPayloadEtherType,
   1585                             _bcmFieldSliceSelFpf2, 4,
   1586                             _bcmFieldSliceSelDisable, 0, dwf2_offset + 16, 16);
   1587     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadSrcMac,
   1588                             _bcmFieldSliceSelFpf2, 4,
   1589                             _bcmFieldSliceSelDisable, 0, dwf2_offset + 32, 48);
   1590     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadDstMac,
   1591                             _bcmFieldSliceSelFpf2, 4,
   1592                             _bcmFieldSliceSelDisable, 0, dwf2_offset + 80, 48);
   1593 
   1594     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc,
   1595                             bcmFieldQualifyTunnelPayloadOuterVlan,
   1596                             _bcmFieldSliceSelFpf2, 4,
   1597                             _bcmFieldSliceSelDisable, 0, dwf2_offset, 16);
   1598     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc,
   1599                             bcmFieldQualifyTunnelPayloadOuterVlanId,
   1600                             _bcmFieldSliceSelFpf2, 4,
   1601                             _bcmFieldSliceSelDisable, 0, dwf2_offset, 12);
   1602     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc,
   1603                             bcmFieldQualifyTunnelPayloadOuterVlanCfi,
   1604                             _bcmFieldSliceSelFpf2, 4,
   1605                             _bcmFieldSliceSelDisable, 0, dwf2_offset + 12, 1);
   1606     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc,
   1607                             bcmFieldQualifyTunnelPayloadOuterVlanPri,
   1608                             _bcmFieldSliceSelFpf2, 4,
   1609                             _bcmFieldSliceSelDisable, 0, dwf2_offset + 13, 3);
   1610     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc,
   1611                             bcmFieldQualifyTunnelPayloadEtherType,
   1612                             _bcmFieldSliceSelFpf2, 4,
   1613                             _bcmFieldSliceSelDisable, 0, dwf2_offset + 16, 16);
   1614     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyTunnelPayloadSrcMac,
   1615                             _bcmFieldSliceSelFpf2, 4,
   1616                             _bcmFieldSliceSelDisable, 0, dwf2_offset + 32, 48);
   1617     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyTunnelPayloadDstMac,
   1618                             _bcmFieldSliceSelFpf2, 4,
   1619                             _bcmFieldSliceSelDisable, 0, dwf2_offset + 80, 48);
   1620 
   1621     /* DWF2_5 */
   1622     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc,
   1623                             bcmFieldQualifyCapwapPayloadL4DstPort,
   1624                             _bcmFieldSliceSelFpf2, 5,
   1625                             _bcmFieldSliceSelDisable, 0, dwf2_offset, 16);
   1626     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc,
   1627                             bcmFieldQualifyCapwapPayloadL4SrcPort,
   1628                             _bcmFieldSliceSelFpf2, 5,
   1629                             _bcmFieldSliceSelDisable, 0, dwf2_offset + 16, 16);
   1630     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadTos,
   1631                             _bcmFieldSliceSelFpf2, 5,
   1632                             _bcmFieldSliceSelDisable, 0, dwf2_offset + 32, 8);
   1633     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc,
   1634                             bcmFieldQualifyCapwapPayloadIpProtocol,
   1635                             _bcmFieldSliceSelFpf2, 5,
   1636                             _bcmFieldSliceSelDisable, 0, dwf2_offset + 40, 8);
   1637     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadDip,
   1638                             _bcmFieldSliceSelFpf2, 5,
   1639                             _bcmFieldSliceSelDisable, 0, dwf2_offset + 48, 32);
   1640     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadSip,
   1641                             _bcmFieldSliceSelFpf2, 5,
   1642                             _bcmFieldSliceSelDisable, 0, dwf2_offset + 80, 32);
   1643 
   1644     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc,
   1645                             bcmFieldQualifyTunnelPayloadL4DstPort,
   1646                             _bcmFieldSliceSelFpf2, 5,
   1647                             _bcmFieldSliceSelDisable, 0, dwf2_offset, 16);
   1648     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc,
   1649                             bcmFieldQualifyTunnelPayloadL4SrcPort,
   1650                             _bcmFieldSliceSelFpf2, 5,
   1651                             _bcmFieldSliceSelDisable, 0, dwf2_offset + 16, 16);
   1652     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyInnerTos,
   1653                             _bcmFieldSliceSelFpf2, 5,
   1654                             _bcmFieldSliceSelDisable, 0, dwf2_offset + 32, 8);
   1655     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc,
   1656                             bcmFieldQualifyTunnelPayloadIpProtocol,
   1657                             _bcmFieldSliceSelFpf2, 5,
   1658                             _bcmFieldSliceSelDisable, 0, dwf2_offset + 40, 8);
   1659     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyTunnelPayloadDip,
   1660                             _bcmFieldSliceSelFpf2, 5,
   1661                             _bcmFieldSliceSelDisable, 0, dwf2_offset + 48, 32);
   1662     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyTunnelPayloadSip,
   1663                             _bcmFieldSliceSelFpf2, 5,
   1664                             _bcmFieldSliceSelDisable, 0, dwf2_offset + 80, 32);
   1665 
   1666     /* DWF2_6 */
   1667     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadSip6,
   1668                             _bcmFieldSliceSelFpf2, 6,
   1669                             _bcmFieldSliceSelDisable, 0, dwf2_offset, 128);
   1670 
   1671     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyTunnelPayloadSip6,
   1672                             _bcmFieldSliceSelFpf2, 6,
   1673                             _bcmFieldSliceSelDisable, 0, dwf2_offset, 128);
   1674 
   1675     /* DWF2_7 */
   1676     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadDip6,
   1677                             _bcmFieldSliceSelFpf2, 7,
   1678                             _bcmFieldSliceSelDisable, 0, dwf2_offset, 128);
   1679 
   1680     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyTunnelPayloadDip6,
   1681                             _bcmFieldSliceSelFpf2, 7,
   1682                             _bcmFieldSliceSelDisable, 0, dwf2_offset, 128);
   1683 
   1684     /* DWF1 */
   1685     /* DWF1_0 */
   1686     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyTtl,
   1687                             _bcmFieldSliceSelFpf1, 0,
   1688                             _bcmFieldSliceSelDisable, 0, dwf1_offset, 8);
   1689     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyIpFrag,
   1690                             _bcmFieldSliceSelFpf1, 0,
   1691                             _bcmFieldSliceSelDisable, 0, dwf1_offset + 8, 2);
   1692     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyL4DstPort,
   1693                             _bcmFieldSliceSelFpf1, 0,
   1694                             _bcmFieldSliceSelDisable, 0, dwf1_offset + 10, 16);
   1695     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyL4SrcPort,
   1696                             _bcmFieldSliceSelFpf1, 0,
   1697                             _bcmFieldSliceSelDisable, 0, dwf1_offset + 26, 16);
   1698     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyDstPort,
   1699                             _bcmFieldSliceSelFpf1, 0,
   1700                             _bcmFieldSliceDstFwdEntitySelect,
   1701                             _bcmFieldFwdEntityGlp,
   1702                             dwf1_offset + 42, 19);
   1703     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyDstTrunk,
   1704                             _bcmFieldSliceSelFpf1, 0,
   1705                             _bcmFieldSliceDstFwdEntitySelect,
   1706                             _bcmFieldFwdEntityGlp,
   1707                             dwf1_offset + 42, 19);
   1708     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyDstL3Egress,
   1709                             _bcmFieldSliceSelFpf1, 0,
   1710                             _bcmFieldSliceDstFwdEntitySelect,
   1711                             _bcmFieldFwdEntityL3Egress,
   1712                             dwf1_offset + 42, 19);
   1713     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyDstL3EgressNextHops,
   1714                             _bcmFieldSliceSelFpf1, 0,
   1715                             _bcmFieldSliceDstFwdEntitySelect,
   1716                             _bcmFieldFwdEntityL3Egress,
   1717                             dwf1_offset + 42, 19);
   1718     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyDstMulticastGroup,
   1719                             _bcmFieldSliceSelFpf1, 0,
   1720                             _bcmFieldSliceDstFwdEntitySelect,
   1721                             _bcmFieldFwdEntityMulticastGroup,
   1722                             dwf1_offset + 42, 19);
   1723     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc,
   1724                             bcmFieldQualifyIntCongestionNotification,
   1725                             _bcmFieldSliceSelFpf1, 0,
   1726                             _bcmFieldSliceSelDisable, 0,
   1727                             dwf1_offset + 61, 2);
   1728 
   1729     /* DWF1_1 */
   1730     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc,
   1731                             bcmFieldQualifyCapwapPayloadL4DstPort,
   1732                             _bcmFieldSliceSelFpf1, 1,
   1733                             _bcmFieldSliceSelDisable, 0, dwf1_offset, 16);
   1734     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc,
   1735                             bcmFieldQualifyCapwapPayloadL4SrcPort,
   1736                             _bcmFieldSliceSelFpf1, 1,
   1737                             _bcmFieldSliceSelDisable, 0, dwf1_offset + 16, 16);
   1738     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyCapwapPayloadTos,
   1739                             _bcmFieldSliceSelFpf1, 1,
   1740                             _bcmFieldSliceSelDisable, 0, dwf1_offset + 32, 8);
   1741     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc,
   1742                             bcmFieldQualifyCapwapPayloadIpProtocol,
   1743                             _bcmFieldSliceSelFpf1, 1,
   1744                             _bcmFieldSliceSelDisable, 0, dwf1_offset + 40, 8);
   1745 
   1746     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc,
   1747                             bcmFieldQualifyTunnelPayloadL4DstPort,
   1748                             _bcmFieldSliceSelFpf1, 1,
   1749                             _bcmFieldSliceSelDisable, 0, dwf1_offset, 16);
   1750     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc,
   1751                             bcmFieldQualifyTunnelPayloadL4SrcPort,
   1752                             _bcmFieldSliceSelFpf1, 1,
   1753                             _bcmFieldSliceSelDisable, 0, dwf1_offset + 16, 16);
   1754     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyInnerTos,
   1755                             _bcmFieldSliceSelFpf1, 1,
   1756                             _bcmFieldSliceSelDisable, 0, dwf1_offset + 32, 8);
   1757     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc,
   1758                             bcmFieldQualifyTunnelPayloadIpProtocol,
   1759                             _bcmFieldSliceSelFpf1, 1,
   1760                             _bcmFieldSliceSelDisable, 0, dwf1_offset + 40, 8);
   1761 
   1762     /* DWF1_2 */
   1763     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyRoceVer1Pkt,
   1764                  _bcmFieldSliceSelFpf1, 2,
   1765                  _bcmFieldSliceSelDisable, 0, dwf1_offset, 1);
   1766     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyRoceVer2Pkt,
   1767                  _bcmFieldSliceSelFpf1, 2,
   1768                  _bcmFieldSliceSelDisable, 0, dwf1_offset + 1, 1);
   1769     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyRoceBthFlags,
   1770                  _bcmFieldSliceSelFpf1, 2,
   1771                  _bcmFieldSliceSelDisable, 0, dwf1_offset + 2, 8);
   1772     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyRoceBthDstQueuePair,
   1773                  _bcmFieldSliceSelFpf1, 2,
   1774                  _bcmFieldSliceSelDisable, 0, dwf1_offset + 10, 24);
   1775     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyRoceBthOpcode,
   1776                  _bcmFieldSliceSelFpf1, 2,
   1777                  _bcmFieldSliceSelDisable, 0, dwf1_offset + 34, 8);
   1778     _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyRoceBthPartitionKey,
   1779                  _bcmFieldSliceSelFpf1, 2,
   1780                  _bcmFieldSliceSelDisable, 0, dwf1_offset + 42, 16);
   1781 
   1782 
   1783     /* DONE DWF */
   1784     return (BCM_E_NONE);
   1785 }
   1786 
   1787 /*
   1788  * Function:
   1789  *     _field_gh2_lookup_qualifiers_init
   1790  * Purpose:
   1791  *     Initialize device stage lookup qaualifiers
   1792  *     select codes & offsets
   1793  * Parameters:
   1794  *     unit       - (IN) BCM device number.
   1795  *     stage_fc   - (IN) Field Processor stage control structure.
   1796  *
   1797  * Returns:
   1798  *     BCM_E_NONE
   1799  */
   1800 STATIC int
   1801 _field_gh2_lookup_qualifiers_init(int unit, _field_stage_t *stage_fc)
   1802 {
   1803     /* Key Format:
   1804         F1(53b), F2(128b), F3(32b)
   1805      */
   1806     const unsigned int f3_offset = 0;
   1807     const unsigned int f2_offset = 32;
   1808     const unsigned int f1_offset = f2_offset + 128;    /* = 160 */
   1809 
   1810     _FP_QUAL_DECL;
   1811 
   1812     /* Input parameters check. */
   1813     if (NULL == stage_fc) {
   1814         return (BCM_E_PARAM);
   1815     }
   1816 
   1817     /* Enable the overlay of Sender Ethernet Address onto MACSA
   1818      * on ARP/RARP packets.
   1819      */
   1820     BCM_IF_ERROR_RETURN
   1821         (soc_reg_field32_modify(unit, ING_CONFIG_64r, REG_PORT_ANY,
   1822                                 ARP_VALIDATION_ENf, 1));
   1823 
   1824     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyStageLookup,
   1825                  _bcmFieldSliceSelDisable, 0, 0, 0);
   1826     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIp4,
   1827                  _bcmFieldSliceSelDisable, 0, 0, 0);
   1828     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIp6,
   1829                  _bcmFieldSliceSelDisable, 0, 0, 0);
   1830 
   1831 
   1832     /* VFP_F3 */
   1833     /* VFP_F3_0 */
   1834     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlan,
   1835                  _bcmFieldSliceSelFpf3, 0, f3_offset, 16);
   1836     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanId,
   1837                  _bcmFieldSliceSelFpf3, 0, f3_offset, 12);
   1838     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanCfi,
   1839                  _bcmFieldSliceSelFpf3, 0, f3_offset + 12, 1);
   1840     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanPri,
   1841                  _bcmFieldSliceSelFpf3, 0, f3_offset + 13, 3);
   1842     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyEtherType,
   1843                  _bcmFieldSliceSelFpf3, 0, f3_offset + 16, 16);
   1844 
   1845     /* VFP_F3_1 */
   1846     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4DstPort,
   1847                  _bcmFieldSliceSelFpf3, 1, f3_offset, 16);
   1848     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4SrcPort,
   1849                  _bcmFieldSliceSelFpf3, 1, f3_offset + 16, 16);
   1850 
   1851     /* VFP_F3_2 */
   1852     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTos,
   1853                  _bcmFieldSliceSelFpf3, 2, f3_offset, 8);
   1854     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol,
   1855                  _bcmFieldSliceSelFpf3, 2, f3_offset + 8, 8);
   1856     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyExtensionHeaderSubCode,
   1857                  _bcmFieldSliceSelFpf3, 2, f3_offset + 16, 8);
   1858     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyExtensionHeaderType,
   1859                  _bcmFieldSliceSelFpf3, 2, f3_offset + 24, 8);
   1860 
   1861     /* VFP_F3_3 */
   1862     /* TUNNEL_CLASSID is not supported */
   1863     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlan,
   1864                  _bcmFieldSliceSelFpf3, 3, f3_offset + 8, 16);
   1865     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanId,
   1866                  _bcmFieldSliceSelFpf3, 3, f3_offset + 8, 12);
   1867     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanCfi,
   1868                  _bcmFieldSliceSelFpf3, 3, f3_offset + 20, 1);
   1869     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanPri,
   1870                  _bcmFieldSliceSelFpf3, 3, f3_offset + 21, 3);
   1871     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcModuleGport,
   1872                  _bcmFieldSliceSelFpf3, 3, f3_offset + 24, 8);
   1873 
   1874     /* VFP_F3_4 */
   1875     if (soc_feature(unit, soc_feature_vxlan_lite_riot)) {
   1876         _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVxlanNetworkId,
   1877                      _bcmFieldSliceSelFpf3, 3, f3_offset, 24);
   1878         _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVxlanPacket,
   1879                      _bcmFieldSliceSelFpf3, 3, f3_offset + 24, 1);
   1880     }
   1881 
   1882     /* VFP_F2 */
   1883     /* VFP_F2_0 */
   1884     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTtl,
   1885                  _bcmFieldSliceSelFpf2, 0, f2_offset, 8);
   1886     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTcpControl,
   1887                  _bcmFieldSliceSelFpf2, 0, f2_offset + 8, 6);
   1888     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpFrag,
   1889                  _bcmFieldSliceSelFpf2, 0, f2_offset + 14, 2);
   1890     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTos,
   1891                  _bcmFieldSliceSelFpf2, 0, f2_offset + 16, 8);
   1892     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4DstPort,
   1893                  _bcmFieldSliceSelFpf2, 0, f2_offset + 24, 16);
   1894     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4SrcPort,
   1895                  _bcmFieldSliceSelFpf2, 0, f2_offset + 40, 16);
   1896     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol,
   1897                  _bcmFieldSliceSelFpf2, 0, f2_offset + 56, 8);
   1898     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstIp,
   1899                  _bcmFieldSliceSelFpf2, 0, f2_offset + 64, 32);
   1900     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcIp,
   1901                  _bcmFieldSliceSelFpf2, 0, f2_offset + 96, 32);
   1902 
   1903     /* VFP_F2_1 */
   1904     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcIp6,
   1905                  _bcmFieldSliceSelFpf2, 1, f2_offset, 128);
   1906 
   1907     /* VFP_F2_2 */
   1908     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstIp6,
   1909                  _bcmFieldSliceSelFpf2, 2, f2_offset, 128);
   1910 
   1911     /* VFP_F2_3 */
   1912     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyEtherType,
   1913                  _bcmFieldSliceSelFpf2, 3, f2_offset + 16, 16);
   1914     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcMac,
   1915                  _bcmFieldSliceSelFpf2, 3, f2_offset + 32, 48);
   1916     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstMac,
   1917                  _bcmFieldSliceSelFpf2, 3, f2_offset + 80, 48);
   1918 
   1919     /* VFP_F2_4 */
   1920     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTos,
   1921                  _bcmFieldSliceSelFpf2, 4, f2_offset, 8);
   1922     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol,
   1923                  _bcmFieldSliceSelFpf2, 4, f2_offset + 8, 8);
   1924     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstIp,
   1925                  _bcmFieldSliceSelFpf2, 4, f2_offset + 16, 32);
   1926     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcIp,
   1927                  _bcmFieldSliceSelFpf2, 4, f2_offset + 48, 32);
   1928     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcMac,
   1929                  _bcmFieldSliceSelFpf2, 4, f2_offset + 80, 48);
   1930 
   1931     /* VFP_F2_5 */
   1932     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTos,
   1933                  _bcmFieldSliceSelFpf2, 5, f2_offset, 8);
   1934     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol,
   1935                  _bcmFieldSliceSelFpf2, 5, f2_offset + 8, 8);
   1936     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstIp,
   1937                  _bcmFieldSliceSelFpf2, 5, f2_offset + 16, 32);
   1938     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcIp,
   1939                  _bcmFieldSliceSelFpf2, 5, f2_offset + 48, 32);
   1940     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstMac,
   1941                  _bcmFieldSliceSelFpf2, 5, f2_offset + 80, 48);
   1942 
   1943     /* VFP_F2_6 */
   1944     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcIp6High,
   1945                  _bcmFieldSliceSelFpf2, 6, f2_offset, 64);
   1946     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstIp6High,
   1947                  _bcmFieldSliceSelFpf2, 6, f2_offset + 64, 64);
   1948 
   1949     /* VFP_F2_7 */
   1950     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVnTag,
   1951                  _bcmFieldSliceSelFpf2, 7, f2_offset, 33);
   1952     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySnap,
   1953                  _bcmFieldSliceSelFpf2, 7, f2_offset + 64, 40);
   1954     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyLlc,
   1955                  _bcmFieldSliceSelFpf2, 7, f2_offset + 104, 24);
   1956 
   1957 
   1958     /* VFP_F1 */
   1959     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocolCommon,
   1960                  _bcmFieldSliceSelFpf1, 0, f1_offset, 3);
   1961     /* bcmFieldQualifyTunnelTerminated is not supported */
   1962     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpInfo,
   1963                  _bcmFieldSliceSelFpf1, 0, f1_offset + 4, 1);
   1964     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerTpid,
   1965                  _bcmFieldSliceSelFpf1, 0, f1_offset + 5, 2);
   1966     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterTpid,
   1967                  _bcmFieldSliceSelFpf1, 0, f1_offset + 7, 2);
   1968     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2Format,
   1969                  _bcmFieldSliceSelFpf1, 0, f1_offset + 9, 2);
   1970     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyHiGigProxy,
   1971                  _bcmFieldSliceSelFpf1, 0, f1_offset + 11, 1);
   1972     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyHiGig,
   1973                  _bcmFieldSliceSelFpf1, 0, f1_offset + 12, 1);
   1974     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan,
   1975                  _bcmFieldSliceSelFpf1, 0, f1_offset + 13, 16);
   1976     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId,
   1977                  _bcmFieldSliceSelFpf1, 0, f1_offset + 13, 12);
   1978     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi,
   1979                  _bcmFieldSliceSelFpf1, 0, f1_offset + 25, 1);
   1980     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri,
   1981                  _bcmFieldSliceSelFpf1, 0, f1_offset + 26, 3);
   1982     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVlanFormat,
   1983                  _bcmFieldSliceSelFpf1, 0, f1_offset + 29, 2);
   1984     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInPort,
   1985                  _bcmFieldSliceSelFpf1, 0, f1_offset + 31, 7);
   1986     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassPort,
   1987                  _bcmFieldSliceSelFpf1, 0, f1_offset + 38, 8);
   1988     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpType,
   1989                  _bcmFieldSliceSelFpf1, 0, f1_offset + 46, 4);
   1990     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4Ports,
   1991                  _bcmFieldSliceSelFpf1, 0, f1_offset + 50, 1);
   1992 
   1993     return (BCM_E_NONE);
   1994 }
   1995 
   1996 
   1997 /*
   1998  * Function:
   1999  *     _field_gh2_egress_qualifiers_init
   2000  * Purpose:
   2001  *     Initialize device stage egress qaualifiers
   2002  *     select codes & offsets
   2003  * Parameters:
   2004  *     unit       - (IN) BCM device number.
   2005  *     stage_fc   - (IN) Field Processor stage control structure.
   2006  *
   2007  * Returns:
   2008  *     BCM_E_NONE
   2009  */
   2010 STATIC int
   2011 _field_gh2_egress_qualifiers_init(int unit, _field_stage_t *stage_fc)
   2012 {
   2013     _FP_QUAL_DECL;
   2014     _key_fld_ = KEYf;
   2015 
   2016     /* Input parameters check. */
   2017     if (NULL == stage_fc) {
   2018         return (BCM_E_PARAM);
   2019     }
   2020 
   2021     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyStageEgress,
   2022                  _bcmFieldSliceSelDisable, 0, 0, 0);
   2023 
   2024     /* EFP_KEY1 */
   2025     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4Ports,
   2026                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 0, 1);
   2027     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIntCongestionNotification,
   2028                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 1, 2);
   2029     if (soc_feature(unit, soc_feature_vxlan_lite_riot)) {
   2030         _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDecap,
   2031                      _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 3, 1);
   2032     }
   2033     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpFrag,
   2034                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 14, 2);
   2035     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTcpControl,
   2036                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 16, 6);
   2037     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4DstPort,
   2038                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 22, 16);
   2039     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4SrcPort,
   2040                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 38, 16);
   2041     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTtl,
   2042                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 54, 8);
   2043     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol,
   2044                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 62, 8);
   2045     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstIp,
   2046                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 70, 32);
   2047     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcIp,
   2048                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 102, 32);
   2049     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTos,
   2050                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 134, 8);
   2051     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyHiGigProxy,
   2052                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 142, 1);
   2053     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyHiGig,
   2054                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 143, 1);
   2055     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanId,
   2056                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 152, 12);
   2057     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInPort,
   2058                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 165, 7);
   2059     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3Routable,
   2060                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 172, 1);
   2061     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMirrorCopy,
   2062                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 173, 1);
   2063     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan,
   2064                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 174, 16);
   2065     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId,
   2066                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 174, 12);
   2067     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi,
   2068                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 186, 1);
   2069     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri,
   2070                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 187, 3);
   2071     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVlanFormat,
   2072                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 190, 2);
   2073     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstHiGig,
   2074                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 192, 1);
   2075     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassPort,
   2076                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 193, 8);
   2077     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOutPort,
   2078                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 201, 7);
   2079     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpType,
   2080                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 208, 4);
   2081     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDrop,
   2082                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 212, 1);
   2083     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyPreemptablePacket,
   2084                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 213, 1);
   2085     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIp4,
   2086                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 0, 0);
   2087 
   2088 
   2089     /* EFP_KEY2 */
   2090     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4Ports,
   2091                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 0, 1);
   2092     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIntCongestionNotification,
   2093                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 1, 2);
   2094     if (soc_feature(unit, soc_feature_vxlan_lite_riot)) {
   2095         _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDecap,
   2096                      _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 3, 1);
   2097     }
   2098     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol,
   2099                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 6, 8);
   2100     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcIp6,
   2101                                _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2,
   2102                                _bcmFieldSliceIp6AddrSelect,
   2103                                _BCM_FIELD_EGRESS_SLICE_V6_KEY_MODE_SIP6,
   2104                                14, 128);
   2105     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstIp6,
   2106                                _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2,
   2107                                _bcmFieldSliceIp6AddrSelect,
   2108                                _BCM_FIELD_EGRESS_SLICE_V6_KEY_MODE_DIP6,
   2109                                14, 128);
   2110     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcIp6High,
   2111                                _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2,
   2112                                _bcmFieldSliceIp6AddrSelect,
   2113                                _BCM_FIELD_EGRESS_SLICE_V6_KEY_MODE_SIP_DIP_64,
   2114                                14, 64);
   2115     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstIp6High,
   2116                                _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2,
   2117                                _bcmFieldSliceIp6AddrSelect,
   2118                                _BCM_FIELD_EGRESS_SLICE_V6_KEY_MODE_SIP_DIP_64,
   2119                                78, 64);
   2120     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTos,
   2121                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 142, 8);
   2122     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyHiGigProxy,
   2123                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 150, 1);
   2124     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyHiGig,
   2125                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 151, 1);
   2126     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanId,
   2127                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 152, 12);
   2128     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInPort,
   2129                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 165, 7);
   2130     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3Routable,
   2131                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 172, 1);
   2132     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMirrorCopy,
   2133                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 173, 1);
   2134     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan,
   2135                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 174, 16);
   2136     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId,
   2137                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 174, 12);
   2138     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi,
   2139                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 186, 1);
   2140     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri,
   2141                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 187, 3);
   2142     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVlanFormat,
   2143                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 190, 2);
   2144     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstHiGig,
   2145                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 192, 1);
   2146     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassPort,
   2147                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 193, 8);
   2148     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOutPort,
   2149                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 201, 7);
   2150     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpType,
   2151                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 208, 4);
   2152     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDrop,
   2153                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 212, 1);
   2154     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyPreemptablePacket,
   2155                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 213, 1);
   2156     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIp6,
   2157                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 0, 0);
   2158 
   2159 
   2160     /* EFP_KEY3 */
   2161     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4Ports,
   2162                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 0, 1);
   2163     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIntCongestionNotification,
   2164                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 1, 2);
   2165     if (soc_feature(unit, soc_feature_vxlan_lite_riot)) {
   2166         _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDecap,
   2167                      _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 3, 1);
   2168     }
   2169     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpFrag,
   2170                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 14, 2);
   2171     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTcpControl,
   2172                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 16, 6);
   2173     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4DstPort,
   2174                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 22, 16);
   2175     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4SrcPort,
   2176                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 38, 16);
   2177     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTtl,
   2178                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 54, 8);
   2179     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstIp6,
   2180                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 62, 128);
   2181     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyExtensionHeaderSubCode,
   2182                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 190, 8);
   2183     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyExtensionHeaderType,
   2184                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 198, 8);
   2185     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpType,
   2186                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 206, 4);
   2187     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDrop,
   2188                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 210, 1);
   2189     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyPreemptablePacket,
   2190                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 213, 1);
   2191     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIp6,
   2192                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 0, 0);
   2193 
   2194 
   2195     /* EFP_KEY4 */
   2196     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4Ports,
   2197                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 0, 1);
   2198     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIntCongestionNotification,
   2199                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 1, 2);
   2200     if (soc_feature(unit, soc_feature_vxlan_lite_riot)) {
   2201         _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDecap,
   2202                      _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 3, 1);
   2203     }
   2204     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2Format,
   2205                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 25, 2);
   2206     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyEtherType,
   2207                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 27, 16);
   2208     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcMac,
   2209                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 43, 48);
   2210     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstMac,
   2211                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 91, 48);
   2212     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyCpuQueue,
   2213                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 139, 6);
   2214     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVlanTranslationHit,
   2215                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 145, 1);
   2216     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyHiGigProxy,
   2217                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 146, 1);
   2218     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyHiGig,
   2219                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 147, 1);
   2220     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanCfi,
   2221                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 148, 1);
   2222     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanPri,
   2223                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 149, 3);
   2224     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanId,
   2225                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 152, 12);
   2226     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInPort,
   2227                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 165, 7);
   2228     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3Routable,
   2229                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 172, 1);
   2230     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMirrorCopy,
   2231                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 173, 1);
   2232     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan,
   2233                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 174, 16);
   2234     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId,
   2235                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 174, 12);
   2236     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi,
   2237                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 186, 1);
   2238     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri,
   2239                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 187, 3);
   2240     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVlanFormat,
   2241                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 190, 2);
   2242     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstHiGig,
   2243                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 192, 1);
   2244     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassPort,
   2245                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 193, 8);
   2246     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOutPort,
   2247                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 201, 7);
   2248     /* L3_PKT_TYPE */
   2249     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyIpType,
   2250                                _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4,
   2251                                _bcmFieldSliceSelEgrMdlKey4, 0, 208, 4);
   2252     /* MDL */
   2253     _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyOamMdl,
   2254                                _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4,
   2255                                _bcmFieldSliceSelEgrMdlKey4, 1, 208, 3);
   2256     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDrop,
   2257                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 212, 1);
   2258     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyPreemptablePacket,
   2259                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 213, 1);
   2260 
   2261     /* KEY1 without v4 specific fields. */
   2262     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4Ports,
   2263                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 0, 1);
   2264     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTcpControl,
   2265                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 16, 6);
   2266     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4DstPort,
   2267                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 22, 16);
   2268     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4SrcPort,
   2269                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 38, 16);
   2270     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTtl,
   2271                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 54, 8);
   2272     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol,
   2273                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 62, 8);
   2274     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTos,
   2275                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 134, 8);
   2276     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyHiGigProxy,
   2277                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 142, 1);
   2278     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyHiGig,
   2279                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 143, 1);
   2280     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanId,
   2281                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 152, 12);
   2282     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInPort,
   2283                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 165, 7);
   2284     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3Routable,
   2285                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 172, 1);
   2286     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMirrorCopy,
   2287                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 173, 1);
   2288     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan,
   2289                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 174, 16);
   2290     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId,
   2291                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 174, 12);
   2292     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi,
   2293                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 186, 1);
   2294     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri,
   2295                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 187, 3);
   2296     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVlanFormat,
   2297                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 190, 2);
   2298     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstHiGig,
   2299                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 192, 1);
   2300     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassPort,
   2301                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 193, 8);
   2302     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOutPort,
   2303                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 201, 7);
   2304     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpType,
   2305                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 208, 4);
   2306     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDrop,
   2307                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 212, 1);
   2308     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyPreemptablePacket,
   2309                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 213, 1);
   2310 
   2311 
   2312     /* EFP_KEY5 */
   2313     /* not support: KEY_MATCH_TYPE */
   2314     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyPreemptablePacket,
   2315                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 213, 1);
   2316     /* not support: PTP_DOMAIN_ID_MISMATCH */
   2317     /* not support: SOURCE_PORT_IDENTITY */
   2318     /* not support: PTP_MESSAGE_TYPE */
   2319     /* not support: EGR_PORT_PTP_DOMAIN_ID */
   2320     /* not support: PTP_DOMAIN_ID */
   2321     /* not support: PACKET_IS_1588 */
   2322     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2DestSRNodeType,
   2323                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5,
   2324                  89, 2);
   2325     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySRTagType,
   2326                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5,
   2327                  50, 3);
   2328     _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifySRLanId,
   2329                      _bcmFieldDevSelDisable, 0,
   2330                      _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5,
   2331                      0, 0,
   2332                      0,
   2333                      49, 1,
   2334                      45, 1,
   2335                      0, 0,
   2336                      0
   2337                      );
   2338     _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifySRNetId,
   2339                      _bcmFieldDevSelDisable, 0,
   2340                      _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5,
   2341                      0, 0,
   2342                      0,
   2343                      46, 3,
   2344                      44, 1,
   2345                      0, 0,
   2346                      0
   2347                      );
   2348     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcPortSRRoleInterlink,
   2349                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5,
   2350                  42, 1);
   2351     _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifySrcPortSRType,
   2352                      _bcmFieldDevSelDisable, 0,
   2353                      _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5,
   2354                      0, 0,
   2355                      0,
   2356                      39, 3,
   2357                      43, 1,
   2358                      0, 0,
   2359                      0
   2360                      );
   2361     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcPortSRLanId,
   2362                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5,
   2363                  38, 1);
   2364     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcPortSRNetId,
   2365                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5,
   2366                  35, 3);
   2367     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcPortSRMode,
   2368                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5,
   2369                  32, 3);
   2370     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstPortSRRoleInterlink,
   2371                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5,
   2372                  30, 1);
   2373     _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstPortSRType,
   2374                      _bcmFieldDevSelDisable, 0,
   2375                      _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5,
   2376                      0, 0,
   2377                      0,
   2378                      27, 3,
   2379                      31, 1,
   2380                      0, 0,
   2381                      0
   2382                      );
   2383     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstPortSRLanId,
   2384                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5,
   2385                  26, 1);
   2386     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstPortSRNetId,
   2387                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5,
   2388                  23, 3);
   2389     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstPortSRMode,
   2390                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5,
   2391                  20, 3);
   2392     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVlanSREnable,
   2393                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5,
   2394                  19, 1);
   2395     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVlanSRLanId,
   2396                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5,
   2397                  18, 1);
   2398     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySRFlowId,
   2399                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5,
   2400                  5, 13);
   2401     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIntPriority,
   2402                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5,
   2403                  1, 4);
   2404     _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySRDuplicate,
   2405                  _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5,
   2406                  0, 1);
   2407 
   2408     return (BCM_E_NONE);
   2409 }
   2410 
   2411 
   2412 
   2413 /*
   2414  * Function:
   2415  *     _field_gh2_qualifiers_init
   2416  * Purpose:
   2417  *     Initialize device qaualifiers select codes & offsets
   2418  * Parameters:
   2419  *     unit       - (IN) BCM device number.
   2420  *     stage_fc   - (IN) Field Processor stage control structure.
   2421  *
   2422  * Returns:
   2423  *     BCM_E_NONE
   2424  * Notes:
   2425  */
   2426 STATIC int
   2427 _field_gh2_qualifiers_init(int unit, _field_stage_t *stage_fc)
   2428 {
   2429     int rv;           /* Operation return status. */
   2430 
   2431     /* Input parameters check. */
   2432     if (NULL == stage_fc) {
   2433         return (BCM_E_PARAM);
   2434     }
   2435 
   2436     /* Allocated stage qualifiers configuration array. */
   2437     _FP_XGS3_ALLOC(stage_fc->f_qual_arr,
   2438                    (_bcmFieldQualifyCount * sizeof(_bcm_field_qual_info_t *)),
   2439                    "Field qualifiers");
   2440     if (NULL == stage_fc->f_qual_arr) {
   2441         return (BCM_E_MEMORY);
   2442     }
   2443 
   2444     switch (stage_fc->stage_id) {
   2445       case _BCM_FIELD_STAGE_INGRESS:
   2446           rv = _field_gh2_ingress_qualifiers_init(unit, stage_fc);
   2447           break;
   2448       case _BCM_FIELD_STAGE_LOOKUP:
   2449           rv = _field_gh2_lookup_qualifiers_init(unit, stage_fc);
   2450           break;
   2451       case _BCM_FIELD_STAGE_EGRESS:
   2452           rv = _field_gh2_egress_qualifiers_init(unit, stage_fc);
   2453           break;
   2454       case _BCM_FIELD_STAGE_EXTERNAL:
   2455       default:
   2456           sal_free(stage_fc->f_qual_arr);
   2457           return (BCM_E_PARAM);
   2458     }
   2459     return (rv);
   2460 }
   2461 
   2462 
   2463 /*
   2464  * Function:
   2465  *     _field_gh2_write_slice_map_ingress
   2466  *
   2467  * Purpose:
   2468  *     Write the FP_SLICE_MAP (INGRESS)
   2469  *
   2470  * Parameters:
   2471  *     unit
   2472  *     stage_fc - pointer to stage control block
   2473  *     new_fp_virtual_map - virtual map to be written
   2474  *
   2475  * Returns:
   2476  *     nothing
   2477  *
   2478  * Notes:
   2479  */
   2480 STATIC int
   2481 _field_gh2_write_slice_map_ingress(int unit, _field_stage_t *stage_fc)
   2482 {
   2483     fp_slice_map_entry_t map_entry;  /* HW entry buffer.         */
   2484     soc_field_t field;               /* HW entry fields.         */
   2485     int vmap_size;                   /* Virtual map index count. */
   2486     uint32 value;                    /* Field entry value.       */
   2487     int idx;                         /* Map fields iterator.     */
   2488     int rv;                          /* Operation return status. */
   2489     uint32 virtual_to_physical_map_gh2[12] = {
   2490             VIRTUAL_SLICE_0_PHYSICAL_SLICE_NUMBER_ENTRY_0f,
   2491             VIRTUAL_SLICE_1_PHYSICAL_SLICE_NUMBER_ENTRY_0f,
   2492             VIRTUAL_SLICE_2_PHYSICAL_SLICE_NUMBER_ENTRY_0f,
   2493             VIRTUAL_SLICE_3_PHYSICAL_SLICE_NUMBER_ENTRY_0f,
   2494             VIRTUAL_SLICE_4_PHYSICAL_SLICE_NUMBER_ENTRY_0f,
   2495             VIRTUAL_SLICE_5_PHYSICAL_SLICE_NUMBER_ENTRY_0f,
   2496             VIRTUAL_SLICE_6_PHYSICAL_SLICE_NUMBER_ENTRY_0f,
   2497             VIRTUAL_SLICE_7_PHYSICAL_SLICE_NUMBER_ENTRY_0f,
   2498             VIRTUAL_SLICE_8_PHYSICAL_SLICE_NUMBER_ENTRY_0f,
   2499             VIRTUAL_SLICE_9_PHYSICAL_SLICE_NUMBER_ENTRY_0f,
   2500             VIRTUAL_SLICE_10_PHYSICAL_SLICE_NUMBER_ENTRY_0f,
   2501             VIRTUAL_SLICE_11_PHYSICAL_SLICE_NUMBER_ENTRY_0f
   2502     };
   2503 
   2504     uint32 virtual_to_group_map_gh2[12] = {
   2505             VIRTUAL_SLICE_0_VIRTUAL_SLICE_GROUP_ENTRY_0f,
   2506             VIRTUAL_SLICE_1_VIRTUAL_SLICE_GROUP_ENTRY_0f,
   2507             VIRTUAL_SLICE_2_VIRTUAL_SLICE_GROUP_ENTRY_0f,
   2508             VIRTUAL_SLICE_3_VIRTUAL_SLICE_GROUP_ENTRY_0f,
   2509             VIRTUAL_SLICE_4_VIRTUAL_SLICE_GROUP_ENTRY_0f,
   2510             VIRTUAL_SLICE_5_VIRTUAL_SLICE_GROUP_ENTRY_0f,
   2511             VIRTUAL_SLICE_6_VIRTUAL_SLICE_GROUP_ENTRY_0f,
   2512             VIRTUAL_SLICE_7_VIRTUAL_SLICE_GROUP_ENTRY_0f,
   2513             VIRTUAL_SLICE_8_VIRTUAL_SLICE_GROUP_ENTRY_0f,
   2514             VIRTUAL_SLICE_9_VIRTUAL_SLICE_GROUP_ENTRY_0f,
   2515             VIRTUAL_SLICE_10_VIRTUAL_SLICE_GROUP_ENTRY_0f,
   2516             VIRTUAL_SLICE_11_VIRTUAL_SLICE_GROUP_ENTRY_0f
   2517     };
   2518 
   2519     /* Calculate virtual map size. */
   2520     rv = _bcm_field_virtual_map_size_get(unit, stage_fc, &vmap_size);
   2521     BCM_IF_ERROR_RETURN(rv);
   2522 
   2523     rv = READ_FP_SLICE_MAPm(unit, MEM_BLOCK_ANY, 0, &map_entry);
   2524     BCM_IF_ERROR_RETURN(rv);
   2525 
   2526     for (idx = 0; idx < vmap_size; idx++) {
   2527         value = (stage_fc->vmap[_FP_DEF_INST][0][idx]).vmap_key;
   2528         field = virtual_to_physical_map_gh2[idx];
   2529         soc_FP_SLICE_MAPm_field32_set(unit, &map_entry, field, value);
   2530 
   2531         value = (stage_fc->vmap[_FP_DEF_INST][0][idx]).virtual_group;
   2532         field = virtual_to_group_map_gh2[idx];
   2533         soc_FP_SLICE_MAPm_field32_set(unit, &map_entry, field, value);
   2534     }
   2535 
   2536     rv = WRITE_FP_SLICE_MAPm(unit, MEM_BLOCK_ALL, 0, &map_entry);
   2537     return (rv);
   2538 }
   2539 
   2540 
   2541 /*
   2542  * Function:
   2543  *     _bcm_field_gh2_write_slice_map
   2544  *
   2545  * Purpose:
   2546  *     Write the FP_SLICE_MAP
   2547  *
   2548  * Parameters:
   2549  *     unit
   2550  *     stage_fc - pointer to stage control block
   2551  *     fg - Reference to Field Group Structure.
   2552  *
   2553  * Returns:
   2554  *     nothing
   2555  *
   2556  * Notes:
   2557  */
   2558 STATIC int
   2559 _bcm_field_gh2_write_slice_map(int unit, _field_stage_t *stage_fc,
   2560                               _field_group_t *fg)
   2561 {
   2562     int rv = BCM_E_PARAM;   /* Operation return status. */
   2563 
   2564     if (stage_fc->stage_id == _BCM_FIELD_STAGE_INGRESS) {
   2565         rv = _field_gh2_write_slice_map_ingress(unit, stage_fc);
   2566     } else if (stage_fc->stage_id == _BCM_FIELD_STAGE_EGRESS) {
   2567         rv =  _bcm_field_trx_write_slice_map_egress(unit, stage_fc);
   2568     } else if (stage_fc->stage_id == _BCM_FIELD_STAGE_LOOKUP) {
   2569         rv =  _bcm_field_trx_write_slice_map_vfp(unit, stage_fc);
   2570     }
   2571 
   2572     return (rv);
   2573 }
   2574 
   2575 
   2576 /*
   2577  * Function:
   2578  *     _bcm_field_gh2_init
   2579  * Purpose:
   2580  *     Perform initializations that are specific to BCM53570. This
   2581  *     includes initializing the FP field select bit offset tables for FPF[1-3]
   2582  *     for every stage.
   2583  * Parameters:
   2584  *     unit       - (IN) BCM device number.
   2585  *     fc         - (IN) Field Processor control structure.
   2586  *
   2587  * Returns:
   2588  *     BCM_E_NONE
   2589  * Notes:
   2590  */
   2591 int
   2592 _bcm_field_gh2_init(int unit, _field_control_t *fc)
   2593 {
   2594     _field_stage_t *stage_fc; /* Stages iteration pointer */
   2595 
   2596     /* Input parameters check. */
   2597     if (NULL == fc) {
   2598         return (BCM_E_PARAM);
   2599     }
   2600 
   2601     stage_fc = fc->stages;
   2602     while (stage_fc) {
   2603         /* Clear hardware table */
   2604         BCM_IF_ERROR_RETURN(_bcm_field_tr_hw_clear(unit, stage_fc));
   2605 
   2606         /* Initialize qualifiers info. */
   2607         BCM_IF_ERROR_RETURN(_field_gh2_qualifiers_init(unit, stage_fc));
   2608 
   2609         if (_BCM_FIELD_STAGE_EXTERNAL == stage_fc->stage_id) {
   2610             _bcm_field_tr_external_init(unit, stage_fc);
   2611             stage_fc = stage_fc->next;
   2612             continue;
   2613         }
   2614 
   2615         /* Goto next stage */
   2616         stage_fc = stage_fc->next;
   2617     }
   2618 
   2619     /* Initialize the TOS_FN, TTL_FN, TCP_FN tables */
   2620     BCM_IF_ERROR_RETURN(_bcm_field_trx_tcp_ttl_tos_init(unit));
   2621 
   2622     if (0 == SOC_WARM_BOOT(unit)) {
   2623         /* Enable filter processor */
   2624         BCM_IF_ERROR_RETURN(_field_port_filter_enable_set(unit, fc, TRUE));
   2625 
   2626         /* Enable meter refresh */
   2627         BCM_IF_ERROR_RETURN(_field_meter_refresh_enable_set(unit, fc, TRUE));
   2628     }
   2629 
   2630     /* Initialize the function pointers */
   2631     _field_gh2_functions_init(&fc->functions);
   2632 
   2633     return (BCM_E_NONE);
   2634 }
   2635 
   2636 
   2637 /*
   2638  * Function:
   2639  *     _field_gh2_functions_init
   2640  *
   2641  * Purpose:
   2642  *     Set up functions pointers
   2643  *
   2644  * Parameters:
   2645  *     stage_fc - (IN/OUT) pointers to stage control block whe the device
   2646  *                         and stage specific functions will be registered.
   2647  *
   2648  * Returns:
   2649  *     nothing
   2650  * Notes:
   2651  */
   2652 STATIC void
   2653 _field_gh2_functions_init(_field_funct_t *functions)
   2654 {
   2655     functions->fp_detach               = _bcm_field_tr_detach;
   2656     functions->fp_group_install        = _bcm_field_fb_group_install;
   2657     functions->fp_selcodes_install     = _bcm_field_hu2_selcodes_install;
   2658     functions->fp_slice_clear          = _bcm_field_hu2_slice_clear;
   2659     functions->fp_entry_remove         = _bcm_field_fb_entry_remove;
   2660     functions->fp_entry_move           = _bcm_field_fb_entry_move;
   2661     functions->fp_selcode_get          = _bcm_field_tr_selcode_get;
   2662     functions->fp_selcode_to_qset      = _bcm_field_selcode_to_qset;
   2663     functions->fp_qual_list_get        = _bcm_field_qual_lists_get;
   2664     functions->fp_tcam_policy_clear    = NULL;
   2665     functions->fp_tcam_policy_install  = _bcm_field_tr_entry_install;
   2666     functions->fp_tcam_policy_reinstall  = _bcm_field_tr_entry_reinstall;
   2667     functions->fp_policer_install      = _bcm_field_trx_policer_install;
   2668     /* functions->fp_slice_reinit      = NULL; */
   2669     functions->fp_write_slice_map      = _bcm_field_gh2_write_slice_map;
   2670     functions->fp_qualify_ip_type      = _bcm_field_trx_qualify_ip_type;
   2671     functions->fp_qualify_ip_type_get  = _bcm_field_trx_qualify_ip_type_get;
   2672     functions->fp_action_support_check = _bcm_field_trx_action_support_check;
   2673     functions->fp_action_conflict_check = _bcm_field_trx_action_conflict_check;
   2674     functions->fp_counter_get          = _bcm_field_tr_counter_get;
   2675     functions->fp_counter_set          = _bcm_field_tr_counter_set;
   2676     functions->fp_stat_index_get       = _bcm_field_trx_stat_index_get;
   2677     functions->fp_action_params_check  = _bcm_field_trx_action_params_check;
   2678     functions->fp_egress_key_match_type_set =
   2679         _bcm_field_trx_egress_key_match_type_set;
   2680     functions->fp_external_entry_install =
   2681                         _bcm_field_tr_external_entry_install;
   2682     functions->fp_external_entry_reinstall =
   2683                         _bcm_field_tr_external_entry_reinstall;
   2684     functions->fp_external_entry_remove =
   2685                         _bcm_field_tr_external_entry_remove;
   2686     functions->fp_external_entry_prio_set =
   2687                         _bcm_field_tr_external_entry_prio_set;
   2688     functions->fp_data_qualifier_ethertype_add =
   2689                        _bcm_field_fb_data_qualifier_ethertype_add;
   2690     functions->fp_data_qualifier_ethertype_delete =
   2691                        _bcm_field_fb_data_qualifier_ethertype_delete;
   2692     functions->fp_data_qualifier_ip_protocol_add =
   2693                        _bcm_field_fb_data_qualifier_ip_protocol_add;
   2694     functions->fp_data_qualifier_ip_protocol_delete =
   2695                        _bcm_field_fb_data_qualifier_ip_protocol_delete;
   2696     functions->fp_data_qualifier_packet_format_add =
   2697                        _bcm_field_fb_data_qualifier_packet_format_add;
   2698     functions->fp_data_qualifier_packet_format_delete =
   2699                        _bcm_field_fb_data_qualifier_packet_format_delete;
   2700     functions->fp_stat_value_get = NULL;
   2701     functions->fp_stat_value_set = NULL;
   2702     functions->fp_control_set = _bcm_field_control_set;
   2703     functions->fp_control_get = _bcm_field_control_get;
   2704     functions->fp_stat_hw_mode_get = _bcm_field_stat_hw_mode_get;
   2705     functions->fp_stat_hw_alloc = _bcm_field_stat_hw_alloc;
   2706     functions->fp_stat_hw_free = _bcm_field_stat_hw_free;
   2707     functions->fp_group_add = NULL;
   2708     functions->fp_qualify_trunk = _bcm_field_qualify_trunk;
   2709     functions->fp_qualify_trunk_get = _bcm_field_qualify_trunk_get;
   2710     functions->fp_qualify_inports = _bcm_field_qualify_InPorts;
   2711     functions->fp_entry_stat_extended_attach = NULL;
   2712     functions->fp_entry_stat_extended_get = NULL;
   2713     functions->fp_entry_stat_detach = _bcm_field_entry_stat_detach;
   2714     functions->fp_class_size_get = NULL;
   2715     functions->fp_qualify_packet_res = _field_qualify_PacketRes;
   2716     functions->fp_qualify_packet_res_get = _field_qualify_PacketRes_get;
   2717 }
   2718 #else /* BCM_GREYHOUND2_SUPPORT && BCM_FIELD_SUPPORT */
   2719 int _greyhound2_field_not_empty;
   2720 #endif  /* BCM_GREYHOUND2_SUPPORT && BCM_FIELD_SUPPORT */