field.c (336291B)
1 /* 2 * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file. 3 * 4 * Copyright 2007-2019 Broadcom Inc. All rights reserved. 5 * 6 * File: field.c 7 * Purpose: BCM56560 Field Processor installation functions. 8 */ 9 10 #include <shared/bsl.h> 11 12 #include <soc/defs.h> 13 #if defined(BCM_APACHE_SUPPORT) && defined(BCM_FIELD_SUPPORT) 14 15 #include <soc/mem.h> 16 #include <soc/drv.h> 17 #include <soc/trident2.h> 18 #include <soc/triumph3.h> 19 20 #include <bcm/error.h> 21 #include <bcm/l3.h> 22 #include <bcm/field.h> 23 #include <bcm/tunnel.h> 24 25 #include <bcm_int/common/multicast.h> 26 27 #include <bcm_int/esw_dispatch.h> 28 #include <bcm_int/esw/field.h> 29 #include <bcm_int/esw/l3.h> 30 #include <bcm_int/esw/policer.h> 31 #include <bcm_int/esw/trx.h> 32 #include <bcm_int/esw/triumph.h> 33 #include <bcm_int/esw/trident.h> 34 #include <bcm_int/esw/trident2.h> 35 #include <bcm_int/esw/nat.h> 36 37 #define ALIGN32(x) (((x) + 31) & ~31) 38 #define BCM_MAX_SAT_MAC_SA_ENTRIES 15 39 40 41 /* 42 * Condition Qualifier add for Monterey A0/B0 F3Bit0 WAR 43 */ 44 #define _FP_QUAL_COND_EXT_ADD(_unit_, _stage_fc_, _qual_id_, \ 45 _dev_sel_, _dev_sel_val_, \ 46 _pri_sel_, _pri_sel_val_, \ 47 _sec_sel_, _sec_sel_val_, \ 48 _intraslice_, \ 49 _offset_0_, _width_0_, \ 50 _offset_1_, _width_1_, \ 51 _offset_2_, _width_2_, \ 52 _secondary_, _primary_) \ 53 if (soc_feature(unit, soc_feature_monterey_b0_fp_sw_war) && \ 54 !(_secondary_) && !(_intraslice_)) { \ 55 __FP_QUAL_EXT_ADD((_unit_), (_stage_fc_), (_qual_id_), \ 56 (_dev_sel_), (_dev_sel_val_), \ 57 (_pri_sel_), (_pri_sel_val_), \ 58 (_sec_sel_), (_sec_sel_val_), \ 59 _bcmFieldDevSelDisable, 0, \ 60 (_intraslice_), \ 61 (fp_global_mask_tcam_ofs + f3_rsvd_bit_offset), 1, \ 62 (_offset_0_) + 1, (_width_0_) - 1, \ 63 _offset_1_, _width_1_, \ 64 (_secondary_), \ 65 (1)); \ 66 } \ 67 __FP_QUAL_EXT_ADD((_unit_), (_stage_fc_), (_qual_id_), \ 68 (_dev_sel_), (_dev_sel_val_), \ 69 (_pri_sel_), (_pri_sel_val_), \ 70 (_sec_sel_), (_sec_sel_val_), \ 71 _bcmFieldDevSelDisable, 0, \ 72 (_intraslice_), \ 73 _offset_0_, _width_0_, \ 74 _offset_1_, _width_1_, \ 75 _offset_2_, _width_2_, \ 76 ((soc_feature(unit, soc_feature_monterey_a0_fp_sw_war) \ 77 || (_secondary_)) ? (1) : (_secondary_)), \ 78 (_primary_) \ 79 ) 80 81 /* 82 * Function: 83 * _field_apache_functions_init 84 * 85 * Purpose: 86 * Set up functions pointers 87 * 88 * Parameters: 89 * stage_fc - (IN/OUT) pointers to stage control block whe the device 90 * and stage specific functions will be registered. 91 * 92 * Returns: 93 * nothing 94 * Notes: 95 */ 96 void _field_apache_functions_init(_field_funct_t *functions) 97 { 98 functions->fp_detach = _bcm_field_tr_detach; 99 functions->fp_group_install = _field_td2_group_install; 100 functions->fp_selcodes_install = _field_td2_selcodes_install; 101 functions->fp_slice_clear = _field_td2_slice_clear; 102 functions->fp_entry_remove = _bcm_field_fb_entry_remove; 103 functions->fp_entry_move = _field_td2_entry_move; 104 functions->fp_selcode_get = _field_td2_selcode_get; 105 functions->fp_selcode_to_qset = _bcm_field_selcode_to_qset; 106 functions->fp_qual_list_get = _bcm_field_qual_lists_get; 107 functions->fp_tcam_policy_clear = NULL; 108 functions->fp_tcam_policy_install = _bcm_field_tr_entry_install; 109 functions->fp_tcam_policy_reinstall = _bcm_field_tr_entry_reinstall; 110 functions->fp_policer_install = _bcm_field_trx_policer_install; 111 functions->fp_write_slice_map = _bcm_field_td2_write_slice_map; 112 functions->fp_qualify_ip_type = _bcm_field_td2_qualify_ip_type; 113 functions->fp_qualify_ip_type_get = _bcm_field_td2_qualify_ip_type_get; 114 functions->fp_action_support_check = _field_td2_action_support_check; 115 functions->fp_action_conflict_check = _bcm_field_td2_action_conflict_check; 116 functions->fp_counter_get = _bcm_field_td_counter_get; 117 functions->fp_counter_set = _bcm_field_td_counter_set; 118 functions->fp_stat_index_get = _bcm_field_trx_stat_index_get; 119 functions->fp_action_params_check = _field_td2_action_params_check; 120 functions->fp_action_depends_check = _bcm_field_trx_action_depends_check; 121 functions->fp_egress_key_match_type_set 122 = _bcm_field_trx_egress_key_match_type_set; 123 functions->fp_external_entry_install = NULL; 124 functions->fp_external_entry_reinstall = NULL; 125 functions->fp_external_entry_remove = NULL; 126 functions->fp_external_entry_prio_set = NULL; 127 functions->fp_data_qualifier_ethertype_add 128 = _bcm_field_trx2_data_qualifier_ethertype_add; 129 functions->fp_data_qualifier_ethertype_delete 130 = _bcm_field_trx2_data_qualifier_ethertype_delete; 131 functions->fp_data_qualifier_ip_protocol_add 132 = _bcm_field_trx2_data_qualifier_ip_protocol_add; 133 functions->fp_data_qualifier_ip_protocol_delete 134 = _bcm_field_trx2_data_qualifier_ip_protocol_delete; 135 functions->fp_data_qualifier_packet_format_add 136 = _bcm_field_trx2_data_qualifier_packet_format_add; 137 functions->fp_data_qualifier_packet_format_delete 138 = _bcm_field_trx2_data_qualifier_packet_format_delete; 139 functions->fp_stat_value_get = NULL; 140 functions->fp_stat_value_set = NULL; 141 functions->fp_control_set = _bcm_field_control_set; 142 functions->fp_control_get = _bcm_field_control_get; 143 functions->fp_stat_hw_mode_get = _bcm_field_stat_hw_mode_get; 144 functions->fp_stat_hw_alloc = _bcm_field_td2plus_stat_hw_alloc; 145 functions->fp_stat_hw_free = _bcm_field_td2plus_stat_hw_free; 146 functions->fp_group_add = NULL; 147 functions->fp_qualify_trunk = _bcm_field_qualify_trunk; 148 functions->fp_qualify_trunk_get = _bcm_field_qualify_trunk_get; 149 functions->fp_qualify_inports = _bcm_field_qualify_InPorts; 150 functions->fp_entry_stat_extended_attach = 151 _bcm_field_td2plus_entry_stat_extended_attach; 152 functions->fp_entry_stat_extended_get = 153 _bcm_field_td2plus_entry_stat_extended_get; 154 functions->fp_entry_stat_detach = _bcm_field_td2plus_entry_stat_detach; 155 functions->fp_qualify_packet_res = _bcm_field_td2_qualify_PacketRes; 156 functions->fp_qualify_packet_res_get = _bcm_field_td2_qualify_PacketRes_get; 157 return; 158 } 159 160 /* 161 * Function: 162 * _field_apache_ingress_qualifiers_init 163 * Purpose: 164 * Initialize device stage ingress qualifiers 165 * select codes & offsets 166 * Parameters: 167 * unit - (IN) BCM device number. 168 * stage_fc - (IN) Field Processor stage control structure. 169 * 170 * Returns: 171 * BCM_E_NONE 172 */ 173 STATIC int 174 _field_apache_ingress_qualifiers_init(int unit, _field_stage_t *stage_fc) 175 { 176 const unsigned 177 f2_offset = 10 - 2, 178 fixed_offset = 138 - 2, 179 fixed_pairing_overlay_offset = fixed_offset, 180 fp_global_mask_tcam_ofs = ALIGN32(soc_mem_field_length(unit, FP_TCAMm, KEYf)), 181 f3_offset = 2 - 2, 182 f1_offset = 51 - 2, 183 ipbm_pairing_f0_offset = 101 - 2, 184 f3_rsvd_bit_offset = 168 - 2; 185 186 _FP_QUAL_DECL; 187 188 /* Handled outside normal qualifier set/get scheme */ 189 190 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyStage, 191 _bcmFieldSliceSelDisable, 0, 192 0, 0 193 ); 194 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyStageIngress, 195 _bcmFieldSliceSelDisable, 0, 196 0, 0 197 ); 198 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIp4, 199 _bcmFieldSliceSelDisable, 0, 200 0, 0 201 ); 202 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIp6, 203 _bcmFieldSliceSelDisable, 0, 204 0, 0 205 ); 206 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInPort, 207 _bcmFieldSliceSelDisable, 0, 208 0, 0 209 ); 210 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInPorts, 211 _bcmFieldSliceSelDisable, 0, 212 0, 0 213 ); 214 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyNormalizeIpAddrs, 215 _bcmFieldSliceSelDisable, 0, 216 0, 0 217 ); 218 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyNormalizeMacAddrs, 219 _bcmFieldSliceSelDisable, 0, 220 0, 0 221 ); 222 223 /* FPF1 single wide */ 224 /* Present in Global Mask Field */ 225 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL2, 226 _bcmFieldSliceSelFpf1, 0, 227 _bcmFieldSliceDstClassSelect, 0, 228 fp_global_mask_tcam_ofs + f1_offset, 10); 229 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL3, 230 _bcmFieldSliceSelFpf1, 0, 231 _bcmFieldSliceDstClassSelect, 1, 232 fp_global_mask_tcam_ofs + f1_offset, 10); 233 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField, 234 _bcmFieldSliceSelFpf1, 0, 235 _bcmFieldSliceDstClassSelect, 2, 236 fp_global_mask_tcam_ofs + f1_offset, 10); 237 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField, 238 _bcmFieldSliceSelFpf1, 0, 239 _bcmFieldSliceDstClassSelect, 3, 240 fp_global_mask_tcam_ofs + f1_offset, 10); 241 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL2, 242 _bcmFieldSliceSelFpf1, 0, 243 _bcmFieldSliceSrcClassSelect, 0, 244 fp_global_mask_tcam_ofs + f1_offset + 10, 10); 245 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL3, 246 _bcmFieldSliceSelFpf1, 0, 247 _bcmFieldSliceSrcClassSelect, 1, 248 fp_global_mask_tcam_ofs + f1_offset + 10, 10); 249 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField, 250 _bcmFieldSliceSelFpf1, 0, 251 _bcmFieldSliceSrcClassSelect, 2, 252 fp_global_mask_tcam_ofs + f1_offset + 10, 10); 253 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField, 254 _bcmFieldSliceSelFpf1, 0, 255 _bcmFieldSliceSrcClassSelect, 3, 256 fp_global_mask_tcam_ofs + f1_offset + 10, 10); 257 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVrf, 258 _bcmFieldSliceSelFpf1, 0, 259 _bcmFieldSliceFwdFieldSelect, 260 _bcmFieldFwdFieldVrf, 261 fp_global_mask_tcam_ofs + f1_offset + 20, 13); 262 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVpn, 263 _bcmFieldSliceSelFpf1, 0, 264 _bcmFieldSliceFwdFieldSelect, 265 _bcmFieldFwdFieldVpn, 266 fp_global_mask_tcam_ofs + f1_offset + 20, 13); 267 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyForwardingVlanId, 268 _bcmFieldSliceSelFpf1, 0, 269 _bcmFieldSliceFwdFieldSelect, 270 _bcmFieldFwdFieldVlan, 271 fp_global_mask_tcam_ofs + f1_offset + 20, 13); 272 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMplsGport, 273 _bcmFieldSliceSelFpf1, 0, 274 _bcmFieldSliceIngressEntitySelect, 275 _bcmFieldFwdEntityMplsGport, 276 fp_global_mask_tcam_ofs + f1_offset + 33, 16); 277 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMplsGports, 278 _bcmFieldSliceSelFpf1, 0, 279 _bcmFieldSliceIngressEntitySelect, 280 _bcmFieldFwdEntityMplsGport, 281 fp_global_mask_tcam_ofs + f1_offset + 33, 16); 282 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcNivGport, 283 _bcmFieldSliceSelFpf1, 0, 284 _bcmFieldSliceIngressEntitySelect, 285 _bcmFieldFwdEntityNivGport, 286 fp_global_mask_tcam_ofs + f1_offset + 33, 16); 287 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcNivGports, 288 _bcmFieldSliceSelFpf1, 0, 289 _bcmFieldSliceIngressEntitySelect, 290 _bcmFieldFwdEntityNivGport, 291 fp_global_mask_tcam_ofs + f1_offset + 33, 16); 292 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMimGport, 293 _bcmFieldSliceSelFpf1, 0, 294 _bcmFieldSliceIngressEntitySelect, 295 _bcmFieldFwdEntityMimGport, 296 fp_global_mask_tcam_ofs + f1_offset + 33, 16); 297 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMimGports, 298 _bcmFieldSliceSelFpf1, 0, 299 _bcmFieldSliceIngressEntitySelect, 300 _bcmFieldFwdEntityMimGport, 301 fp_global_mask_tcam_ofs + f1_offset + 33, 16); 302 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVxlanGport, 303 _bcmFieldSliceSelFpf1, 0, 304 _bcmFieldSliceIngressEntitySelect, 305 _bcmFieldFwdEntityVxlanGport, 306 fp_global_mask_tcam_ofs + f1_offset + 33, 16); 307 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVxlanGports, 308 _bcmFieldSliceSelFpf1, 0, 309 _bcmFieldSliceIngressEntitySelect, 310 _bcmFieldFwdEntityVxlanGport, 311 fp_global_mask_tcam_ofs + f1_offset + 33, 16); 312 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVlanGport, 313 _bcmFieldSliceSelFpf1, 0, 314 _bcmFieldSliceIngressEntitySelect, 315 _bcmFieldFwdEntityVlanGport, 316 fp_global_mask_tcam_ofs + f1_offset + 33, 16); 317 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVlanGports, 318 _bcmFieldSliceSelFpf1, 0, 319 _bcmFieldSliceIngressEntitySelect, 320 _bcmFieldFwdEntityVlanGport, 321 fp_global_mask_tcam_ofs + f1_offset + 33, 16); 322 323 324 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstPort, 325 _bcmFieldSliceSelFpf1, 1, 326 _bcmFieldSliceDstFwdEntitySelect, 327 _bcmFieldFwdEntityGlp, 328 fp_global_mask_tcam_ofs + f1_offset, 21); 329 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstTrunk, 330 _bcmFieldSliceSelFpf1, 1, 331 _bcmFieldSliceDstFwdEntitySelect, 332 _bcmFieldFwdEntityGlp, 333 fp_global_mask_tcam_ofs + f1_offset, 21); 334 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMplsGport, 335 _bcmFieldSliceSelFpf1, 1, 336 _bcmFieldSliceDstFwdEntitySelect, 337 _bcmFieldFwdEntityMplsGport, 338 fp_global_mask_tcam_ofs + f1_offset, 21); 339 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMplsGports, 340 _bcmFieldSliceSelFpf1, 1, 341 _bcmFieldSliceDstFwdEntitySelect, 342 _bcmFieldFwdEntityMplsGport, 343 fp_global_mask_tcam_ofs + f1_offset, 21); 344 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstNivGport, 345 _bcmFieldSliceSelFpf1, 1, 346 _bcmFieldSliceDstFwdEntitySelect, 347 _bcmFieldFwdEntityNivGport, 348 fp_global_mask_tcam_ofs + f1_offset, 21); 349 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstNivGports, 350 _bcmFieldSliceSelFpf1, 1, 351 _bcmFieldSliceDstFwdEntitySelect, 352 _bcmFieldFwdEntityNivGport, 353 fp_global_mask_tcam_ofs + f1_offset, 21); 354 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMimGport, 355 _bcmFieldSliceSelFpf1, 1, 356 _bcmFieldSliceDstFwdEntitySelect, 357 _bcmFieldFwdEntityMimGport, 358 fp_global_mask_tcam_ofs + f1_offset, 21); 359 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMimGports, 360 _bcmFieldSliceSelFpf1, 1, 361 _bcmFieldSliceDstFwdEntitySelect, 362 _bcmFieldFwdEntityMimGport, 363 fp_global_mask_tcam_ofs + f1_offset, 21); 364 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstVxlanGport, 365 _bcmFieldSliceSelFpf1, 1, 366 _bcmFieldSliceDstFwdEntitySelect, 367 _bcmFieldFwdEntityVxlanGport, 368 fp_global_mask_tcam_ofs + f1_offset, 21); 369 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstVxlanGports, 370 _bcmFieldSliceSelFpf1, 1, 371 _bcmFieldSliceDstFwdEntitySelect, 372 _bcmFieldFwdEntityVxlanGport, 373 fp_global_mask_tcam_ofs + f1_offset, 21); 374 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstVlanGport, 375 _bcmFieldSliceSelFpf1, 1, 376 _bcmFieldSliceDstFwdEntitySelect, 377 _bcmFieldFwdEntityVlanGport, 378 fp_global_mask_tcam_ofs + f1_offset, 21); 379 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstVlanGports, 380 _bcmFieldSliceSelFpf1, 1, 381 _bcmFieldSliceDstFwdEntitySelect, 382 _bcmFieldFwdEntityVlanGport, 383 fp_global_mask_tcam_ofs + f1_offset, 21); 384 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstL3Egress, 385 _bcmFieldSliceSelFpf1, 1, 386 _bcmFieldSliceDstFwdEntitySelect, 387 _bcmFieldFwdEntityL3Egress, 388 fp_global_mask_tcam_ofs + f1_offset, 21); 389 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstL3EgressNextHops, 390 _bcmFieldSliceSelFpf1, 1, 391 _bcmFieldSliceDstFwdEntitySelect, 392 _bcmFieldFwdEntityL3Egress, 393 fp_global_mask_tcam_ofs + f1_offset, 21); 394 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMulticastGroup, 395 _bcmFieldSliceSelFpf1, 1, 396 _bcmFieldSliceDstFwdEntitySelect, 397 _bcmFieldFwdEntityMulticastGroup, 398 fp_global_mask_tcam_ofs + f1_offset, 21); 399 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMulticastGroups, 400 _bcmFieldSliceSelFpf1, 1, 401 _bcmFieldSliceDstFwdEntitySelect, 402 _bcmFieldFwdEntityMulticastGroup, 403 fp_global_mask_tcam_ofs + f1_offset, 21); 404 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMultipath, 405 _bcmFieldSliceSelFpf1, 1, 406 _bcmFieldSliceDstFwdEntitySelect, 407 _bcmFieldFwdEntityMultipath, 408 fp_global_mask_tcam_ofs + f1_offset, 21); 409 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstGport, 410 _bcmFieldSliceSelFpf1, 1, 411 _bcmFieldSliceDstFwdEntitySelect, 412 _bcmFieldFwdEntityCommonGport, 413 fp_global_mask_tcam_ofs + f1_offset, 21); 414 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstGports, 415 _bcmFieldSliceSelFpf1, 1, 416 _bcmFieldSliceDstFwdEntitySelect, 417 _bcmFieldFwdEntityCommonGport, 418 fp_global_mask_tcam_ofs + f1_offset, 21); 419 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcPort, 420 _bcmFieldSliceSelFpf1, 1, 421 _bcmFieldSliceIngressEntitySelect, 422 _bcmFieldFwdEntityGlp, 423 fp_global_mask_tcam_ofs + f1_offset + 21, 16); 424 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcTrunk, 425 _bcmFieldSliceSelFpf1, 1, 426 _bcmFieldSliceIngressEntitySelect, 427 _bcmFieldFwdEntityGlp, 428 fp_global_mask_tcam_ofs + f1_offset + 21, 16); 429 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMplsGport, 430 _bcmFieldSliceSelFpf1, 1, 431 _bcmFieldSliceIngressEntitySelect, 432 _bcmFieldFwdEntityMplsGport, 433 fp_global_mask_tcam_ofs + f1_offset + 21, 16); 434 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMplsGports, 435 _bcmFieldSliceSelFpf1, 1, 436 _bcmFieldSliceIngressEntitySelect, 437 _bcmFieldFwdEntityMplsGport, 438 fp_global_mask_tcam_ofs + f1_offset + 21, 16); 439 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcNivGport, 440 _bcmFieldSliceSelFpf1, 1, 441 _bcmFieldSliceIngressEntitySelect, 442 _bcmFieldFwdEntityNivGport, 443 fp_global_mask_tcam_ofs + f1_offset + 21, 16); 444 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcNivGports, 445 _bcmFieldSliceSelFpf1, 1, 446 _bcmFieldSliceIngressEntitySelect, 447 _bcmFieldFwdEntityNivGport, 448 fp_global_mask_tcam_ofs + f1_offset + 21, 16); 449 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMimGport, 450 _bcmFieldSliceSelFpf1, 1, 451 _bcmFieldSliceIngressEntitySelect, 452 _bcmFieldFwdEntityMimGport, 453 fp_global_mask_tcam_ofs + f1_offset + 21, 16); 454 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMimGports, 455 _bcmFieldSliceSelFpf1, 1, 456 _bcmFieldSliceIngressEntitySelect, 457 _bcmFieldFwdEntityMimGport, 458 fp_global_mask_tcam_ofs + f1_offset + 21, 16); 459 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVxlanGport, 460 _bcmFieldSliceSelFpf1, 1, 461 _bcmFieldSliceIngressEntitySelect, 462 _bcmFieldFwdEntityVxlanGport, 463 fp_global_mask_tcam_ofs + f1_offset + 21, 16); 464 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVxlanGports, 465 _bcmFieldSliceSelFpf1, 1, 466 _bcmFieldSliceIngressEntitySelect, 467 _bcmFieldFwdEntityVxlanGport, 468 fp_global_mask_tcam_ofs + f1_offset + 21, 16); 469 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVlanGport, 470 _bcmFieldSliceSelFpf1, 1, 471 _bcmFieldSliceIngressEntitySelect, 472 _bcmFieldFwdEntityVlanGport, 473 fp_global_mask_tcam_ofs + f1_offset + 21, 16); 474 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVlanGports, 475 _bcmFieldSliceSelFpf1, 1, 476 _bcmFieldSliceIngressEntitySelect, 477 _bcmFieldFwdEntityVlanGport, 478 fp_global_mask_tcam_ofs + f1_offset + 21, 16); 479 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcModPortGport, 480 _bcmFieldSliceSelFpf1, 1, 481 _bcmFieldSliceIngressEntitySelect, 482 _bcmFieldFwdEntityModPortGport, 483 fp_global_mask_tcam_ofs + f1_offset + 21, 16); 484 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcModPortGports, 485 _bcmFieldSliceSelFpf1, 1, 486 _bcmFieldSliceIngressEntitySelect, 487 _bcmFieldFwdEntityModPortGport, 488 fp_global_mask_tcam_ofs + f1_offset + 21, 16); 489 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcTrunkMemberGport, 490 _bcmFieldSliceSelFpf1, 1, 491 _bcmFieldSliceIngressEntitySelect, 492 _bcmFieldFwdEntityModPortGport, 493 fp_global_mask_tcam_ofs + f1_offset + 21, 16); 494 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcModuleGport, 495 _bcmFieldSliceSelFpf1, 1, 496 _bcmFieldSliceIngressEntitySelect, 497 _bcmFieldFwdEntityModPortGport, 498 fp_global_mask_tcam_ofs + f1_offset + 28, 8); 499 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcGport, 500 _bcmFieldSliceSelFpf1, 1, 501 _bcmFieldSliceIngressEntitySelect, 502 _bcmFieldFwdEntityCommonGport, 503 fp_global_mask_tcam_ofs + f1_offset + 21, 16); 504 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcGports, 505 _bcmFieldSliceSelFpf1, 1, 506 _bcmFieldSliceIngressEntitySelect, 507 _bcmFieldFwdEntityCommonGport, 508 fp_global_mask_tcam_ofs + f1_offset + 21, 16); 509 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTrunkMemberSourceModuleId, 510 _bcmFieldSliceSelFpf1, 1, 511 _bcmFieldSliceIngressEntitySelect, 512 _bcmFieldFwdEntityModPortGport, 513 fp_global_mask_tcam_ofs + f1_offset + 28, 8); 514 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMHOpcode, 515 _bcmFieldSliceSelFpf1, 1, 516 fp_global_mask_tcam_ofs + f1_offset + 37, 3); 517 518 519 520 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstPort, 521 _bcmFieldSliceSelFpf1, 2, 522 _bcmFieldSliceDstFwdEntitySelect, 523 _bcmFieldFwdEntityGlp, 524 fp_global_mask_tcam_ofs + f1_offset, 21); 525 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstTrunk, 526 _bcmFieldSliceSelFpf1, 2, 527 _bcmFieldSliceDstFwdEntitySelect, 528 _bcmFieldFwdEntityGlp, 529 fp_global_mask_tcam_ofs + f1_offset, 21); 530 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMplsGport, 531 _bcmFieldSliceSelFpf1, 2, 532 _bcmFieldSliceDstFwdEntitySelect, 533 _bcmFieldFwdEntityMplsGport, 534 fp_global_mask_tcam_ofs + f1_offset, 21); 535 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMplsGports, 536 _bcmFieldSliceSelFpf1, 2, 537 _bcmFieldSliceDstFwdEntitySelect, 538 _bcmFieldFwdEntityMplsGport, 539 fp_global_mask_tcam_ofs + f1_offset, 21); 540 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstNivGport, 541 _bcmFieldSliceSelFpf1, 2, 542 _bcmFieldSliceDstFwdEntitySelect, 543 _bcmFieldFwdEntityNivGport, 544 fp_global_mask_tcam_ofs + f1_offset, 21); 545 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstNivGports, 546 _bcmFieldSliceSelFpf1, 2, 547 _bcmFieldSliceDstFwdEntitySelect, 548 _bcmFieldFwdEntityNivGport, 549 fp_global_mask_tcam_ofs + f1_offset, 21); 550 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMimGport, 551 _bcmFieldSliceSelFpf1, 2, 552 _bcmFieldSliceDstFwdEntitySelect, 553 _bcmFieldFwdEntityMimGport, 554 fp_global_mask_tcam_ofs + f1_offset, 21); 555 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMimGports, 556 _bcmFieldSliceSelFpf1, 2, 557 _bcmFieldSliceDstFwdEntitySelect, 558 _bcmFieldFwdEntityMimGport, 559 fp_global_mask_tcam_ofs + f1_offset, 21); 560 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstVxlanGport, 561 _bcmFieldSliceSelFpf1, 2, 562 _bcmFieldSliceDstFwdEntitySelect, 563 _bcmFieldFwdEntityVxlanGport, 564 fp_global_mask_tcam_ofs + f1_offset, 21); 565 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstVxlanGports, 566 _bcmFieldSliceSelFpf1, 2, 567 _bcmFieldSliceDstFwdEntitySelect, 568 _bcmFieldFwdEntityVxlanGport, 569 fp_global_mask_tcam_ofs + f1_offset, 21); 570 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstVlanGport, 571 _bcmFieldSliceSelFpf1, 2, 572 _bcmFieldSliceDstFwdEntitySelect, 573 _bcmFieldFwdEntityVlanGport, 574 fp_global_mask_tcam_ofs + f1_offset, 21); 575 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstVlanGports, 576 _bcmFieldSliceSelFpf1, 2, 577 _bcmFieldSliceDstFwdEntitySelect, 578 _bcmFieldFwdEntityVlanGport, 579 fp_global_mask_tcam_ofs + f1_offset, 21); 580 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstGport, 581 _bcmFieldSliceSelFpf1, 2, 582 _bcmFieldSliceDstFwdEntitySelect, 583 _bcmFieldFwdEntityCommonGport, 584 fp_global_mask_tcam_ofs + f1_offset, 21); 585 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstGports, 586 _bcmFieldSliceSelFpf1, 2, 587 _bcmFieldSliceDstFwdEntitySelect, 588 _bcmFieldFwdEntityCommonGport, 589 fp_global_mask_tcam_ofs + f1_offset, 21); 590 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstL3Egress, 591 _bcmFieldSliceSelFpf1, 2, 592 _bcmFieldSliceDstFwdEntitySelect, 593 _bcmFieldFwdEntityL3Egress, 594 fp_global_mask_tcam_ofs + f1_offset, 21); 595 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 596 bcmFieldQualifyDstL3EgressNextHops, 597 _bcmFieldSliceSelFpf1, 2, 598 _bcmFieldSliceDstFwdEntitySelect, 599 _bcmFieldFwdEntityL3Egress, 600 fp_global_mask_tcam_ofs + f1_offset, 21); 601 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 602 bcmFieldQualifyDstMulticastGroup, 603 _bcmFieldSliceSelFpf1, 2, 604 _bcmFieldSliceDstFwdEntitySelect, 605 _bcmFieldFwdEntityMulticastGroup, 606 fp_global_mask_tcam_ofs + f1_offset, 21); 607 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 608 bcmFieldQualifyDstMulticastGroups, 609 _bcmFieldSliceSelFpf1, 2, 610 _bcmFieldSliceDstFwdEntitySelect, 611 _bcmFieldFwdEntityMulticastGroup, 612 fp_global_mask_tcam_ofs + f1_offset, 21); 613 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMultipath, 614 _bcmFieldSliceSelFpf1, 2, 615 _bcmFieldSliceDstFwdEntitySelect, 616 _bcmFieldFwdEntityMultipath, 617 fp_global_mask_tcam_ofs + f1_offset, 21); 618 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMHOpcode, 619 _bcmFieldSliceSelFpf1, 2, 620 fp_global_mask_tcam_ofs + f1_offset + 21, 3); 621 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL2, 622 _bcmFieldSliceSelFpf1, 2, 623 _bcmFieldSliceDstClassSelect, 0, 624 fp_global_mask_tcam_ofs + f1_offset + 24, 10); 625 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL3, 626 _bcmFieldSliceSelFpf1, 2, 627 _bcmFieldSliceDstClassSelect, 1, 628 fp_global_mask_tcam_ofs + f1_offset + 24, 10); 629 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField, 630 _bcmFieldSliceSelFpf1, 2, 631 _bcmFieldSliceDstClassSelect, 2, 632 fp_global_mask_tcam_ofs + f1_offset + 24, 10); 633 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField, 634 _bcmFieldSliceSelFpf1, 2, 635 _bcmFieldSliceDstClassSelect, 3, 636 fp_global_mask_tcam_ofs + f1_offset + 24, 10); 637 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL2, 638 _bcmFieldSliceSelFpf1, 2, 639 _bcmFieldSliceSrcClassSelect, 0, 640 fp_global_mask_tcam_ofs + f1_offset + 34, 10); 641 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL3, 642 _bcmFieldSliceSelFpf1, 2, 643 _bcmFieldSliceSrcClassSelect, 1, 644 fp_global_mask_tcam_ofs + f1_offset + 34, 10); 645 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField, 646 _bcmFieldSliceSelFpf1, 2, 647 _bcmFieldSliceSrcClassSelect, 2, 648 fp_global_mask_tcam_ofs + f1_offset + 34, 10); 649 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField, 650 _bcmFieldSliceSelFpf1, 2, 651 _bcmFieldSliceSrcClassSelect, 3, 652 fp_global_mask_tcam_ofs + f1_offset + 34, 10); 653 #if defined(BCM_MONTEREY_SUPPORT) && defined(BCM_PREEMPTION_SUPPORT) 654 if (SOC_IS_MONTEREY(unit)) { 655 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyPreemptablePacket, 656 _bcmFieldSliceSelFpf1, 2, 657 fp_global_mask_tcam_ofs + f1_offset + 44, 1); 658 } 659 #endif 660 661 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan, 662 _bcmFieldSliceSelFpf1, 3, 663 fp_global_mask_tcam_ofs + f1_offset, 16); 664 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 665 _bcmFieldSliceSelFpf1, 3, 666 fp_global_mask_tcam_ofs + f1_offset, 12); 667 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi, 668 _bcmFieldSliceSelFpf1, 3, 669 fp_global_mask_tcam_ofs + f1_offset + 12, 1); 670 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri, 671 _bcmFieldSliceSelFpf1, 3, 672 fp_global_mask_tcam_ofs + f1_offset + 13, 3); 673 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlan, 674 _bcmFieldSliceSelFpf1, 3, 675 fp_global_mask_tcam_ofs + f1_offset + 16, 16); 676 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanId, 677 _bcmFieldSliceSelFpf1, 3, 678 fp_global_mask_tcam_ofs + f1_offset + 16, 12); 679 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanCfi, 680 _bcmFieldSliceSelFpf1, 3, 681 fp_global_mask_tcam_ofs + f1_offset + 28, 1); 682 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanPri, 683 _bcmFieldSliceSelFpf1, 3, 684 fp_global_mask_tcam_ofs + f1_offset + 29, 3); 685 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterTpid, 686 _bcmFieldSliceSelFpf1, 3, 687 fp_global_mask_tcam_ofs + f1_offset + 32, 2); 688 #if defined(BCM_MONTEREY_SUPPORT) 689 if (SOC_IS_MONTEREY(unit)) { 690 #if defined(BCM_PREEMPTION_SUPPORT) 691 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyPreemptablePacket, 692 _bcmFieldSliceSelFpf1, 3, 693 fp_global_mask_tcam_ofs + f1_offset + 34, 1); 694 #endif 695 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyRoeFrameType, 696 _bcmFieldSliceSelFpf1, 3, 697 fp_global_mask_tcam_ofs + f1_offset + 35, 2); 698 } 699 #endif 700 701 702 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan, 703 _bcmFieldSliceSelFpf1, 4, 704 fp_global_mask_tcam_ofs + f1_offset, 16); 705 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 706 _bcmFieldSliceSelFpf1, 4, 707 fp_global_mask_tcam_ofs + f1_offset, 12); 708 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi, 709 _bcmFieldSliceSelFpf1, 4, 710 fp_global_mask_tcam_ofs + f1_offset + 12, 1); 711 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri, 712 _bcmFieldSliceSelFpf1, 4, 713 fp_global_mask_tcam_ofs + f1_offset + 13, 3); 714 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyEtherType, 715 _bcmFieldSliceSelFpf1, 4, 716 fp_global_mask_tcam_ofs + f1_offset + 16, 16); 717 if (soc_feature(unit, soc_feature_fcoe)) { 718 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanOuter, 719 _bcmFieldSliceSelFpf1, 4, 720 fp_global_mask_tcam_ofs + f1_offset + 32, 3); 721 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanInner, 722 _bcmFieldSliceSelFpf1, 4, 723 fp_global_mask_tcam_ofs + f1_offset + 35, 3); 724 } 725 #if defined(BCM_MONTEREY_SUPPORT) && defined(BCM_PREEMPTION_SUPPORT) 726 if (SOC_IS_MONTEREY(unit)) { 727 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyPreemptablePacket, 728 _bcmFieldSliceSelFpf1, 4, 729 fp_global_mask_tcam_ofs + f1_offset + 38, 1); 730 } 731 #endif 732 733 734 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVlanTranslationHit, 735 _bcmFieldSliceSelFpf1, 5, 736 fp_global_mask_tcam_ofs + f1_offset + 0, 3); 737 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyForwardingVlanValid, 738 _bcmFieldSliceSelFpf1, 5, 739 fp_global_mask_tcam_ofs + f1_offset + 3, 1); 740 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIngressStpState, 741 _bcmFieldSliceSelFpf1, 5, 742 fp_global_mask_tcam_ofs + f1_offset + 4, 2); 743 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2SrcHit, 744 _bcmFieldSliceSelFpf1, 5, 745 fp_global_mask_tcam_ofs + f1_offset + 6, 1); 746 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2SrcStatic, 747 _bcmFieldSliceSelFpf1, 5, 748 fp_global_mask_tcam_ofs + f1_offset + 7, 1); 749 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2DestHit, 750 _bcmFieldSliceSelFpf1, 5, 751 fp_global_mask_tcam_ofs + f1_offset + 8, 1); 752 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2CacheHit, 753 _bcmFieldSliceSelFpf1, 5, 754 fp_global_mask_tcam_ofs + f1_offset + 9, 1); 755 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3SrcHostHit, 756 _bcmFieldSliceSelFpf1, 5, 757 fp_global_mask_tcam_ofs + f1_offset + 10, 1); 758 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpmcStarGroupHit, 759 _bcmFieldSliceSelFpf1, 5, 760 fp_global_mask_tcam_ofs + f1_offset + 10, 1); 761 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3DestHostHit, 762 _bcmFieldSliceSelFpf1, 5, 763 fp_global_mask_tcam_ofs + f1_offset + 11, 1); 764 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3DestRouteHit, 765 _bcmFieldSliceSelFpf1, 5, 766 fp_global_mask_tcam_ofs + f1_offset + 12, 1); 767 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2StationMove, 768 _bcmFieldSliceSelFpf1, 5, 769 fp_global_mask_tcam_ofs + f1_offset + 13, 1); 770 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDosAttack, 771 _bcmFieldSliceSelFpf1, 5, 772 fp_global_mask_tcam_ofs + f1_offset + 14, 1); 773 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpTunnelHit, 774 _bcmFieldSliceSelFpf1, 5, 775 fp_global_mask_tcam_ofs + f1_offset + 15, 1); 776 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMplsLabel1Hit, 777 _bcmFieldSliceSelFpf1, 5, 778 fp_global_mask_tcam_ofs + f1_offset + 16, 1); 779 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTrillEgressRbridgeHit, 780 _bcmFieldSliceSelFpf1, 5, 781 fp_global_mask_tcam_ofs + f1_offset + 16, 1); 782 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2GreSrcIpHit, 783 _bcmFieldSliceSelFpf1, 5, 784 fp_global_mask_tcam_ofs + f1_offset + 16, 1); 785 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMimSrcGportHit, 786 _bcmFieldSliceSelFpf1, 5, 787 fp_global_mask_tcam_ofs + f1_offset + 16, 1); 788 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMplsLabel2Hit, 789 _bcmFieldSliceSelFpf1, 5, 790 fp_global_mask_tcam_ofs + f1_offset + 17, 1); 791 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTrillIngressRbridgeHit, 792 _bcmFieldSliceSelFpf1, 5, 793 fp_global_mask_tcam_ofs + f1_offset + 17, 1); 794 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2GreVfiHit, 795 _bcmFieldSliceSelFpf1, 5, 796 fp_global_mask_tcam_ofs + f1_offset + 17, 1); 797 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMimVfiHit, 798 _bcmFieldSliceSelFpf1, 5, 799 fp_global_mask_tcam_ofs + f1_offset + 17, 1); 800 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMplsTerminated, 801 _bcmFieldSliceSelFpf1, 5, 802 fp_global_mask_tcam_ofs + f1_offset + 18, 1); 803 804 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyPacketRes, 805 _bcmFieldSliceSelFpf1, 5, 806 fp_global_mask_tcam_ofs + f1_offset + 20, 6); 807 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlan, 808 _bcmFieldSliceSelFpf1, 5, 809 fp_global_mask_tcam_ofs + f1_offset + 26, 16); 810 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanId, 811 _bcmFieldSliceSelFpf1, 5, 812 fp_global_mask_tcam_ofs + f1_offset + 26, 12); 813 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanCfi, 814 _bcmFieldSliceSelFpf1, 5, 815 fp_global_mask_tcam_ofs + f1_offset + 38, 1); 816 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanPri, 817 _bcmFieldSliceSelFpf1, 5, 818 fp_global_mask_tcam_ofs + f1_offset + 39, 3); 819 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerTpid, 820 _bcmFieldSliceSelFpf1, 5, 821 fp_global_mask_tcam_ofs + f1_offset + 42, 2); 822 #if defined(BCM_MONTEREY_SUPPORT) && defined(BCM_PREEMPTION_SUPPORT) 823 if (SOC_IS_MONTEREY(unit)) { 824 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyPreemptablePacket, 825 _bcmFieldSliceSelFpf1, 5, 826 fp_global_mask_tcam_ofs + f1_offset + 44, 1); 827 } 828 #endif 829 830 831 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan, 832 _bcmFieldSliceSelFpf1, 6, 833 fp_global_mask_tcam_ofs + f1_offset, 16); 834 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 835 _bcmFieldSliceSelFpf1, 6, 836 fp_global_mask_tcam_ofs + f1_offset, 12); 837 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi, 838 _bcmFieldSliceSelFpf1, 6, 839 fp_global_mask_tcam_ofs + f1_offset + 12, 1); 840 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri, 841 _bcmFieldSliceSelFpf1, 6, 842 fp_global_mask_tcam_ofs + f1_offset + 13, 3); 843 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVlanFormat, 844 _bcmFieldSliceSelFpf1, 6, 845 fp_global_mask_tcam_ofs + f1_offset + 16, 2); 846 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2Format, 847 _bcmFieldSliceSelFpf1, 6, 848 fp_global_mask_tcam_ofs + f1_offset + 18, 2); 849 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTranslatedVlanFormat, 850 _bcmFieldSliceSelFpf1, 6, 851 fp_global_mask_tcam_ofs + f1_offset + 20, 2); 852 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMHOpcode, 853 _bcmFieldSliceSelFpf1, 6, 854 fp_global_mask_tcam_ofs + f1_offset + 22, 3); 855 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyPacketRes, 856 _bcmFieldSliceSelFpf1, 6, 857 fp_global_mask_tcam_ofs + f1_offset + 25, 6); 858 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpFrag, 859 _bcmFieldSliceSelFpf1, 6, 860 fp_global_mask_tcam_ofs + f1_offset + 31, 2); 861 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyEtherType, 862 _bcmFieldSliceSelFpf1, 6, 863 fp_global_mask_tcam_ofs + f1_offset + 33, 16); 864 865 866 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan, 867 _bcmFieldSliceSelFpf1, 7, 868 fp_global_mask_tcam_ofs + f1_offset, 16); 869 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 870 _bcmFieldSliceSelFpf1, 7, 871 fp_global_mask_tcam_ofs + f1_offset, 12); 872 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi, 873 _bcmFieldSliceSelFpf1, 7, 874 fp_global_mask_tcam_ofs + f1_offset + 12, 1); 875 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri, 876 _bcmFieldSliceSelFpf1, 7, 877 fp_global_mask_tcam_ofs + f1_offset + 13, 3); 878 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL2, 879 _bcmFieldSliceSelFpf1, 7, 880 _bcmFieldSliceSrcClassSelect, 0, 881 fp_global_mask_tcam_ofs + f1_offset + 16, 882 10); 883 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL3, 884 _bcmFieldSliceSelFpf1, 7, 885 _bcmFieldSliceSrcClassSelect, 1, 886 fp_global_mask_tcam_ofs + f1_offset + 16, 887 10); 888 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 889 bcmFieldQualifyDstClassField, 890 _bcmFieldSliceSelFpf1, 7, 891 _bcmFieldSliceSrcClassSelect, 2, 892 fp_global_mask_tcam_ofs + f1_offset + 16, 893 10); 894 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 895 bcmFieldQualifySrcClassField, 896 _bcmFieldSliceSelFpf1, 7, 897 _bcmFieldSliceSrcClassSelect, 3, 898 fp_global_mask_tcam_ofs + f1_offset + 16, 899 10); 900 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVrf, 901 _bcmFieldSliceSelFpf1, 7, 902 _bcmFieldSliceFwdFieldSelect, 903 _bcmFieldFwdFieldVrf, 904 fp_global_mask_tcam_ofs + f1_offset + 26, 905 13); 906 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVpn, 907 _bcmFieldSliceSelFpf1, 7, 908 _bcmFieldSliceFwdFieldSelect, 909 _bcmFieldFwdFieldVpn, 910 fp_global_mask_tcam_ofs + f1_offset + 26, 911 13); 912 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 913 bcmFieldQualifyForwardingVlanId, 914 _bcmFieldSliceSelFpf1, 7, 915 _bcmFieldSliceFwdFieldSelect, 916 _bcmFieldFwdFieldVlan, 917 fp_global_mask_tcam_ofs + f1_offset + 26, 918 13); 919 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyGenericAssociatedChannelLabelValid, 920 _bcmFieldSliceSelFpf1, 7, 921 fp_global_mask_tcam_ofs + f1_offset + 39, 1); 922 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyRouterAlertLabelValid, 923 _bcmFieldSliceSelFpf1, 7, 924 fp_global_mask_tcam_ofs + f1_offset + 40, 1); 925 926 927 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol, 928 _bcmFieldSliceSelFpf1, 8, 929 fp_global_mask_tcam_ofs + f1_offset, 8); 930 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTos, 931 _bcmFieldSliceSelFpf1, 8, 932 _bcmFieldSliceTosClassSelect, 0, 933 fp_global_mask_tcam_ofs + f1_offset + 8, 8); 934 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTosClassZero, 935 _bcmFieldSliceSelFpf1, 8, 936 _bcmFieldSliceTosClassSelect, 0, 937 fp_global_mask_tcam_ofs + f1_offset + 8, 8); 938 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTosClassOne, 939 _bcmFieldSliceSelFpf1, 8, 940 _bcmFieldSliceTosClassSelect, 1, 941 fp_global_mask_tcam_ofs + f1_offset + 8, 8); 942 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL2, 943 _bcmFieldSliceSelFpf1, 8, 944 _bcmFieldSliceSrcClassSelect, 0, 945 fp_global_mask_tcam_ofs + f1_offset + 16, 946 10); 947 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL3, 948 _bcmFieldSliceSelFpf1, 8, 949 _bcmFieldSliceSrcClassSelect, 1, 950 fp_global_mask_tcam_ofs + f1_offset + 16, 951 10); 952 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 953 bcmFieldQualifyDstClassField, 954 _bcmFieldSliceSelFpf1, 8, 955 _bcmFieldSliceSrcClassSelect, 2, 956 fp_global_mask_tcam_ofs + f1_offset + 16, 957 10); 958 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 959 bcmFieldQualifySrcClassField, 960 _bcmFieldSliceSelFpf1, 8, 961 _bcmFieldSliceSrcClassSelect, 3, 962 fp_global_mask_tcam_ofs + f1_offset + 16, 963 10); 964 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVrf, 965 _bcmFieldSliceSelFpf1, 8, 966 _bcmFieldSliceFwdFieldSelect, 967 _bcmFieldFwdFieldVrf, 968 fp_global_mask_tcam_ofs + f1_offset + 26, 969 13); 970 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVpn, 971 _bcmFieldSliceSelFpf1, 8, 972 _bcmFieldSliceFwdFieldSelect, 973 _bcmFieldFwdFieldVpn, 974 fp_global_mask_tcam_ofs + f1_offset + 26, 975 13); 976 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 977 bcmFieldQualifyForwardingVlanId, 978 _bcmFieldSliceSelFpf1, 8, 979 _bcmFieldSliceFwdFieldSelect, 980 _bcmFieldFwdFieldVlan, 981 fp_global_mask_tcam_ofs + f1_offset + 26, 982 13); 983 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpAddrsNormalized, 984 _bcmFieldSliceSelFpf1, 8, 985 fp_global_mask_tcam_ofs + f1_offset + 39, 1 986 ); 987 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMacAddrsNormalized, 988 _bcmFieldSliceSelFpf1, 8, 989 fp_global_mask_tcam_ofs + f1_offset + 40, 1 990 ); 991 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyNatSrcRealmId, 992 _bcmFieldSliceSelFpf1, 8, 993 fp_global_mask_tcam_ofs + f1_offset + 41, 2); 994 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyNatDstRealmId, 995 _bcmFieldSliceSelFpf1, 8, 996 fp_global_mask_tcam_ofs + f1_offset + 43, 2); 997 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyNatNeeded, 998 _bcmFieldSliceSelFpf1, 8, 999 fp_global_mask_tcam_ofs + f1_offset + 45, 1); 1000 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIcmpError, 1001 _bcmFieldSliceSelFpf1, 8, 1002 fp_global_mask_tcam_ofs + f1_offset + 46, 1); 1003 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstIpLocal, 1004 _bcmFieldSliceSelFpf1, 8, 1005 fp_global_mask_tcam_ofs + f1_offset + 47, 1); 1006 1007 1008 _FP_QUAL_ADD(unit, stage_fc, _bcmFieldQualifyData2, 1009 _bcmFieldSliceSelFpf1, 9, 1010 fp_global_mask_tcam_ofs + f1_offset, 32); 1011 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyGenericAssociatedChannelLabelValid, 1012 _bcmFieldSliceSelFpf1, 9, 1013 fp_global_mask_tcam_ofs + f1_offset + 32, 1); 1014 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyRouterAlertLabelValid, 1015 _bcmFieldSliceSelFpf1, 9, 1016 fp_global_mask_tcam_ofs + f1_offset + 33, 1); 1017 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3Ingress, 1018 _bcmFieldSliceSelFpf1, 9, 1019 fp_global_mask_tcam_ofs + f1_offset + 36 , 13); 1020 1021 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstPort, 1022 _bcmFieldSliceSelFpf1, 10, 1023 _bcmFieldSliceDstFwdEntitySelect, 1024 _bcmFieldFwdEntityGlp, 1025 fp_global_mask_tcam_ofs + f1_offset, 21); 1026 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstTrunk, 1027 _bcmFieldSliceSelFpf1, 10, 1028 _bcmFieldSliceDstFwdEntitySelect, 1029 _bcmFieldFwdEntityGlp, 1030 fp_global_mask_tcam_ofs + f1_offset, 21); 1031 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1032 bcmFieldQualifyDstMplsGport, 1033 _bcmFieldSliceSelFpf1, 10, 1034 _bcmFieldSliceDstFwdEntitySelect, 1035 _bcmFieldFwdEntityMplsGport, 1036 fp_global_mask_tcam_ofs + f1_offset, 21); 1037 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1038 bcmFieldQualifyDstMplsGports, 1039 _bcmFieldSliceSelFpf1, 10, 1040 _bcmFieldSliceDstFwdEntitySelect, 1041 _bcmFieldFwdEntityMplsGport, 1042 fp_global_mask_tcam_ofs + f1_offset, 21); 1043 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1044 bcmFieldQualifyDstNivGport, 1045 _bcmFieldSliceSelFpf1, 10, 1046 _bcmFieldSliceDstFwdEntitySelect, 1047 _bcmFieldFwdEntityNivGport, 1048 fp_global_mask_tcam_ofs + f1_offset, 21); 1049 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1050 bcmFieldQualifyDstNivGports, 1051 _bcmFieldSliceSelFpf1, 10, 1052 _bcmFieldSliceDstFwdEntitySelect, 1053 _bcmFieldFwdEntityNivGport, 1054 fp_global_mask_tcam_ofs + f1_offset, 21); 1055 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1056 bcmFieldQualifyDstMimGport, 1057 _bcmFieldSliceSelFpf1, 10, 1058 _bcmFieldSliceDstFwdEntitySelect, 1059 _bcmFieldFwdEntityMimGport, 1060 fp_global_mask_tcam_ofs + f1_offset, 21); 1061 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1062 bcmFieldQualifyDstMimGports, 1063 _bcmFieldSliceSelFpf1, 10, 1064 _bcmFieldSliceDstFwdEntitySelect, 1065 _bcmFieldFwdEntityMimGport, 1066 fp_global_mask_tcam_ofs + f1_offset, 21); 1067 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1068 bcmFieldQualifyDstVxlanGport, 1069 _bcmFieldSliceSelFpf1, 10, 1070 _bcmFieldSliceDstFwdEntitySelect, 1071 _bcmFieldFwdEntityVxlanGport, 1072 fp_global_mask_tcam_ofs + f1_offset, 21); 1073 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1074 bcmFieldQualifyDstVxlanGports, 1075 _bcmFieldSliceSelFpf1, 10, 1076 _bcmFieldSliceDstFwdEntitySelect, 1077 _bcmFieldFwdEntityVxlanGport, 1078 fp_global_mask_tcam_ofs + f1_offset, 21); 1079 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1080 bcmFieldQualifyDstVlanGport, 1081 _bcmFieldSliceSelFpf1, 10, 1082 _bcmFieldSliceDstFwdEntitySelect, 1083 _bcmFieldFwdEntityVlanGport, 1084 fp_global_mask_tcam_ofs + f1_offset, 21); 1085 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1086 bcmFieldQualifyDstVlanGports, 1087 _bcmFieldSliceSelFpf1, 10, 1088 _bcmFieldSliceDstFwdEntitySelect, 1089 _bcmFieldFwdEntityVlanGport, 1090 fp_global_mask_tcam_ofs + f1_offset, 21); 1091 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstGport, 1092 _bcmFieldSliceSelFpf1, 10, 1093 _bcmFieldSliceDstFwdEntitySelect, 1094 _bcmFieldFwdEntityCommonGport, 1095 fp_global_mask_tcam_ofs + f1_offset, 21); 1096 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstGports, 1097 _bcmFieldSliceSelFpf1, 10, 1098 _bcmFieldSliceDstFwdEntitySelect, 1099 _bcmFieldFwdEntityCommonGport, 1100 fp_global_mask_tcam_ofs + f1_offset, 21); 1101 1102 1103 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstL3Egress, 1104 _bcmFieldSliceSelFpf1, 10, 1105 _bcmFieldSliceDstFwdEntitySelect, 1106 _bcmFieldFwdEntityL3Egress, 1107 fp_global_mask_tcam_ofs + f1_offset, 21); 1108 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1109 bcmFieldQualifyDstL3EgressNextHops, 1110 _bcmFieldSliceSelFpf1, 10, 1111 _bcmFieldSliceDstFwdEntitySelect, 1112 _bcmFieldFwdEntityL3Egress, 1113 fp_global_mask_tcam_ofs + f1_offset, 21); 1114 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1115 bcmFieldQualifyDstMulticastGroup, 1116 _bcmFieldSliceSelFpf1, 10, 1117 _bcmFieldSliceDstFwdEntitySelect, 1118 _bcmFieldFwdEntityMulticastGroup, 1119 fp_global_mask_tcam_ofs + f1_offset, 21); 1120 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1121 bcmFieldQualifyDstMulticastGroups, 1122 _bcmFieldSliceSelFpf1, 10, 1123 _bcmFieldSliceDstFwdEntitySelect, 1124 _bcmFieldFwdEntityMulticastGroup, 1125 fp_global_mask_tcam_ofs + f1_offset, 21); 1126 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1127 bcmFieldQualifyDstMultipath, 1128 _bcmFieldSliceSelFpf1, 10, 1129 _bcmFieldSliceDstFwdEntitySelect, 1130 _bcmFieldFwdEntityMultipath, 1131 fp_global_mask_tcam_ofs + f1_offset, 21); 1132 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstPort, 1133 _bcmFieldSliceSelFpf1, 10, 1134 fp_global_mask_tcam_ofs + f1_offset + 21, 16); 1135 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstTrunk, 1136 _bcmFieldSliceSelFpf1, 10, 1137 fp_global_mask_tcam_ofs + f1_offset + 21, 16); 1138 1139 1140 1141 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcPort, 1142 _bcmFieldSliceSelFpf1, 11, 1143 fp_global_mask_tcam_ofs + f1_offset, 16); 1144 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcTrunk, 1145 _bcmFieldSliceSelFpf1, 11, 1146 fp_global_mask_tcam_ofs + f1_offset, 16); 1147 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcModPortGport, 1148 _bcmFieldSliceSelFpf1, 11, 1149 fp_global_mask_tcam_ofs + f1_offset, 16); 1150 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcModPortGports, 1151 _bcmFieldSliceSelFpf1, 11, 1152 fp_global_mask_tcam_ofs + f1_offset, 16); 1153 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcModuleGport, 1154 _bcmFieldSliceSelFpf1, 11, 1155 fp_global_mask_tcam_ofs + f1_offset + 7, 8); 1156 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1157 bcmFieldQualifySrcMplsGport, 1158 _bcmFieldSliceSelFpf1, 11, 1159 _bcmFieldSliceIngressEntitySelect, 1160 _bcmFieldFwdEntityMplsGport, 1161 fp_global_mask_tcam_ofs + f1_offset + 16, 1162 16); 1163 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1164 bcmFieldQualifySrcMplsGports, 1165 _bcmFieldSliceSelFpf1, 11, 1166 _bcmFieldSliceIngressEntitySelect, 1167 _bcmFieldFwdEntityMplsGport, 1168 fp_global_mask_tcam_ofs + f1_offset + 16, 1169 16); 1170 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1171 bcmFieldQualifySrcNivGport, 1172 _bcmFieldSliceSelFpf1, 11, 1173 _bcmFieldSliceIngressEntitySelect, 1174 _bcmFieldFwdEntityNivGport, 1175 fp_global_mask_tcam_ofs + f1_offset + 16, 1176 16); 1177 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1178 bcmFieldQualifySrcNivGports, 1179 _bcmFieldSliceSelFpf1, 11, 1180 _bcmFieldSliceIngressEntitySelect, 1181 _bcmFieldFwdEntityNivGport, 1182 fp_global_mask_tcam_ofs + f1_offset + 16, 1183 16); 1184 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMimGport, 1185 _bcmFieldSliceSelFpf1, 11, 1186 _bcmFieldSliceIngressEntitySelect, 1187 _bcmFieldFwdEntityMimGport, 1188 fp_global_mask_tcam_ofs + f1_offset + 16, 1189 16); 1190 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMimGports, 1191 _bcmFieldSliceSelFpf1, 11, 1192 _bcmFieldSliceIngressEntitySelect, 1193 _bcmFieldFwdEntityMimGport, 1194 fp_global_mask_tcam_ofs + f1_offset + 16, 1195 16); 1196 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVxlanGport, 1197 _bcmFieldSliceSelFpf1, 11, 1198 _bcmFieldSliceIngressEntitySelect, 1199 _bcmFieldFwdEntityVxlanGport, 1200 fp_global_mask_tcam_ofs + f1_offset + 16, 1201 16); 1202 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVxlanGports, 1203 _bcmFieldSliceSelFpf1, 11, 1204 _bcmFieldSliceIngressEntitySelect, 1205 _bcmFieldFwdEntityVxlanGport, 1206 fp_global_mask_tcam_ofs + f1_offset + 16, 1207 16); 1208 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVlanGport, 1209 _bcmFieldSliceSelFpf1, 11, 1210 _bcmFieldSliceIngressEntitySelect, 1211 _bcmFieldFwdEntityVlanGport, 1212 fp_global_mask_tcam_ofs + f1_offset + 16, 1213 16); 1214 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVlanGports, 1215 _bcmFieldSliceSelFpf1, 11, 1216 _bcmFieldSliceIngressEntitySelect, 1217 _bcmFieldFwdEntityVlanGport, 1218 fp_global_mask_tcam_ofs + f1_offset + 16, 1219 16); 1220 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIntPriority, 1221 _bcmFieldSliceSelFpf1, 11, 1222 fp_global_mask_tcam_ofs + f1_offset + 32, 4); 1223 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyColor, 1224 _bcmFieldSliceSelFpf1, 11, 1225 fp_global_mask_tcam_ofs + f1_offset + 36, 2); 1226 1227 1228 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 1229 _bcmFieldSliceSelFpf1, 12, 1230 fp_global_mask_tcam_ofs + f1_offset, 12); 1231 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL2, 1232 _bcmFieldSliceSelFpf1, 12, 1233 _bcmFieldSliceSrcClassSelect, 0, 1234 fp_global_mask_tcam_ofs + f1_offset + 12, 1235 10); 1236 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL3, 1237 _bcmFieldSliceSelFpf1, 12, 1238 _bcmFieldSliceSrcClassSelect, 1, 1239 fp_global_mask_tcam_ofs + f1_offset + 12, 1240 10); 1241 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1242 bcmFieldQualifyDstClassField, 1243 _bcmFieldSliceSelFpf1, 12, 1244 _bcmFieldSliceSrcClassSelect, 2, 1245 fp_global_mask_tcam_ofs + f1_offset + 12, 1246 10); 1247 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1248 bcmFieldQualifySrcClassField, 1249 _bcmFieldSliceSelFpf1, 12, 1250 _bcmFieldSliceSrcClassSelect, 3, 1251 fp_global_mask_tcam_ofs + f1_offset + 12, 1252 10); 1253 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1254 bcmFieldQualifySrcMplsGport, 1255 _bcmFieldSliceSelFpf1, 12, 1256 _bcmFieldSliceIngressEntitySelect, 1257 _bcmFieldFwdEntityMplsGport, 1258 fp_global_mask_tcam_ofs + f1_offset + 22, 1259 16); 1260 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1261 bcmFieldQualifySrcMplsGports, 1262 _bcmFieldSliceSelFpf1, 12, 1263 _bcmFieldSliceIngressEntitySelect, 1264 _bcmFieldFwdEntityMplsGport, 1265 fp_global_mask_tcam_ofs + f1_offset + 22, 1266 16); 1267 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1268 bcmFieldQualifySrcNivGport, 1269 _bcmFieldSliceSelFpf1, 12, 1270 _bcmFieldSliceIngressEntitySelect, 1271 _bcmFieldFwdEntityNivGport, 1272 fp_global_mask_tcam_ofs + f1_offset + 22, 1273 16); 1274 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1275 bcmFieldQualifySrcNivGports, 1276 _bcmFieldSliceSelFpf1, 12, 1277 _bcmFieldSliceIngressEntitySelect, 1278 _bcmFieldFwdEntityNivGport, 1279 fp_global_mask_tcam_ofs + f1_offset + 22, 1280 16); 1281 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMimGport, 1282 _bcmFieldSliceSelFpf1, 12, 1283 _bcmFieldSliceIngressEntitySelect, 1284 _bcmFieldFwdEntityMimGport, 1285 fp_global_mask_tcam_ofs + f1_offset + 22, 1286 16); 1287 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMimGports, 1288 _bcmFieldSliceSelFpf1, 12, 1289 _bcmFieldSliceIngressEntitySelect, 1290 _bcmFieldFwdEntityMimGport, 1291 fp_global_mask_tcam_ofs + f1_offset + 22, 1292 16); 1293 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVxlanGport, 1294 _bcmFieldSliceSelFpf1, 12, 1295 _bcmFieldSliceIngressEntitySelect, 1296 _bcmFieldFwdEntityVxlanGport, 1297 fp_global_mask_tcam_ofs + f1_offset + 22, 1298 16); 1299 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVxlanGports, 1300 _bcmFieldSliceSelFpf1, 12, 1301 _bcmFieldSliceIngressEntitySelect, 1302 _bcmFieldFwdEntityVxlanGport, 1303 fp_global_mask_tcam_ofs + f1_offset + 22, 1304 16); 1305 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVlanGport, 1306 _bcmFieldSliceSelFpf1, 12, 1307 _bcmFieldSliceIngressEntitySelect, 1308 _bcmFieldFwdEntityVlanGport, 1309 fp_global_mask_tcam_ofs + f1_offset + 22, 1310 16); 1311 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVlanGports, 1312 _bcmFieldSliceSelFpf1, 12, 1313 _bcmFieldSliceIngressEntitySelect, 1314 _bcmFieldFwdEntityVlanGport, 1315 fp_global_mask_tcam_ofs + f1_offset + 22, 1316 16); 1317 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL2, 1318 _bcmFieldSliceSelFpf1, 12, 1319 _bcmFieldSliceDstClassSelect, 0, 1320 fp_global_mask_tcam_ofs + f1_offset + 38, 1321 10); 1322 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL3, 1323 _bcmFieldSliceSelFpf1, 12, 1324 _bcmFieldSliceDstClassSelect, 1, 1325 fp_global_mask_tcam_ofs + f1_offset + 38, 1326 10); 1327 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1328 bcmFieldQualifyDstClassField, 1329 _bcmFieldSliceSelFpf1, 12, 1330 _bcmFieldSliceDstClassSelect, 2, 1331 fp_global_mask_tcam_ofs + f1_offset + 38, 1332 10); 1333 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1334 bcmFieldQualifySrcClassField, 1335 _bcmFieldSliceSelFpf1, 12, 1336 _bcmFieldSliceDstClassSelect, 3, 1337 fp_global_mask_tcam_ofs + f1_offset + 38, 1338 10); 1339 1340 1341 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMplsControlWordValid, 1342 _bcmFieldSliceSelFpf1, 13, 1343 fp_global_mask_tcam_ofs + f1_offset + 36, 1); 1344 1345 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIntPriority, 1346 _bcmFieldSliceSelFpf1, 13, 1347 fp_global_mask_tcam_ofs + f1_offset + 37, 4); 1348 1349 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyColor, 1350 _bcmFieldSliceSelFpf1, 13, 1351 fp_global_mask_tcam_ofs + f1_offset + 41, 2); 1352 1353 if (soc_feature(unit, soc_feature_fp_based_oam)) { 1354 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOamType, 1355 _bcmFieldSliceSelFpf1, 13, 1356 fp_global_mask_tcam_ofs + f1_offset + 43, 1); 1357 } 1358 1359 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVnTag, 1360 _bcmFieldSliceSelFpf1, 13, 1361 _bcmFieldSliceAuxTag1Select, 1362 _bcmFieldAuxTagVn, 1363 fp_global_mask_tcam_ofs + f1_offset, 33); 1364 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyCnTag, 1365 _bcmFieldSliceSelFpf1, 13, 1366 _bcmFieldSliceAuxTag1Select, 1367 _bcmFieldAuxTagCn, 1368 fp_global_mask_tcam_ofs + f1_offset, 33); 1369 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1370 bcmFieldQualifyFabricQueueTag, 1371 _bcmFieldSliceSelFpf1, 13, 1372 _bcmFieldSliceAuxTag1Select, 1373 _bcmFieldAuxTagFabricQueue, 1374 fp_global_mask_tcam_ofs + f1_offset, 1375 33); 1376 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyMplsForwardingLabel, 1377 _bcmFieldSliceSelFpf1, 13, 1378 _bcmFieldSliceAuxTag1Select, _bcmFieldAuxTagMplsFwdingLabel, 1379 fp_global_mask_tcam_ofs + f1_offset, 33 1380 ); 1381 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyMplsForwardingLabelTtl, 1382 _bcmFieldDevSelDisable, 0, 1383 _bcmFieldSliceSelFpf1, 13, 1384 _bcmFieldSliceAuxTag1Select, _bcmFieldAuxTagMplsFwdingLabel, 1385 0, 1386 fp_global_mask_tcam_ofs + f1_offset, 8, 1387 fp_global_mask_tcam_ofs + f1_offset + 32, 1, 1388 0, 0, 1389 0 1390 ); 1391 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyMplsForwardingLabelBos, 1392 _bcmFieldDevSelDisable, 0, 1393 _bcmFieldSliceSelFpf1, 13, 1394 _bcmFieldSliceAuxTag1Select, _bcmFieldAuxTagMplsFwdingLabel, 1395 0, 1396 fp_global_mask_tcam_ofs + f1_offset + 8, 1, 1397 fp_global_mask_tcam_ofs + f1_offset + 32, 1, 1398 0, 0, 1399 0 1400 ); 1401 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyMplsForwardingLabelExp, 1402 _bcmFieldDevSelDisable, 0, 1403 _bcmFieldSliceSelFpf1, 13, 1404 _bcmFieldSliceAuxTag1Select, _bcmFieldAuxTagMplsFwdingLabel, 1405 0, 1406 fp_global_mask_tcam_ofs + f1_offset + 9, 3, 1407 fp_global_mask_tcam_ofs + f1_offset + 32, 1, 1408 0, 0, 1409 0 1410 ); 1411 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyMplsForwardingLabelId, 1412 _bcmFieldSliceSelFpf1, 13, 1413 _bcmFieldSliceAuxTag1Select, _bcmFieldAuxTagMplsFwdingLabel, 1414 fp_global_mask_tcam_ofs + f1_offset + 12, 21 1415 ); 1416 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyMplsControlWord, 1417 _bcmFieldSliceSelFpf1, 13, 1418 _bcmFieldSliceAuxTag1Select, _bcmFieldAuxTagMplsCntlWord, 1419 fp_global_mask_tcam_ofs + f1_offset, 33 1420 ); 1421 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVxlanHeaderBits8_31, 1422 _bcmFieldSliceSelFpf1, 13, 1423 _bcmFieldSliceAuxTag1Select, 1424 _bcmFieldAuxTagVxlanReserved, 1425 fp_global_mask_tcam_ofs + f1_offset, 24); 1426 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVxlanHeaderBits56_63, 1427 _bcmFieldSliceSelFpf1, 13, 1428 _bcmFieldSliceAuxTag1Select, 1429 _bcmFieldAuxTagVxlanReserved, 1430 fp_global_mask_tcam_ofs + f1_offset + 24, 8); 1431 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVxlanNetworkId, 1432 _bcmFieldSliceSelFpf1, 13, 1433 _bcmFieldSliceAuxTag1Select, 1434 _bcmFieldAuxTagVxlanOrLLTag, 1435 fp_global_mask_tcam_ofs + f1_offset, 24); 1436 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVxlanFlags, 1437 _bcmFieldSliceSelFpf1, 13, 1438 _bcmFieldSliceAuxTag1Select, 1439 _bcmFieldAuxTagVxlanOrLLTag, 1440 fp_global_mask_tcam_ofs + f1_offset + 24, 8); 1441 1442 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyRtag7AHashUpper, 1443 _bcmFieldSliceSelFpf1, 13, 1444 _bcmFieldSliceAuxTag1Select, 1445 _bcmFieldAuxTagRtag7A, 1446 fp_global_mask_tcam_ofs + f1_offset + 16, 17); 1447 1448 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyRtag7BHashUpper, 1449 _bcmFieldSliceSelFpf1, 13, 1450 _bcmFieldSliceAuxTag1Select, 1451 _bcmFieldAuxTagRtag7B, 1452 fp_global_mask_tcam_ofs + f1_offset + 16, 17); 1453 1454 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyRtag7AHashLower, 1455 _bcmFieldDevSelDisable, 0, 1456 _bcmFieldSliceSelFpf1, 13, 1457 _bcmFieldSliceAuxTag1Select, _bcmFieldAuxTagRtag7A, 1458 0, 1459 fp_global_mask_tcam_ofs + f1_offset, 16, 1460 fp_global_mask_tcam_ofs + f1_offset + 32, 1, 1461 0, 0, 1462 0); 1463 1464 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyRtag7BHashLower, 1465 _bcmFieldDevSelDisable, 0, 1466 _bcmFieldSliceSelFpf1, 13, 1467 _bcmFieldSliceAuxTag1Select, _bcmFieldAuxTagRtag7B, 1468 0, 1469 fp_global_mask_tcam_ofs + f1_offset, 16, 1470 fp_global_mask_tcam_ofs + f1_offset + 32, 1, 1471 0, 0, 1472 0); 1473 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMplsForwardingLabelAction, 1474 _bcmFieldSliceSelFpf1, 13, 1475 fp_global_mask_tcam_ofs + f1_offset + 33, 3 1476 ); 1477 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMacAddrsNormalized, 1478 _bcmFieldSliceSelFpf1, 14, 1479 fp_global_mask_tcam_ofs + f1_offset + 48, 1 1480 ); 1481 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcMac, 1482 _bcmFieldSliceSelFpf1, 14, 1483 fp_global_mask_tcam_ofs + f1_offset, 48 1484 ); 1485 1486 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol, 1487 _bcmFieldSliceSelFpf1, 15, 1488 fp_global_mask_tcam_ofs + f1_offset, 8); 1489 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4DstPort, 1490 _bcmFieldSliceSelFpf1, 15, 1491 fp_global_mask_tcam_ofs + f1_offset + 8, 16); 1492 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4SrcPort, 1493 _bcmFieldSliceSelFpf1, 15, 1494 fp_global_mask_tcam_ofs + f1_offset + 24, 16); 1495 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIcmpTypeCode, 1496 _bcmFieldSliceSelFpf1, 15, 1497 fp_global_mask_tcam_ofs + f1_offset + 24, 16); 1498 /* L4_NORMALIZED */ 1499 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTcpControl, 1500 _bcmFieldSliceSelFpf1, 15, 1501 _bcmFieldSliceTcpClassSelect, 0, 1502 fp_global_mask_tcam_ofs + f1_offset + 41, 6); 1503 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTcpClassZero, 1504 _bcmFieldSliceSelFpf1, 15, 1505 _bcmFieldSliceTcpClassSelect, 0, 1506 fp_global_mask_tcam_ofs + f1_offset + 41, 6); 1507 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTcpClassOne, 1508 _bcmFieldSliceSelFpf1, 15, 1509 _bcmFieldSliceTcpClassSelect, 1, 1510 fp_global_mask_tcam_ofs + f1_offset + 41, 6); 1511 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpFrag, 1512 _bcmFieldSliceSelFpf1, 15, 1513 fp_global_mask_tcam_ofs + f1_offset + 47, 2); 1514 1515 1516 if (soc_feature(unit, soc_feature_fcoe)) { 1517 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFcoeVersionIsZero, 1518 _bcmFieldSliceSelFpf1, 16, 1519 fp_global_mask_tcam_ofs + f1_offset, 1); 1520 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFcoeSOF, 1521 _bcmFieldSliceSelFpf1, 16, 1522 fp_global_mask_tcam_ofs + f1_offset + 1, 8); 1523 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanInner, 1524 _bcmFieldSliceSelFpf1, 16, 1525 fp_global_mask_tcam_ofs + f1_offset + 9, 3); 1526 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanOuter, 1527 _bcmFieldSliceSelFpf1, 16, 1528 fp_global_mask_tcam_ofs + f1_offset + 12, 3); 1529 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanRCtl, 1530 _bcmFieldSliceSelFpf1, 16, 1531 fp_global_mask_tcam_ofs + f1_offset + 15, 8); 1532 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanVFTVersion, 1533 _bcmFieldSliceSelFpf1, 16, 1534 fp_global_mask_tcam_ofs + f1_offset + 23, 2); 1535 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanVFTHopCount, 1536 _bcmFieldSliceSelFpf1, 16, 1537 fp_global_mask_tcam_ofs + f1_offset + 25, 5); 1538 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanVFTVsanId, 1539 _bcmFieldSliceSelFpf1, 16, 1540 fp_global_mask_tcam_ofs + f1_offset + 30, 12); 1541 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanVFTVsanPri, 1542 _bcmFieldSliceSelFpf1, 16, 1543 fp_global_mask_tcam_ofs + f1_offset + 42, 3); 1544 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanSrcFpmaCheck, 1545 _bcmFieldSliceSelFpf1, 16, 1546 fp_global_mask_tcam_ofs + f1_offset + 45, 1); 1547 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanSrcBindCheck, 1548 _bcmFieldSliceSelFpf1, 16, 1549 fp_global_mask_tcam_ofs + f1_offset + 46, 1); 1550 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanZoneCheck, 1551 _bcmFieldSliceSelFpf1, 16, 1552 fp_global_mask_tcam_ofs + f1_offset + 47, 2); 1553 } 1554 /* FPF2 single wide */ 1555 1556 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTtl, 1557 _bcmFieldSliceSelFpf2, 0, 1558 _bcmFieldSliceTtlClassSelect, 0, 1559 f2_offset, 8); 1560 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTtlClassZero, 1561 _bcmFieldSliceSelFpf2, 0, 1562 _bcmFieldSliceTtlClassSelect, 0, 1563 f2_offset, 8); 1564 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTtlClassOne, 1565 _bcmFieldSliceSelFpf2, 0, 1566 _bcmFieldSliceTtlClassSelect, 1, 1567 f2_offset, 8); 1568 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTcpControl, 1569 _bcmFieldSliceSelFpf2, 0, 1570 _bcmFieldSliceTcpClassSelect, 0, 1571 f2_offset + 8, 6); 1572 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTcpClassZero, 1573 _bcmFieldSliceSelFpf2, 0, 1574 _bcmFieldSliceTcpClassSelect, 0, 1575 f2_offset + 8, 6); 1576 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTcpClassOne, 1577 _bcmFieldSliceSelFpf2, 0, 1578 _bcmFieldSliceTcpClassSelect, 1, 1579 f2_offset + 8, 6); 1580 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpFlags, 1581 _bcmFieldSliceSelFpf2, 0, f2_offset + 14, 2); 1582 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTos, 1583 _bcmFieldSliceSelFpf2, 0, 1584 _bcmFieldSliceTosClassSelect, 0, 1585 f2_offset + 16, 8); 1586 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTosClassZero, 1587 _bcmFieldSliceSelFpf2, 0, 1588 _bcmFieldSliceTosClassSelect, 0, 1589 f2_offset + 16, 8); 1590 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTosClassOne, 1591 _bcmFieldSliceSelFpf2, 0, 1592 _bcmFieldSliceTosClassSelect, 1, 1593 f2_offset + 16, 8); 1594 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4DstPort, 1595 _bcmFieldSliceSelFpf2, 0, f2_offset + 24, 16); 1596 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4SrcPort, 1597 _bcmFieldSliceSelFpf2, 0, f2_offset + 40, 16); 1598 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIcmpTypeCode, 1599 _bcmFieldSliceSelFpf2, 0, f2_offset + 40, 16); 1600 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol, 1601 _bcmFieldSliceSelFpf2, 0, f2_offset + 56, 8); 1602 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstIp, 1603 _bcmFieldSliceSelFpf2, 0, f2_offset + 64, 32); 1604 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcIp, 1605 _bcmFieldSliceSelFpf2, 0, f2_offset + 96, 32); 1606 1607 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTtl, 1608 _bcmFieldSliceSelFpf2, 1, 1609 _bcmFieldSliceTtlClassSelect, 0, 1610 f2_offset, 8); 1611 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTtlClassZero, 1612 _bcmFieldSliceSelFpf2, 1, 1613 _bcmFieldSliceTtlClassSelect, 0, 1614 f2_offset, 8); 1615 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTtlClassOne, 1616 _bcmFieldSliceSelFpf2, 1, 1617 _bcmFieldSliceTtlClassSelect, 1, 1618 f2_offset, 8); 1619 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTcpControl, 1620 _bcmFieldSliceSelFpf2, 1, 1621 _bcmFieldSliceTcpClassSelect, 0, 1622 f2_offset + 8, 6); 1623 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTcpClassZero, 1624 _bcmFieldSliceSelFpf2, 1, 1625 _bcmFieldSliceTcpClassSelect, 0, 1626 f2_offset + 8, 6); 1627 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTcpClassOne, 1628 _bcmFieldSliceSelFpf2, 1, 1629 _bcmFieldSliceTcpClassSelect, 1, 1630 f2_offset + 8, 6); 1631 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpFrag, 1632 _bcmFieldSliceSelFpf2, 1, f2_offset + 14, 2); 1633 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTos, 1634 _bcmFieldSliceSelFpf2, 1, 1635 _bcmFieldSliceTosClassSelect, 0, 1636 f2_offset + 16, 8); 1637 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTosClassZero, 1638 _bcmFieldSliceSelFpf2, 1, 1639 _bcmFieldSliceTosClassSelect, 0, 1640 f2_offset + 16, 8); 1641 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTosClassOne, 1642 _bcmFieldSliceSelFpf2, 1, 1643 _bcmFieldSliceTosClassSelect, 1, 1644 f2_offset + 16, 8); 1645 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4DstPort, 1646 _bcmFieldSliceSelFpf2, 1, f2_offset + 24, 16); 1647 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4SrcPort, 1648 _bcmFieldSliceSelFpf2, 1, f2_offset + 40, 16); 1649 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIcmpTypeCode, 1650 _bcmFieldSliceSelFpf2, 1, f2_offset + 40, 16); 1651 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol, 1652 _bcmFieldSliceSelFpf2, 1, f2_offset + 56, 8); 1653 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstIp, 1654 _bcmFieldSliceSelFpf2, 1, f2_offset + 64, 32); 1655 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcIp, 1656 _bcmFieldSliceSelFpf2, 1, f2_offset + 96, 32); 1657 1658 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcIp6, 1659 _bcmFieldSliceSelFpf2, 2, f2_offset, 128); 1660 1661 if (!soc_feature(unit, soc_feature_fp_based_oam)) { 1662 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstIp6, 1663 _bcmFieldSliceSelFpf2, 3, f2_offset, 128); 1664 } else { 1665 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstIp6, 1666 _bcmFieldSliceSelFpf2, 3, 1667 _bcmFieldSliceOamOverLayEnable, 1668 _bcmFieldOamOverlayDisable, 1669 f2_offset, 128); 1670 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1671 bcmFieldQualifyEthernetOamHeaderBits0_31, 1672 _bcmFieldSliceSelFpf2, 3, 1673 _bcmFieldSliceOamOverLayEnable, 1674 _bcmFieldOamOverlayEnable, 1675 f2_offset + 96, 32); 1676 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1677 bcmFieldQualifyEthernetOamHeaderBits32_63, 1678 _bcmFieldSliceSelFpf2, 3, 1679 _bcmFieldSliceOamOverLayEnable, 1680 _bcmFieldOamOverlayEnable, 1681 f2_offset + 64, 32); 1682 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1683 bcmFieldQualifyIngressDropEthernetOamControl, 1684 _bcmFieldSliceSelFpf2, 3, 1685 _bcmFieldSliceOamOverLayEnable, 1686 _bcmFieldOamOverlayEnable, 1687 f2_offset + 57, 7); 1688 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1689 bcmFieldQualifyIngressDropEthernetOamData, 1690 _bcmFieldSliceSelFpf2, 3, 1691 _bcmFieldSliceOamOverLayEnable, 1692 _bcmFieldOamOverlayEnable, 1693 f2_offset + 57, 7); 1694 #if 0 /* Not supported in Apache A0.*/ 1695 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1696 bcmFieldQualifyIngressDropMplsOamData, 1697 _bcmFieldSliceSelFpf2, 3, 1698 _bcmFieldSliceOamOverLayEnable, 1699 _bcmFieldOamOverlayEnable, 1700 f2_offset + 57, 7); 1701 #endif 1702 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1703 bcmFieldQualifyEthernetOamTxPktUPMEP, 1704 _bcmFieldSliceSelFpf2, 3, 1705 _bcmFieldSliceOamOverLayEnable, 1706 _bcmFieldOamOverlayEnable, 1707 f2_offset + 56, 1); 1708 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1709 bcmFieldQualifyEthernetOamInterfaceClassPort, 1710 _bcmFieldSliceSelFpf2, 3, 1711 _bcmFieldSliceOamOverLayEnable, 1712 _bcmFieldOamOverlayEnable, 1713 f2_offset + 32, 8); 1714 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1715 bcmFieldQualifyEthernetOamClassVlanTranslateKeyFirst, 1716 _bcmFieldSliceSelFpf2, 3, 1717 _bcmFieldSliceOamOverLayEnable, 1718 _bcmFieldOamOverlayEnable, 1719 f2_offset + 24, 8); 1720 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1721 bcmFieldQualifyEthernetOamClassVlanTranslateKeySecond, 1722 _bcmFieldSliceSelFpf2, 3, 1723 _bcmFieldSliceOamOverLayEnable, 1724 _bcmFieldOamOverlayEnable, 1725 f2_offset + 16, 8); 1726 _FP_QUAL_THREE_SLICE_SEL_ADD(unit, stage_fc, 1727 bcmFieldQualifyEthernetOamInterfaceClassNiv, 1728 _bcmFieldSliceSelFpf2, 3, 1729 _bcmFieldSliceOamOverLayEnable, _bcmFieldOamOverlayEnable, 1730 _bcmFieldSliceOamInterfaceClassSelect, 1731 _bcmFieldOamInterfaceClassSelectNiv, 1732 f2_offset + 8, 8); 1733 _FP_QUAL_THREE_SLICE_SEL_ADD(unit, stage_fc, 1734 bcmFieldQualifyEthernetOamInterfaceClassMim, 1735 _bcmFieldSliceSelFpf2, 3, 1736 _bcmFieldSliceOamOverLayEnable, _bcmFieldOamOverlayEnable, 1737 _bcmFieldSliceOamInterfaceClassSelect, 1738 _bcmFieldOamInterfaceClassSelectMim, 1739 f2_offset + 8, 8); 1740 _FP_QUAL_THREE_SLICE_SEL_ADD(unit, stage_fc, 1741 bcmFieldQualifyEthernetOamInterfaceClassVxlan, 1742 _bcmFieldSliceSelFpf2, 3, 1743 _bcmFieldSliceOamOverLayEnable, _bcmFieldOamOverlayEnable, 1744 _bcmFieldSliceOamInterfaceClassSelect, 1745 _bcmFieldOamInterfaceClassSelectVxlan, 1746 f2_offset + 8, 8); 1747 _FP_QUAL_THREE_SLICE_SEL_ADD(unit, stage_fc, 1748 bcmFieldQualifyEthernetOamInterfaceClassVlan, 1749 _bcmFieldSliceSelFpf2, 3, 1750 _bcmFieldSliceOamOverLayEnable, _bcmFieldOamOverlayEnable, 1751 _bcmFieldSliceOamInterfaceClassSelect, 1752 _bcmFieldOamInterfaceClassSelectVlan, 1753 f2_offset + 8, 8); 1754 _FP_QUAL_THREE_SLICE_SEL_ADD(unit, stage_fc, 1755 bcmFieldQualifyEthernetOamInterfaceClassMpls, 1756 _bcmFieldSliceSelFpf2, 3, 1757 _bcmFieldSliceOamOverLayEnable, _bcmFieldOamOverlayEnable, 1758 _bcmFieldSliceOamInterfaceClassSelect, 1759 _bcmFieldOamInterfaceClassSelectMpls, 1760 f2_offset + 8, 8); 1761 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1762 bcmFieldQualifyEthernetOamClassVpn, 1763 _bcmFieldSliceSelFpf2, 3, 1764 _bcmFieldSliceOamOverLayEnable, 1765 _bcmFieldOamOverlayEnable, 1766 f2_offset + 0, 8); 1767 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1768 bcmFieldQualifyMplsOamHeaderBits0_31, 1769 _bcmFieldSliceSelFpf2, 3, 1770 _bcmFieldSliceOamOverLayEnable, 1771 _bcmFieldOamOverlayEnable, 1772 f2_offset + 96, 32); 1773 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1774 bcmFieldQualifyMplsOamHeaderBits32_63, 1775 _bcmFieldSliceSelFpf2, 3, 1776 _bcmFieldSliceOamOverLayEnable, 1777 _bcmFieldOamOverlayEnable, 1778 f2_offset + 64, 32); 1779 #if 0 /* Not supported in Apache A0.*/ 1780 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1781 bcmFieldQualifyIngressDropMplsOamControl, 1782 _bcmFieldSliceSelFpf2, 3, 1783 _bcmFieldSliceOamOverLayEnable, 1784 _bcmFieldOamOverlayEnable, 1785 f2_offset + 54, 8); 1786 #endif 1787 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1788 bcmFieldQualifyMplsOamUpperLabelDataDrop, 1789 _bcmFieldSliceSelFpf2, 3, 1790 _bcmFieldSliceOamOverLayEnable, 1791 _bcmFieldOamOverlayEnable, 1792 f2_offset + 53, 1); 1793 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1794 bcmFieldQualifyMplsOamGALLabelOnly, 1795 _bcmFieldSliceSelFpf2, 3, 1796 _bcmFieldSliceOamOverLayEnable, 1797 _bcmFieldOamOverlayEnable, 1798 f2_offset + 52, 1); 1799 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1800 bcmFieldQualifyMplsOamGALExposed, 1801 _bcmFieldSliceSelFpf2, 3, 1802 _bcmFieldSliceOamOverLayEnable, 1803 _bcmFieldOamOverlayEnable, 1804 f2_offset + 47, 1); 1805 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1806 bcmFieldQualifyMplsOamACH, 1807 _bcmFieldSliceSelFpf2, 3, 1808 _bcmFieldSliceOamOverLayEnable, 1809 _bcmFieldOamOverlayEnable, 1810 f2_offset + 15, 32); 1811 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1812 bcmFieldQualifyMplsOamControlPktType, 1813 _bcmFieldSliceSelFpf2, 3, 1814 _bcmFieldSliceOamOverLayEnable, 1815 _bcmFieldOamOverlayEnable, 1816 f2_offset + 12, 3); 1817 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1818 bcmFieldQualifyMplsOamClassMplsSwitchLabel, 1819 _bcmFieldSliceSelFpf2, 3, 1820 _bcmFieldSliceOamOverLayEnable, 1821 _bcmFieldOamOverlayEnable, 1822 f2_offset + 0, 12); 1823 } 1824 1825 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTtl, 1826 _bcmFieldSliceSelFpf2, 4, 1827 _bcmFieldSliceTtlClassSelect, 0, 1828 f2_offset, 8); 1829 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTtlClassZero, 1830 _bcmFieldSliceSelFpf2, 4, 1831 _bcmFieldSliceTtlClassSelect, 0, 1832 f2_offset, 8); 1833 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTtlClassOne, 1834 _bcmFieldSliceSelFpf2, 4, 1835 _bcmFieldSliceTtlClassSelect, 1, 1836 f2_offset, 8); 1837 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTcpControl, 1838 _bcmFieldSliceSelFpf2, 4, 1839 _bcmFieldSliceTcpClassSelect, 0, 1840 f2_offset + 8, 6); 1841 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTcpClassZero, 1842 _bcmFieldSliceSelFpf2, 4, 1843 _bcmFieldSliceTcpClassSelect, 0, 1844 f2_offset + 8, 6); 1845 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTcpClassOne, 1846 _bcmFieldSliceSelFpf2, 4, 1847 _bcmFieldSliceTcpClassSelect, 1, 1848 f2_offset + 8, 6); 1849 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIp6FlowLabel, 1850 _bcmFieldSliceSelFpf2, 4, f2_offset + 14, 20); 1851 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTos, 1852 _bcmFieldSliceSelFpf2, 4, 1853 _bcmFieldSliceTosClassSelect, 0, 1854 f2_offset + 34, 8); 1855 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTosClassZero, 1856 _bcmFieldSliceSelFpf2, 4, 1857 _bcmFieldSliceTosClassSelect, 0, 1858 f2_offset + 34, 8); 1859 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTosClassOne, 1860 _bcmFieldSliceSelFpf2, 4, 1861 _bcmFieldSliceTosClassSelect, 1, 1862 f2_offset + 34, 8); 1863 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol, 1864 _bcmFieldSliceSelFpf2, 4, f2_offset + 42, 8); 1865 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3Ingress, 1866 _bcmFieldSliceSelFpf2, 4, f2_offset + 50, 13); 1867 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstIp6High, 1868 _bcmFieldSliceSelFpf2, 4, f2_offset + 64, 64); 1869 1870 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan, 1871 _bcmFieldSliceSelFpf2, 5, f2_offset, 16); 1872 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 1873 _bcmFieldSliceSelFpf2, 5, f2_offset, 12); 1874 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi, 1875 _bcmFieldSliceSelFpf2, 5, f2_offset + 12, 1); 1876 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri, 1877 _bcmFieldSliceSelFpf2, 5, f2_offset + 13, 3); 1878 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyEtherType, 1879 _bcmFieldSliceSelFpf2, 5, f2_offset + 16, 16); 1880 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcMac, 1881 _bcmFieldSliceSelFpf2, 5, f2_offset + 32, 48); 1882 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstMac, 1883 _bcmFieldSliceSelFpf2, 5, f2_offset + 80, 48); 1884 1885 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan, 1886 _bcmFieldSliceSelFpf2, 6, f2_offset, 16); 1887 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 1888 _bcmFieldSliceSelFpf2, 6, f2_offset, 12); 1889 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi, 1890 _bcmFieldSliceSelFpf2, 6, f2_offset + 12, 1); 1891 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri, 1892 _bcmFieldSliceSelFpf2, 6, f2_offset + 13, 3); 1893 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyEtherType, 1894 _bcmFieldSliceSelFpf2, 6, f2_offset + 16, 16); 1895 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcMac, 1896 _bcmFieldSliceSelFpf2, 6, f2_offset + 32, 48); 1897 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcIp, 1898 _bcmFieldSliceSelFpf2, 6, f2_offset + 80, 32); 1899 1900 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan, 1901 _bcmFieldSliceSelFpf2, 7, f2_offset, 16); 1902 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 1903 _bcmFieldSliceSelFpf2, 7, f2_offset, 12); 1904 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi, 1905 _bcmFieldSliceSelFpf2, 7, f2_offset + 12, 1); 1906 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri, 1907 _bcmFieldSliceSelFpf2, 7, f2_offset + 13, 3); 1908 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyEtherType, 1909 _bcmFieldSliceSelFpf2, 7, f2_offset + 16, 16); 1910 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTtl, 1911 _bcmFieldSliceSelFpf2, 7, 1912 _bcmFieldSliceTtlClassSelect, 0, 1913 f2_offset + 32, 8); 1914 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTtlClassZero, 1915 _bcmFieldSliceSelFpf2, 7, 1916 _bcmFieldSliceTtlClassSelect, 0, 1917 f2_offset + 32, 8); 1918 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTtlClassOne, 1919 _bcmFieldSliceSelFpf2, 7, 1920 _bcmFieldSliceTtlClassSelect, 1, 1921 f2_offset + 32, 8); 1922 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol, 1923 _bcmFieldSliceSelFpf2, 7, f2_offset + 40, 8); 1924 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstIp, 1925 _bcmFieldSliceSelFpf2, 7, f2_offset + 48, 32); 1926 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstMac, 1927 _bcmFieldSliceSelFpf2, 7, f2_offset + 80, 48); 1928 1929 _FP_QUAL_ADD(unit, stage_fc, _bcmFieldQualifyData0, 1930 _bcmFieldSliceSelFpf2, 8, f2_offset, 128); 1931 1932 _FP_QUAL_ADD(unit, stage_fc, _bcmFieldQualifyData1, 1933 _bcmFieldSliceSelFpf2, 9, f2_offset, 128); 1934 1935 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcIp6High, 1936 _bcmFieldSliceSelFpf2, 10, f2_offset, 64); 1937 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstIp6High, 1938 _bcmFieldSliceSelFpf2, 10, f2_offset + 64, 64); 1939 1940 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcMac, 1941 _bcmFieldSliceSelFpf2, 11, f2_offset + 32, 48); 1942 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstMac, 1943 _bcmFieldSliceSelFpf2, 11, f2_offset + 80, 48); 1944 1945 1946 if (soc_feature(unit, soc_feature_fcoe)) { 1947 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFcoeRxID, 1948 _bcmFieldSliceSelFpf2, 12, f2_offset + 0, 16); 1949 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFcoeOxID, 1950 _bcmFieldSliceSelFpf2, 12, f2_offset + 16, 16); 1951 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanDFCtl, 1952 _bcmFieldSliceSelFpf2, 12, f2_offset + 32, 8); 1953 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanCSCtl, 1954 _bcmFieldSliceSelFpf2, 12, f2_offset + 40, 8); 1955 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanFCtl, 1956 _bcmFieldSliceSelFpf2, 12, f2_offset + 48, 24); 1957 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanType, 1958 _bcmFieldSliceSelFpf2, 12, f2_offset + 72, 8); 1959 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanDstId, 1960 _bcmFieldSliceSelFpf2, 12, f2_offset + 80, 24); 1961 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanSrcId, 1962 _bcmFieldSliceSelFpf2, 12, f2_offset + 104, 24); 1963 } 1964 /* FPF 3 */ 1965 /* Present in Global Mask Field */ 1966 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstClassL2, 1967 _bcmFieldDevSelDisable, 0, 1968 _bcmFieldSliceSelFpf3, 0, 1969 _bcmFieldSliceDstClassSelect, 0, 1970 0, 1971 fp_global_mask_tcam_ofs + f3_offset, 10, 1972 0, 0, 0, 0, 0, 0); 1973 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstClassL3, 1974 _bcmFieldDevSelDisable, 0, 1975 _bcmFieldSliceSelFpf3, 0, 1976 _bcmFieldSliceDstClassSelect, 1, 1977 0, 1978 fp_global_mask_tcam_ofs + f3_offset, 10, 1979 0, 0, 0, 0, 0, 0); 1980 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstClassField, 1981 _bcmFieldDevSelDisable, 0, 1982 _bcmFieldSliceSelFpf3, 0, 1983 _bcmFieldSliceDstClassSelect, 2, 1984 0, 1985 fp_global_mask_tcam_ofs + f3_offset, 10, 1986 0, 0, 0, 0, 0, 0); 1987 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifySrcClassField, 1988 _bcmFieldDevSelDisable, 0, 1989 _bcmFieldSliceSelFpf3, 0, 1990 _bcmFieldSliceDstClassSelect, 3, 1991 0, 1992 fp_global_mask_tcam_ofs + f3_offset, 10, 1993 0, 0, 0, 0, 0, 0); 1994 1995 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL2, 1996 _bcmFieldSliceSelFpf3, 0, 1997 _bcmFieldSliceSrcClassSelect, 0, 1998 fp_global_mask_tcam_ofs + f3_offset + 10, 10); 1999 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL3, 2000 _bcmFieldSliceSelFpf3, 0, 2001 _bcmFieldSliceSrcClassSelect, 1, 2002 fp_global_mask_tcam_ofs + f3_offset + 10, 10); 2003 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 2004 bcmFieldQualifyDstClassField, 2005 _bcmFieldSliceSelFpf3, 0, 2006 _bcmFieldSliceSrcClassSelect, 2, 2007 fp_global_mask_tcam_ofs + f3_offset + 10, 10); 2008 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 2009 bcmFieldQualifySrcClassField, 2010 _bcmFieldSliceSelFpf3, 0, 2011 _bcmFieldSliceSrcClassSelect, 3, 2012 fp_global_mask_tcam_ofs + f3_offset + 10, 10); 2013 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVrf, 2014 _bcmFieldSliceSelFpf3, 0, 2015 _bcmFieldSliceFwdFieldSelect, 2016 _bcmFieldFwdFieldVrf, 2017 fp_global_mask_tcam_ofs + f3_offset + 20, 13); 2018 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVpn, 2019 _bcmFieldSliceSelFpf3, 0, 2020 _bcmFieldSliceFwdFieldSelect, 2021 _bcmFieldFwdFieldVpn, 2022 fp_global_mask_tcam_ofs + f3_offset + 20, 13); 2023 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 2024 bcmFieldQualifyForwardingVlanId, 2025 _bcmFieldSliceSelFpf3, 0, 2026 _bcmFieldSliceFwdFieldSelect, 2027 _bcmFieldFwdFieldVlan, 2028 fp_global_mask_tcam_ofs + f3_offset + 20, 13); 2029 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 2030 bcmFieldQualifySrcMplsGport, 2031 _bcmFieldSliceSelFpf3, 0, 2032 _bcmFieldSliceIngressEntitySelect, 2033 _bcmFieldFwdEntityMplsGport, 2034 fp_global_mask_tcam_ofs + f3_offset + 33, 16); 2035 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 2036 bcmFieldQualifySrcMplsGports, 2037 _bcmFieldSliceSelFpf3, 0, 2038 _bcmFieldSliceIngressEntitySelect, 2039 _bcmFieldFwdEntityMplsGport, 2040 fp_global_mask_tcam_ofs + f3_offset + 33, 16); 2041 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 2042 bcmFieldQualifySrcNivGport, 2043 _bcmFieldSliceSelFpf3, 0, 2044 _bcmFieldSliceIngressEntitySelect, 2045 _bcmFieldFwdEntityNivGport, 2046 fp_global_mask_tcam_ofs + f3_offset + 33, 16); 2047 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 2048 bcmFieldQualifySrcNivGports, 2049 _bcmFieldSliceSelFpf3, 0, 2050 _bcmFieldSliceIngressEntitySelect, 2051 _bcmFieldFwdEntityNivGport, 2052 fp_global_mask_tcam_ofs + f3_offset + 33, 16); 2053 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMimGport, 2054 _bcmFieldSliceSelFpf3, 0, 2055 _bcmFieldSliceIngressEntitySelect, 2056 _bcmFieldFwdEntityMimGport, 2057 fp_global_mask_tcam_ofs + f3_offset + 33, 16); 2058 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMimGports, 2059 _bcmFieldSliceSelFpf3, 0, 2060 _bcmFieldSliceIngressEntitySelect, 2061 _bcmFieldFwdEntityMimGport, 2062 fp_global_mask_tcam_ofs + f3_offset + 33, 16); 2063 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVxlanGport, 2064 _bcmFieldSliceSelFpf3, 0, 2065 _bcmFieldSliceIngressEntitySelect, 2066 _bcmFieldFwdEntityVxlanGport, 2067 fp_global_mask_tcam_ofs + f3_offset + 33, 16); 2068 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVxlanGports, 2069 _bcmFieldSliceSelFpf3, 0, 2070 _bcmFieldSliceIngressEntitySelect, 2071 _bcmFieldFwdEntityVxlanGport, 2072 fp_global_mask_tcam_ofs + f3_offset + 33, 16); 2073 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVlanGport, 2074 _bcmFieldSliceSelFpf3, 0, 2075 _bcmFieldSliceIngressEntitySelect, 2076 _bcmFieldFwdEntityVlanGport, 2077 fp_global_mask_tcam_ofs + f3_offset + 33, 16); 2078 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVlanGports, 2079 _bcmFieldSliceSelFpf3, 0, 2080 _bcmFieldSliceIngressEntitySelect, 2081 _bcmFieldFwdEntityVlanGport, 2082 fp_global_mask_tcam_ofs + f3_offset + 33, 16); 2083 2084 2085 2086 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifySrcClassL2, 2087 _bcmFieldDevSelDisable, 0, 2088 _bcmFieldSliceSelFpf3, 1, 2089 _bcmFieldSliceSrcClassSelect, 0, 2090 0, 2091 fp_global_mask_tcam_ofs + f3_offset, 10, 2092 0, 0, 0, 0, 0, 0); 2093 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifySrcClassL3, 2094 _bcmFieldDevSelDisable, 0, 2095 _bcmFieldSliceSelFpf3, 1, 2096 _bcmFieldSliceSrcClassSelect, 1, 2097 0, 2098 fp_global_mask_tcam_ofs + f3_offset, 10, 2099 0, 0, 0, 0, 0, 0); 2100 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstClassField, 2101 _bcmFieldDevSelDisable, 0, 2102 _bcmFieldSliceSelFpf3, 1, 2103 _bcmFieldSliceSrcClassSelect, 2, 2104 0, 2105 fp_global_mask_tcam_ofs + f3_offset, 10, 2106 0, 0, 0, 0, 0, 0); 2107 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifySrcClassField, 2108 _bcmFieldDevSelDisable, 0, 2109 _bcmFieldSliceSelFpf3, 1, 2110 _bcmFieldSliceSrcClassSelect, 3, 2111 0, 2112 fp_global_mask_tcam_ofs + f3_offset, 10, 2113 0, 0, 0, 0, 0, 0); 2114 2115 2116 2117 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVrf, 2118 _bcmFieldSliceSelFpf3, 1, 2119 _bcmFieldSliceFwdFieldSelect, 2120 _bcmFieldFwdFieldVrf, 2121 fp_global_mask_tcam_ofs + f3_offset + 10, 13); 2122 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVpn, 2123 _bcmFieldSliceSelFpf3, 1, 2124 _bcmFieldSliceFwdFieldSelect, 2125 _bcmFieldFwdFieldVpn, 2126 fp_global_mask_tcam_ofs + f3_offset + 10, 13); 2127 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 2128 bcmFieldQualifyForwardingVlanId, 2129 _bcmFieldSliceSelFpf3, 1, 2130 _bcmFieldSliceFwdFieldSelect, 2131 _bcmFieldFwdFieldVlan, 2132 fp_global_mask_tcam_ofs + f3_offset + 10, 13); 2133 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 2134 _bcmFieldSliceSelFpf3, 1, 2135 fp_global_mask_tcam_ofs + f3_offset + 23, 12); 2136 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL2, 2137 _bcmFieldSliceSelFpf3, 1, 2138 _bcmFieldSliceDstClassSelect, 0, 2139 fp_global_mask_tcam_ofs + f3_offset + 35, 10); 2140 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL3, 2141 _bcmFieldSliceSelFpf3, 1, 2142 _bcmFieldSliceDstClassSelect, 1, 2143 fp_global_mask_tcam_ofs + f3_offset + 35, 10); 2144 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 2145 bcmFieldQualifyDstClassField, 2146 _bcmFieldSliceSelFpf3, 1, 2147 _bcmFieldSliceDstClassSelect, 2, 2148 fp_global_mask_tcam_ofs + f3_offset + 35, 10); 2149 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 2150 bcmFieldQualifySrcClassField, 2151 _bcmFieldSliceSelFpf3, 1, 2152 _bcmFieldSliceDstClassSelect, 3, 2153 fp_global_mask_tcam_ofs + f3_offset + 35, 10); 2154 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTosLower4Bits, 2155 _bcmFieldSliceSelFpf3, 1, 2156 fp_global_mask_tcam_ofs + f3_offset + 45, 4); 2157 2158 2159 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstPort, 2160 _bcmFieldDevSelDisable, 0, 2161 _bcmFieldSliceSelFpf3, 2, 2162 _bcmFieldSliceDstFwdEntitySelect, _bcmFieldFwdEntityGlp, 2163 0, 2164 fp_global_mask_tcam_ofs + f3_offset, 21, 2165 0, 0, 0, 0, 0, 0); 2166 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstTrunk, 2167 _bcmFieldDevSelDisable, 0, 2168 _bcmFieldSliceSelFpf3, 2, 2169 _bcmFieldSliceDstFwdEntitySelect, _bcmFieldFwdEntityGlp, 2170 0, 2171 fp_global_mask_tcam_ofs + f3_offset, 21, 2172 0, 0, 0, 0, 0, 0); 2173 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstMplsGport, 2174 _bcmFieldDevSelDisable, 0, 2175 _bcmFieldSliceSelFpf3, 2, 2176 _bcmFieldSliceDstFwdEntitySelect, _bcmFieldFwdEntityMplsGport, 2177 0, 2178 fp_global_mask_tcam_ofs + f3_offset, 21, 2179 0, 0, 0, 0, 0, 0); 2180 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstMplsGports, 2181 _bcmFieldDevSelDisable, 0, 2182 _bcmFieldSliceSelFpf3, 2, 2183 _bcmFieldSliceDstFwdEntitySelect, _bcmFieldFwdEntityMplsGport, 2184 0, 2185 fp_global_mask_tcam_ofs + f3_offset, 21, 2186 0, 0, 0, 0, 0, 0); 2187 2188 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstNivGport, 2189 _bcmFieldDevSelDisable, 0, 2190 _bcmFieldSliceSelFpf3, 2, 2191 _bcmFieldSliceDstFwdEntitySelect, _bcmFieldFwdEntityNivGport, 2192 0, 2193 fp_global_mask_tcam_ofs + f3_offset, 21, 2194 0, 0, 0, 0, 0, 0); 2195 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstNivGports, 2196 _bcmFieldDevSelDisable, 0, 2197 _bcmFieldSliceSelFpf3, 2, 2198 _bcmFieldSliceDstFwdEntitySelect, _bcmFieldFwdEntityNivGport, 2199 0, 2200 fp_global_mask_tcam_ofs + f3_offset, 21, 2201 0, 0, 0, 0, 0, 0); 2202 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstMimGport, 2203 _bcmFieldDevSelDisable, 0, 2204 _bcmFieldSliceSelFpf3, 2, 2205 _bcmFieldSliceDstFwdEntitySelect, _bcmFieldFwdEntityMimGport, 2206 0, 2207 fp_global_mask_tcam_ofs + f3_offset, 21, 2208 0, 0, 0, 0, 0, 0); 2209 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstMimGports, 2210 _bcmFieldDevSelDisable, 0, 2211 _bcmFieldSliceSelFpf3, 2, 2212 _bcmFieldSliceDstFwdEntitySelect, _bcmFieldFwdEntityMimGport, 2213 0, 2214 fp_global_mask_tcam_ofs + f3_offset, 21, 2215 0, 0, 0, 0, 0, 0); 2216 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstVxlanGport, 2217 _bcmFieldDevSelDisable, 0, 2218 _bcmFieldSliceSelFpf3, 2, 2219 _bcmFieldSliceDstFwdEntitySelect, _bcmFieldFwdEntityVxlanGport, 2220 0, 2221 fp_global_mask_tcam_ofs + f3_offset, 21, 2222 0, 0, 0, 0, 0, 0); 2223 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstVxlanGports, 2224 _bcmFieldDevSelDisable, 0, 2225 _bcmFieldSliceSelFpf3, 2, 2226 _bcmFieldSliceDstFwdEntitySelect, _bcmFieldFwdEntityVxlanGport, 2227 0, 2228 fp_global_mask_tcam_ofs + f3_offset, 21, 2229 0, 0, 0, 0, 0, 0); 2230 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstVlanGport, 2231 _bcmFieldDevSelDisable, 0, 2232 _bcmFieldSliceSelFpf3, 2, 2233 _bcmFieldSliceDstFwdEntitySelect, _bcmFieldFwdEntityVlanGport, 2234 0, 2235 fp_global_mask_tcam_ofs + f3_offset, 21, 2236 0, 0, 0, 0, 0, 0); 2237 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstVlanGports, 2238 _bcmFieldDevSelDisable, 0, 2239 _bcmFieldSliceSelFpf3, 2, 2240 _bcmFieldSliceDstFwdEntitySelect, _bcmFieldFwdEntityVlanGport, 2241 0, 2242 fp_global_mask_tcam_ofs + f3_offset, 21, 2243 0, 0, 0, 0, 0, 0); 2244 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstGport, 2245 _bcmFieldDevSelDisable, 0, 2246 _bcmFieldSliceSelFpf3, 2, 2247 _bcmFieldSliceDstFwdEntitySelect, _bcmFieldFwdEntityCommonGport, 2248 0, 2249 fp_global_mask_tcam_ofs + f3_offset, 21, 2250 0, 0, 0, 0, 0, 0); 2251 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstGports, 2252 _bcmFieldDevSelDisable, 0, 2253 _bcmFieldSliceSelFpf3, 2, 2254 _bcmFieldSliceDstFwdEntitySelect, _bcmFieldFwdEntityCommonGport, 2255 0, 2256 fp_global_mask_tcam_ofs + f3_offset, 21, 2257 0, 0, 0, 0, 0, 0); 2258 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstL3EgressNextHops, 2259 _bcmFieldDevSelDisable, 0, 2260 _bcmFieldSliceSelFpf3, 2, 2261 _bcmFieldSliceDstFwdEntitySelect, _bcmFieldFwdEntityL3Egress, 2262 0, 2263 fp_global_mask_tcam_ofs + f3_offset, 21, 2264 0, 0, 0, 0, 0, 0); 2265 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstMulticastGroup, 2266 _bcmFieldDevSelDisable, 0, 2267 _bcmFieldSliceSelFpf3, 2, 2268 _bcmFieldSliceDstFwdEntitySelect, _bcmFieldFwdEntityMulticastGroup, 2269 0, 2270 fp_global_mask_tcam_ofs + f3_offset, 21, 2271 0, 0, 0, 0, 0, 0); 2272 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstMulticastGroups, 2273 _bcmFieldDevSelDisable, 0, 2274 _bcmFieldSliceSelFpf3, 2, 2275 _bcmFieldSliceDstFwdEntitySelect, _bcmFieldFwdEntityMulticastGroup, 2276 0, 2277 fp_global_mask_tcam_ofs + f3_offset, 21, 2278 0, 0, 0, 0, 0, 0); 2279 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstMultipath, 2280 _bcmFieldDevSelDisable, 0, 2281 _bcmFieldSliceSelFpf3, 2, 2282 _bcmFieldSliceDstFwdEntitySelect, _bcmFieldFwdEntityMultipath, 2283 0, 2284 fp_global_mask_tcam_ofs + f3_offset, 21, 2285 0, 0, 0, 0, 0, 0); 2286 2287 2288 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcPort, 2289 _bcmFieldSliceSelFpf3, 2, 2290 _bcmFieldSliceIngressEntitySelect, 2291 _bcmFieldFwdEntityGlp, 2292 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 2293 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcTrunk, 2294 _bcmFieldSliceSelFpf3, 2, 2295 _bcmFieldSliceIngressEntitySelect, 2296 _bcmFieldFwdEntityGlp, 2297 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 2298 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 2299 bcmFieldQualifySrcMplsGport, 2300 _bcmFieldSliceSelFpf3, 2, 2301 _bcmFieldSliceIngressEntitySelect, 2302 _bcmFieldFwdEntityMplsGport, 2303 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 2304 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 2305 bcmFieldQualifySrcMplsGports, 2306 _bcmFieldSliceSelFpf3, 2, 2307 _bcmFieldSliceIngressEntitySelect, 2308 _bcmFieldFwdEntityMplsGport, 2309 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 2310 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 2311 bcmFieldQualifySrcNivGport, 2312 _bcmFieldSliceSelFpf3, 2, 2313 _bcmFieldSliceIngressEntitySelect, 2314 _bcmFieldFwdEntityNivGport, 2315 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 2316 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 2317 bcmFieldQualifySrcNivGports, 2318 _bcmFieldSliceSelFpf3, 2, 2319 _bcmFieldSliceIngressEntitySelect, 2320 _bcmFieldFwdEntityNivGport, 2321 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 2322 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMimGport, 2323 _bcmFieldSliceSelFpf3, 2, 2324 _bcmFieldSliceIngressEntitySelect, 2325 _bcmFieldFwdEntityMimGport, 2326 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 2327 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMimGports, 2328 _bcmFieldSliceSelFpf3, 2, 2329 _bcmFieldSliceIngressEntitySelect, 2330 _bcmFieldFwdEntityMimGport, 2331 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 2332 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVxlanGport, 2333 _bcmFieldSliceSelFpf3, 2, 2334 _bcmFieldSliceIngressEntitySelect, 2335 _bcmFieldFwdEntityVxlanGport, 2336 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 2337 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVxlanGports, 2338 _bcmFieldSliceSelFpf3, 2, 2339 _bcmFieldSliceIngressEntitySelect, 2340 _bcmFieldFwdEntityVxlanGport, 2341 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 2342 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVlanGport, 2343 _bcmFieldSliceSelFpf3, 2, 2344 _bcmFieldSliceIngressEntitySelect, 2345 _bcmFieldFwdEntityVlanGport, 2346 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 2347 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVlanGports, 2348 _bcmFieldSliceSelFpf3, 2, 2349 _bcmFieldSliceIngressEntitySelect, 2350 _bcmFieldFwdEntityVlanGport, 2351 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 2352 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcModPortGport, 2353 _bcmFieldSliceSelFpf3, 2, 2354 _bcmFieldSliceIngressEntitySelect, 2355 _bcmFieldFwdEntityModPortGport, 2356 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 2357 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcModPortGports, 2358 _bcmFieldSliceSelFpf3, 2, 2359 _bcmFieldSliceIngressEntitySelect, 2360 _bcmFieldFwdEntityModPortGport, 2361 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 2362 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcTrunkMemberGport, 2363 _bcmFieldSliceSelFpf3, 2, 2364 _bcmFieldSliceIngressEntitySelect, 2365 _bcmFieldFwdEntityModPortGport, 2366 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 2367 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcModuleGport, 2368 _bcmFieldSliceSelFpf3, 2, 2369 _bcmFieldSliceIngressEntitySelect, 2370 _bcmFieldFwdEntityModPortGport, 2371 fp_global_mask_tcam_ofs + f3_offset + 28, 8); 2372 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTrunkMemberSourceModuleId, 2373 _bcmFieldSliceSelFpf3, 2, 2374 _bcmFieldSliceIngressEntitySelect, 2375 _bcmFieldFwdEntityModPortGport, 2376 fp_global_mask_tcam_ofs + f3_offset + 28, 8); 2377 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcGport, 2378 _bcmFieldSliceSelFpf3, 2, 2379 _bcmFieldSliceIngressEntitySelect, 2380 _bcmFieldFwdEntityCommonGport, 2381 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 2382 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcGports, 2383 _bcmFieldSliceSelFpf3, 2, 2384 _bcmFieldSliceIngressEntitySelect, 2385 _bcmFieldFwdEntityCommonGport, 2386 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 2387 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMHOpcode, 2388 _bcmFieldSliceSelFpf3, 2, 2389 fp_global_mask_tcam_ofs + f3_offset + 37, 3); 2390 2391 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan, 2392 _bcmFieldDevSelDisable, 0, 2393 _bcmFieldSliceSelFpf3, 3, 2394 _bcmFieldSliceSelDisable, 0, 2395 0, 2396 fp_global_mask_tcam_ofs + f3_offset, 16, 2397 0, 0, 0, 0, 0, 0); 2398 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 2399 _bcmFieldDevSelDisable, 0, 2400 _bcmFieldSliceSelFpf3, 3, 2401 _bcmFieldSliceSelDisable, 0, 2402 0, 2403 fp_global_mask_tcam_ofs + f3_offset, 12, 2404 0, 0, 0, 0, 0, 0); 2405 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi, 2406 _bcmFieldSliceSelFpf3, 3, 2407 fp_global_mask_tcam_ofs + f3_offset + 12, 1); 2408 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri, 2409 _bcmFieldSliceSelFpf3, 3, 2410 fp_global_mask_tcam_ofs + f3_offset + 13, 3); 2411 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVlanFormat, 2412 _bcmFieldSliceSelFpf3, 3, 2413 fp_global_mask_tcam_ofs + f3_offset + 16, 2); 2414 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2Format, 2415 _bcmFieldSliceSelFpf3, 3, 2416 fp_global_mask_tcam_ofs + f3_offset + 18, 2); 2417 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTranslatedVlanFormat, 2418 _bcmFieldSliceSelFpf3, 3, 2419 fp_global_mask_tcam_ofs + f3_offset + 20, 2); 2420 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMHOpcode, 2421 _bcmFieldSliceSelFpf3, 3, 2422 fp_global_mask_tcam_ofs + f3_offset + 22, 3); 2423 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyPacketRes, 2424 _bcmFieldSliceSelFpf3, 3, 2425 fp_global_mask_tcam_ofs + f3_offset + 25, 6); 2426 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpFrag, 2427 _bcmFieldSliceSelFpf3, 3, 2428 fp_global_mask_tcam_ofs + f3_offset + 31, 2); 2429 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyEtherType, 2430 _bcmFieldSliceSelFpf3, 3, 2431 fp_global_mask_tcam_ofs + f3_offset + 33, 16); 2432 2433 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan, 2434 _bcmFieldDevSelDisable, 0, 2435 _bcmFieldSliceSelFpf3, 4, 2436 _bcmFieldSliceSelDisable, 0, 2437 0, 2438 fp_global_mask_tcam_ofs + f3_offset, 16, 2439 0, 0, 0, 0, 0, 0); 2440 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 2441 _bcmFieldDevSelDisable, 0, 2442 _bcmFieldSliceSelFpf3, 4, 2443 _bcmFieldSliceSelDisable, 0, 2444 0, 2445 fp_global_mask_tcam_ofs + f3_offset, 12, 2446 0, 0, 0, 0, 0, 0); 2447 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi, 2448 _bcmFieldSliceSelFpf3, 4, 2449 fp_global_mask_tcam_ofs + f3_offset + 12, 1); 2450 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri, 2451 _bcmFieldSliceSelFpf3, 4, 2452 fp_global_mask_tcam_ofs + f3_offset + 13, 3); 2453 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlan, 2454 _bcmFieldSliceSelFpf3, 4, 2455 fp_global_mask_tcam_ofs + f3_offset + 16, 16); 2456 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanId, 2457 _bcmFieldSliceSelFpf3, 4, 2458 fp_global_mask_tcam_ofs + f3_offset + 16, 12); 2459 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanCfi, 2460 _bcmFieldSliceSelFpf3, 4, 2461 fp_global_mask_tcam_ofs + f3_offset + 28, 1); 2462 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanPri, 2463 _bcmFieldSliceSelFpf3, 4, 2464 fp_global_mask_tcam_ofs + f3_offset + 29, 3); 2465 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIntPriority, 2466 _bcmFieldSliceSelFpf3, 4, 2467 fp_global_mask_tcam_ofs + f3_offset + 32, 4); 2468 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyColor, 2469 _bcmFieldSliceSelFpf3, 4, 2470 fp_global_mask_tcam_ofs + f3_offset + 36, 2); 2471 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstIpLocal, 2472 _bcmFieldSliceSelFpf3, 4, 2473 fp_global_mask_tcam_ofs + f3_offset + 38, 1); 2474 2475 2476 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan, 2477 _bcmFieldDevSelDisable, 0, 2478 _bcmFieldSliceSelFpf3, 5, 2479 _bcmFieldSliceSelDisable, 0, 2480 0, 2481 fp_global_mask_tcam_ofs + f3_offset, 16, 2482 0, 0, 0, 0, 0, 0); 2483 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 2484 _bcmFieldDevSelDisable, 0, 2485 _bcmFieldSliceSelFpf3, 5, 2486 _bcmFieldSliceSelDisable, 0, 2487 0, 2488 fp_global_mask_tcam_ofs + f3_offset, 12, 2489 0, 0, 0, 0, 0, 0); 2490 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi, 2491 _bcmFieldSliceSelFpf3, 5, 2492 fp_global_mask_tcam_ofs + f3_offset + 12, 1); 2493 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri, 2494 _bcmFieldSliceSelFpf3, 5, 2495 fp_global_mask_tcam_ofs + f3_offset + 13, 3); 2496 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyEtherType, 2497 _bcmFieldSliceSelFpf3, 5, 2498 fp_global_mask_tcam_ofs + f3_offset + 16, 16); 2499 if (soc_feature(unit, soc_feature_fcoe)) { 2500 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanOuter, 2501 _bcmFieldSliceSelFpf3, 5, 2502 fp_global_mask_tcam_ofs + f3_offset + 32, 3); 2503 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanInner, 2504 _bcmFieldSliceSelFpf3, 5, 2505 fp_global_mask_tcam_ofs + f3_offset + 35, 3); 2506 } 2507 2508 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVlanTranslationHit, 2509 _bcmFieldSliceSelFpf3, 6, 2510 fp_global_mask_tcam_ofs + f3_offset + 0, 3); 2511 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyForwardingVlanValid, 2512 _bcmFieldSliceSelFpf3, 6, 2513 fp_global_mask_tcam_ofs + f3_offset + 3, 1); 2514 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIngressStpState, 2515 _bcmFieldSliceSelFpf3, 6, 2516 fp_global_mask_tcam_ofs + f3_offset + 4, 2); 2517 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2SrcHit, 2518 _bcmFieldSliceSelFpf3, 6, 2519 fp_global_mask_tcam_ofs + f3_offset + 6, 1); 2520 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2SrcStatic, 2521 _bcmFieldSliceSelFpf3, 6, 2522 fp_global_mask_tcam_ofs + f3_offset + 7, 1); 2523 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2DestHit, 2524 _bcmFieldSliceSelFpf3, 6, 2525 fp_global_mask_tcam_ofs + f3_offset + 8, 1); 2526 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2CacheHit, 2527 _bcmFieldSliceSelFpf3, 6, 2528 fp_global_mask_tcam_ofs + f3_offset + 9, 1); 2529 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3SrcHostHit, 2530 _bcmFieldSliceSelFpf3, 6, 2531 fp_global_mask_tcam_ofs + f3_offset + 10, 1); 2532 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpmcStarGroupHit, 2533 _bcmFieldSliceSelFpf3, 6, 2534 fp_global_mask_tcam_ofs + f3_offset + 10, 1); 2535 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3DestHostHit, 2536 _bcmFieldSliceSelFpf3, 6, 2537 fp_global_mask_tcam_ofs + f3_offset + 11, 1); 2538 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3DestRouteHit, 2539 _bcmFieldSliceSelFpf3, 6, 2540 fp_global_mask_tcam_ofs + f3_offset + 12, 1); 2541 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2StationMove, 2542 _bcmFieldSliceSelFpf3, 6, 2543 fp_global_mask_tcam_ofs + f3_offset + 13, 1); 2544 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDosAttack, 2545 _bcmFieldSliceSelFpf3, 6, 2546 fp_global_mask_tcam_ofs + f3_offset + 14, 1); 2547 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpTunnelHit, 2548 _bcmFieldSliceSelFpf3, 6, 2549 fp_global_mask_tcam_ofs + f3_offset + 15, 1); 2550 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMplsLabel1Hit, 2551 _bcmFieldSliceSelFpf3, 6, 2552 fp_global_mask_tcam_ofs + f3_offset + 16, 1); 2553 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTrillEgressRbridgeHit, 2554 _bcmFieldSliceSelFpf3, 6, 2555 fp_global_mask_tcam_ofs + f3_offset + 16, 1); 2556 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2GreSrcIpHit, 2557 _bcmFieldSliceSelFpf3, 6, 2558 fp_global_mask_tcam_ofs + f3_offset + 16, 1); 2559 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMimSrcGportHit, 2560 _bcmFieldSliceSelFpf3, 6, 2561 fp_global_mask_tcam_ofs + f3_offset + 16, 1); 2562 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMplsLabel2Hit, 2563 _bcmFieldSliceSelFpf3, 6, 2564 fp_global_mask_tcam_ofs + f3_offset + 17, 1); 2565 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTrillIngressRbridgeHit, 2566 _bcmFieldSliceSelFpf3, 6, 2567 fp_global_mask_tcam_ofs + f3_offset + 17, 1); 2568 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2GreVfiHit, 2569 _bcmFieldSliceSelFpf3, 6, 2570 fp_global_mask_tcam_ofs + f3_offset + 17, 1); 2571 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMimVfiHit, 2572 _bcmFieldSliceSelFpf3, 6, 2573 fp_global_mask_tcam_ofs + f3_offset + 17, 1); 2574 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMplsTerminated, 2575 _bcmFieldSliceSelFpf3, 6, 2576 fp_global_mask_tcam_ofs + f3_offset + 18, 1); 2577 2578 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyPacketRes, 2579 _bcmFieldSliceSelFpf3, 6, 2580 fp_global_mask_tcam_ofs + f3_offset + 20, 6); 2581 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlan, 2582 _bcmFieldSliceSelFpf3, 6, 2583 fp_global_mask_tcam_ofs + f3_offset + 26, 16); 2584 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanId, 2585 _bcmFieldSliceSelFpf3, 6, 2586 fp_global_mask_tcam_ofs + f3_offset + 26, 12); 2587 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanCfi, 2588 _bcmFieldSliceSelFpf3, 6, 2589 fp_global_mask_tcam_ofs + f3_offset + 38, 1); 2590 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanPri, 2591 _bcmFieldSliceSelFpf3, 6, 2592 fp_global_mask_tcam_ofs + f3_offset + 39, 3); 2593 2594 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyRangeCheck, 2595 _bcmFieldDevSelDisable, 0, 2596 _bcmFieldSliceSelFpf3, 7, 2597 _bcmFieldSliceSelDisable, 0, 2598 0, 2599 fp_global_mask_tcam_ofs + f3_offset, 24, 2600 0, 0, 0, 0, 0, 0); 2601 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, _bcmFieldQualifyRangeCheckBits24_31, 2602 _bcmFieldSliceSelFpf3, 7, 2603 _bcmFieldSliceIntfClassSelect, 3, 2604 fp_global_mask_tcam_ofs + f3_offset + 24, 8); 2605 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassPort, 2606 _bcmFieldSliceSelFpf3, 7, 2607 _bcmFieldSliceIntfClassSelect, 0, 2608 fp_global_mask_tcam_ofs + f3_offset + 24, 12); 2609 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassVPort, 2610 _bcmFieldSliceSelFpf3, 7, 2611 _bcmFieldSliceIntfClassSelect, 1, 2612 fp_global_mask_tcam_ofs + f3_offset + 24, 12); 2613 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassL2, 2614 _bcmFieldSliceSelFpf3, 7, 2615 _bcmFieldSliceIntfClassSelect, 2, 2616 fp_global_mask_tcam_ofs + f3_offset + 24, 12); 2617 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassL3, 2618 _bcmFieldSliceSelFpf3, 7, 2619 _bcmFieldSliceIntfClassSelect, 4, 2620 fp_global_mask_tcam_ofs + f3_offset + 24, 12); 2621 2622 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyIp6FlowLabel, 2623 _bcmFieldDevSelDisable, 0, 2624 _bcmFieldSliceSelFpf3, 8, 2625 _bcmFieldSliceSelDisable, 0, 2626 0, 2627 fp_global_mask_tcam_ofs + f3_offset, 20, 2628 0, 0, 0, 0, 0, 0); 2629 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVlanFormat, 2630 _bcmFieldSliceSelFpf3, 8, 2631 fp_global_mask_tcam_ofs + f3_offset + 20, 2); 2632 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2Format, 2633 _bcmFieldSliceSelFpf3, 8, 2634 fp_global_mask_tcam_ofs + f3_offset + 22, 2); 2635 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTranslatedVlanFormat, 2636 _bcmFieldSliceSelFpf3, 8, 2637 fp_global_mask_tcam_ofs + f3_offset + 24, 2); 2638 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerTpid, 2639 _bcmFieldSliceSelFpf3, 8, 2640 fp_global_mask_tcam_ofs + f3_offset + 26, 2); 2641 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterTpid, 2642 _bcmFieldSliceSelFpf3, 8, 2643 fp_global_mask_tcam_ofs + f3_offset + 28, 2); 2644 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, _bcmFieldQualifyData3, 2645 _bcmFieldDevSelDisable, 0, 2646 _bcmFieldSliceSelFpf3, 9, 2647 _bcmFieldSliceSelDisable, 0, 2648 0, 2649 fp_global_mask_tcam_ofs + f3_offset, 32, 2650 0, 0, 0, 0, 0, 0); 2651 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyGenericAssociatedChannelLabelValid, 2652 _bcmFieldSliceSelFpf3, 9, 2653 fp_global_mask_tcam_ofs + f3_offset + 32, 1); 2654 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyRouterAlertLabelValid, 2655 _bcmFieldSliceSelFpf3, 9, 2656 fp_global_mask_tcam_ofs + f3_offset + 33, 1); 2657 2658 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstPort, 2659 _bcmFieldDevSelDisable, 0, 2660 _bcmFieldSliceSelFpf3, 10, 2661 _bcmFieldSliceDstFwdEntitySelect, _bcmFieldFwdEntityGlp, 2662 0, 2663 fp_global_mask_tcam_ofs + f3_offset, 21, 2664 0, 0, 0, 0, 0, 0); 2665 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstTrunk, 2666 _bcmFieldDevSelDisable, 0, 2667 _bcmFieldSliceSelFpf3, 10, 2668 _bcmFieldSliceDstFwdEntitySelect, _bcmFieldFwdEntityGlp, 2669 0, 2670 fp_global_mask_tcam_ofs + f3_offset, 21, 2671 0, 0, 0, 0, 0, 0); 2672 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstMplsGport, 2673 _bcmFieldDevSelDisable, 0, 2674 _bcmFieldSliceSelFpf3, 10, 2675 _bcmFieldSliceDstFwdEntitySelect, _bcmFieldFwdEntityMplsGport, 2676 0, 2677 fp_global_mask_tcam_ofs + f3_offset, 21, 2678 0, 0, 0, 0, 0, 0); 2679 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstMplsGports, 2680 _bcmFieldDevSelDisable, 0, 2681 _bcmFieldSliceSelFpf3, 10, 2682 _bcmFieldSliceDstFwdEntitySelect, _bcmFieldFwdEntityMplsGport, 2683 0, 2684 fp_global_mask_tcam_ofs + f3_offset, 21, 2685 0, 0, 0, 0, 0, 0); 2686 2687 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstNivGport, 2688 _bcmFieldDevSelDisable, 0, 2689 _bcmFieldSliceSelFpf3, 10, 2690 _bcmFieldSliceDstFwdEntitySelect, _bcmFieldFwdEntityNivGport, 2691 0, 2692 fp_global_mask_tcam_ofs + f3_offset, 21, 2693 0, 0, 0, 0, 0, 0); 2694 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstNivGports, 2695 _bcmFieldDevSelDisable, 0, 2696 _bcmFieldSliceSelFpf3, 10, 2697 _bcmFieldSliceDstFwdEntitySelect, _bcmFieldFwdEntityNivGport, 2698 0, 2699 fp_global_mask_tcam_ofs + f3_offset, 21, 2700 0, 0, 0, 0, 0, 0); 2701 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstMimGport, 2702 _bcmFieldDevSelDisable, 0, 2703 _bcmFieldSliceSelFpf3, 10, 2704 _bcmFieldSliceDstFwdEntitySelect, _bcmFieldFwdEntityMimGport, 2705 0, 2706 fp_global_mask_tcam_ofs + f3_offset, 21, 2707 0, 0, 0, 0, 0, 0); 2708 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstMimGports, 2709 _bcmFieldDevSelDisable, 0, 2710 _bcmFieldSliceSelFpf3, 10, 2711 _bcmFieldSliceDstFwdEntitySelect, _bcmFieldFwdEntityMimGport, 2712 0, 2713 fp_global_mask_tcam_ofs + f3_offset, 21, 2714 0, 0, 0, 0, 0, 0); 2715 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstVxlanGport, 2716 _bcmFieldDevSelDisable, 0, 2717 _bcmFieldSliceSelFpf3, 10, 2718 _bcmFieldSliceDstFwdEntitySelect, _bcmFieldFwdEntityVxlanGport, 2719 0, 2720 fp_global_mask_tcam_ofs + f3_offset, 21, 2721 0, 0, 0, 0, 0, 0); 2722 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstVxlanGports, 2723 _bcmFieldDevSelDisable, 0, 2724 _bcmFieldSliceSelFpf3, 10, 2725 _bcmFieldSliceDstFwdEntitySelect, _bcmFieldFwdEntityVxlanGport, 2726 0, 2727 fp_global_mask_tcam_ofs + f3_offset, 21, 2728 0, 0, 0, 0, 0, 0); 2729 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstVlanGport, 2730 _bcmFieldDevSelDisable, 0, 2731 _bcmFieldSliceSelFpf3, 10, 2732 _bcmFieldSliceDstFwdEntitySelect, _bcmFieldFwdEntityVlanGport, 2733 0, 2734 fp_global_mask_tcam_ofs + f3_offset, 21, 2735 0, 0, 0, 0, 0, 0); 2736 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstVlanGports, 2737 _bcmFieldDevSelDisable, 0, 2738 _bcmFieldSliceSelFpf3, 10, 2739 _bcmFieldSliceDstFwdEntitySelect, _bcmFieldFwdEntityVlanGport, 2740 0, 2741 fp_global_mask_tcam_ofs + f3_offset, 21, 2742 0, 0, 0, 0, 0, 0); 2743 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstGport, 2744 _bcmFieldDevSelDisable, 0, 2745 _bcmFieldSliceSelFpf3, 10, 2746 _bcmFieldSliceDstFwdEntitySelect, _bcmFieldFwdEntityCommonGport, 2747 0, 2748 fp_global_mask_tcam_ofs + f3_offset, 21, 2749 0, 0, 0, 0, 0, 0); 2750 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstGports, 2751 _bcmFieldDevSelDisable, 0, 2752 _bcmFieldSliceSelFpf3, 10, 2753 _bcmFieldSliceDstFwdEntitySelect, _bcmFieldFwdEntityCommonGport, 2754 0, 2755 fp_global_mask_tcam_ofs + f3_offset, 21, 2756 0, 0, 0, 0, 0, 0); 2757 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstL3EgressNextHops, 2758 _bcmFieldDevSelDisable, 0, 2759 _bcmFieldSliceSelFpf3, 10, 2760 _bcmFieldSliceDstFwdEntitySelect, _bcmFieldFwdEntityL3Egress, 2761 0, 2762 fp_global_mask_tcam_ofs + f3_offset, 21, 2763 0, 0, 0, 0, 0, 0); 2764 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstMulticastGroup, 2765 _bcmFieldDevSelDisable, 0, 2766 _bcmFieldSliceSelFpf3, 10, 2767 _bcmFieldSliceDstFwdEntitySelect, _bcmFieldFwdEntityMulticastGroup, 2768 0, 2769 fp_global_mask_tcam_ofs + f3_offset, 21, 2770 0, 0, 0, 0, 0, 0); 2771 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstMulticastGroups, 2772 _bcmFieldDevSelDisable, 0, 2773 _bcmFieldSliceSelFpf3, 10, 2774 _bcmFieldSliceDstFwdEntitySelect, _bcmFieldFwdEntityMulticastGroup, 2775 0, 2776 fp_global_mask_tcam_ofs + f3_offset, 21, 2777 0, 0, 0, 0, 0, 0); 2778 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstMultipath, 2779 _bcmFieldDevSelDisable, 0, 2780 _bcmFieldSliceSelFpf3, 10, 2781 _bcmFieldSliceDstFwdEntitySelect, _bcmFieldFwdEntityMultipath, 2782 0, 2783 fp_global_mask_tcam_ofs + f3_offset, 21, 2784 0, 0, 0, 0, 0, 0); 2785 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstPort, 2786 _bcmFieldSliceSelFpf3, 10, 2787 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 2788 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstTrunk, 2789 _bcmFieldSliceSelFpf3, 10, 2790 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 2791 #if defined(BCM_MONTEREY_SUPPORT) && defined(INCLUDE_XFLOW_MACSEC) 2792 if (SOC_IS_MONTEREY(unit)) { 2793 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMacSecTagPresent, 2794 _bcmFieldSliceSelFpf3, 10, 2795 fp_global_mask_tcam_ofs + f3_offset + 37, 1); 2796 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMacSecTag, 2797 _bcmFieldSliceSelFpf3, 10, 2798 fp_global_mask_tcam_ofs + f3_offset + 38, 8); 2799 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMacSecDstMacRangeHit, 2800 _bcmFieldSliceSelFpf3, 10, 2801 fp_global_mask_tcam_ofs + f3_offset + 46, 1); 2802 } 2803 #endif 2804 2805 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifySrcPort, 2806 _bcmFieldDevSelDisable, 0, 2807 _bcmFieldSliceSelFpf3, 11, 2808 _bcmFieldSliceSelDisable, 0, 2809 0, 2810 fp_global_mask_tcam_ofs + f3_offset, 16, 2811 0, 0, 0, 0, 0, 0); 2812 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifySrcTrunk, 2813 _bcmFieldDevSelDisable, 0, 2814 _bcmFieldSliceSelFpf3, 11, 2815 _bcmFieldSliceSelDisable, 0, 2816 0, 2817 fp_global_mask_tcam_ofs + f3_offset, 16, 2818 0, 0, 0, 0, 0, 0); 2819 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifySrcModPortGport, 2820 _bcmFieldDevSelDisable, 0, 2821 _bcmFieldSliceSelFpf3, 11, 2822 _bcmFieldSliceSelDisable, 0, 2823 0, 2824 fp_global_mask_tcam_ofs + f3_offset, 16, 2825 0, 0, 0, 0, 0, 0); 2826 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifySrcModPortGports, 2827 _bcmFieldDevSelDisable, 0, 2828 _bcmFieldSliceSelFpf3, 11, 2829 _bcmFieldSliceSelDisable, 0, 2830 0, 2831 fp_global_mask_tcam_ofs + f3_offset, 16, 2832 0, 0, 0, 0, 0, 0); 2833 2834 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcModuleGport, 2835 _bcmFieldSliceSelFpf3, 11, 2836 fp_global_mask_tcam_ofs + f3_offset + 7, 8); 2837 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMplsGport, 2838 _bcmFieldSliceSelFpf3, 11, 2839 _bcmFieldSliceIngressEntitySelect, 2840 _bcmFieldFwdEntityMplsGport, 2841 fp_global_mask_tcam_ofs + f3_offset + 16, 16); 2842 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMplsGports, 2843 _bcmFieldSliceSelFpf3, 11, 2844 _bcmFieldSliceIngressEntitySelect, 2845 _bcmFieldFwdEntityMplsGport, 2846 fp_global_mask_tcam_ofs + f3_offset + 16, 16); 2847 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcNivGport, 2848 _bcmFieldSliceSelFpf3, 11, 2849 _bcmFieldSliceIngressEntitySelect, 2850 _bcmFieldFwdEntityNivGport, 2851 fp_global_mask_tcam_ofs + f3_offset + 16, 16); 2852 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcNivGports, 2853 _bcmFieldSliceSelFpf3, 11, 2854 _bcmFieldSliceIngressEntitySelect, 2855 _bcmFieldFwdEntityNivGport, 2856 fp_global_mask_tcam_ofs + f3_offset + 16, 16); 2857 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMimGport, 2858 _bcmFieldSliceSelFpf3, 11, 2859 _bcmFieldSliceIngressEntitySelect, 2860 _bcmFieldFwdEntityMimGport, 2861 fp_global_mask_tcam_ofs + f3_offset + 16, 16); 2862 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMimGports, 2863 _bcmFieldSliceSelFpf3, 11, 2864 _bcmFieldSliceIngressEntitySelect, 2865 _bcmFieldFwdEntityMimGport, 2866 fp_global_mask_tcam_ofs + f3_offset + 16, 16); 2867 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVxlanGport, 2868 _bcmFieldSliceSelFpf3, 11, 2869 _bcmFieldSliceIngressEntitySelect, 2870 _bcmFieldFwdEntityVxlanGport, 2871 fp_global_mask_tcam_ofs + f3_offset + 16, 16); 2872 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVxlanGports, 2873 _bcmFieldSliceSelFpf3, 11, 2874 _bcmFieldSliceIngressEntitySelect, 2875 _bcmFieldFwdEntityVxlanGport, 2876 fp_global_mask_tcam_ofs + f3_offset + 16, 16); 2877 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVlanGport, 2878 _bcmFieldSliceSelFpf3, 11, 2879 _bcmFieldSliceIngressEntitySelect, 2880 _bcmFieldFwdEntityVlanGport, 2881 fp_global_mask_tcam_ofs + f3_offset + 16, 16); 2882 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVlanGports, 2883 _bcmFieldSliceSelFpf3, 11, 2884 _bcmFieldSliceIngressEntitySelect, 2885 _bcmFieldFwdEntityVlanGport, 2886 fp_global_mask_tcam_ofs + f3_offset + 16, 16); 2887 #if defined(BCM_MONTEREY_SUPPORT) && defined(INCLUDE_XFLOW_MACSEC) 2888 if (SOC_IS_MONTEREY(unit)) { 2889 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMacSecTagPresent, 2890 _bcmFieldSliceSelFpf3, 11, 2891 fp_global_mask_tcam_ofs + f3_offset + 32, 1); 2892 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMacSecTag, 2893 _bcmFieldSliceSelFpf3, 11, 2894 fp_global_mask_tcam_ofs + f3_offset + 33, 8); 2895 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMacSecDstMacRangeHit, 2896 _bcmFieldSliceSelFpf3, 11, 2897 fp_global_mask_tcam_ofs + f3_offset + 41, 1); 2898 } 2899 #endif 2900 2901 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMplsControlWordValid, 2902 _bcmFieldSliceSelFpf3, 12, 2903 fp_global_mask_tcam_ofs + f3_offset + 36, 1); 2904 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyColor, 2905 _bcmFieldSliceSelFpf3, 12, 2906 fp_global_mask_tcam_ofs + f3_offset + 41, 2); 2907 if (soc_feature(unit, soc_feature_fp_based_oam)) { 2908 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOamType, 2909 _bcmFieldSliceSelFpf3, 12, 2910 fp_global_mask_tcam_ofs + f3_offset + 43, 1); 2911 } 2912 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIntPriority, 2913 _bcmFieldSliceSelFpf3, 12, 2914 fp_global_mask_tcam_ofs + f3_offset + 37, 4); 2915 2916 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyVnTag, 2917 _bcmFieldDevSelDisable, 0, 2918 _bcmFieldSliceSelFpf3, 12, 2919 _bcmFieldSliceAuxTag2Select, _bcmFieldAuxTagVn, 2920 0, 2921 fp_global_mask_tcam_ofs + f3_offset, 33, 2922 0, 0, 0, 0, 0, 0); 2923 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyCnTag, 2924 _bcmFieldDevSelDisable, 0, 2925 _bcmFieldSliceSelFpf3, 12, 2926 _bcmFieldSliceAuxTag2Select, _bcmFieldAuxTagCn, 2927 0, 2928 fp_global_mask_tcam_ofs + f3_offset, 33, 2929 0, 0, 0, 0, 0, 0); 2930 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyFabricQueueTag, 2931 _bcmFieldDevSelDisable, 0, 2932 _bcmFieldSliceSelFpf3, 12, 2933 _bcmFieldSliceAuxTag2Select, _bcmFieldAuxTagFabricQueue, 2934 0, 2935 fp_global_mask_tcam_ofs + f3_offset, 33, 2936 0, 0, 0, 0, 0, 0); 2937 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyMplsForwardingLabel, 2938 _bcmFieldDevSelDisable, 0, 2939 _bcmFieldSliceSelFpf3, 12, 2940 _bcmFieldSliceAuxTag2Select, _bcmFieldAuxTagMplsFwdingLabel, 2941 0, 2942 fp_global_mask_tcam_ofs + f3_offset, 33, 2943 0, 0, 0, 0, 0, 0); 2944 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyMplsForwardingLabelTtl, 2945 _bcmFieldDevSelDisable, 0, 2946 _bcmFieldSliceSelFpf3, 12, 2947 _bcmFieldSliceAuxTag2Select, _bcmFieldAuxTagMplsFwdingLabel, 2948 0, 2949 fp_global_mask_tcam_ofs + f3_offset, 8, 2950 fp_global_mask_tcam_ofs + f3_offset + 32, 1, 2951 0, 0, 0, 0); 2952 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyMplsForwardingLabelBos, 2953 _bcmFieldDevSelDisable, 0, 2954 _bcmFieldSliceSelFpf3, 12, 2955 _bcmFieldSliceAuxTag2Select, _bcmFieldAuxTagMplsFwdingLabel, 2956 0, 2957 fp_global_mask_tcam_ofs + f3_offset + 8, 1, 2958 fp_global_mask_tcam_ofs + f3_offset + 32, 1, 2959 0, 0, 2960 0 2961 ); 2962 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyMplsForwardingLabelExp, 2963 _bcmFieldDevSelDisable, 0, 2964 _bcmFieldSliceSelFpf3, 12, 2965 _bcmFieldSliceAuxTag2Select, _bcmFieldAuxTagMplsFwdingLabel, 2966 0, 2967 fp_global_mask_tcam_ofs + f3_offset + 9, 3, 2968 fp_global_mask_tcam_ofs + f3_offset + 32, 1, 2969 0, 0, 2970 0 2971 ); 2972 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyMplsForwardingLabelId, 2973 _bcmFieldSliceSelFpf3, 12, 2974 _bcmFieldSliceAuxTag2Select, _bcmFieldAuxTagMplsFwdingLabel, 2975 fp_global_mask_tcam_ofs + f3_offset + 12, 21 2976 ); 2977 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyMplsControlWord, 2978 _bcmFieldDevSelDisable, 0, 2979 _bcmFieldSliceSelFpf3, 12, 2980 _bcmFieldSliceAuxTag2Select, _bcmFieldAuxTagMplsCntlWord, 2981 0, 2982 fp_global_mask_tcam_ofs + f3_offset, 33, 2983 0, 0, 0, 0, 0, 0); 2984 2985 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyRtag7AHashUpper, 2986 _bcmFieldSliceSelFpf3, 12, 2987 _bcmFieldSliceAuxTag2Select, 2988 _bcmFieldAuxTagRtag7A, 2989 fp_global_mask_tcam_ofs + f3_offset + 16, 17); 2990 2991 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyRtag7BHashUpper, 2992 _bcmFieldSliceSelFpf3, 12, 2993 _bcmFieldSliceAuxTag2Select, 2994 _bcmFieldAuxTagRtag7B, 2995 fp_global_mask_tcam_ofs + f3_offset + 16, 17); 2996 2997 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyRtag7AHashLower, 2998 _bcmFieldDevSelDisable, 0, 2999 _bcmFieldSliceSelFpf3, 12, 3000 _bcmFieldSliceAuxTag2Select, _bcmFieldAuxTagRtag7A, 3001 0, 3002 fp_global_mask_tcam_ofs + f3_offset, 16, 3003 fp_global_mask_tcam_ofs + f3_offset + 32, 1, 3004 0, 0, 3005 0, 0); 3006 3007 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyRtag7BHashLower, 3008 _bcmFieldDevSelDisable, 0, 3009 _bcmFieldSliceSelFpf3, 12, 3010 _bcmFieldSliceAuxTag2Select, _bcmFieldAuxTagRtag7B, 3011 0, 3012 fp_global_mask_tcam_ofs + f3_offset, 16, 3013 fp_global_mask_tcam_ofs + f3_offset + 32, 1, 3014 0, 0, 3015 0, 0); 3016 3017 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyVxlanNetworkId, 3018 _bcmFieldDevSelDisable, 0, 3019 _bcmFieldSliceSelFpf3, 12, 3020 _bcmFieldSliceAuxTag2Select, _bcmFieldAuxTagVxlanOrLLTag, 3021 0, 3022 fp_global_mask_tcam_ofs + f3_offset, 24, 3023 0, 0, 0, 0, 0, 0); 3024 3025 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVxlanFlags, 3026 _bcmFieldSliceSelFpf3, 12, 3027 _bcmFieldSliceAuxTag2Select, 3028 _bcmFieldAuxTagVxlanOrLLTag, 3029 fp_global_mask_tcam_ofs + f3_offset + 24, 8); 3030 3031 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyVxlanHeaderBits8_31, 3032 _bcmFieldDevSelDisable, 0, 3033 _bcmFieldSliceSelFpf3, 12, 3034 _bcmFieldSliceAuxTag2Select, _bcmFieldAuxTagVxlanReserved, 3035 0, 3036 fp_global_mask_tcam_ofs + f3_offset, 24, 3037 0, 0, 0, 0, 0, 0); 3038 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVxlanHeaderBits56_63, 3039 _bcmFieldSliceSelFpf3, 12, 3040 _bcmFieldSliceAuxTag2Select, 3041 _bcmFieldAuxTagVxlanReserved, 3042 fp_global_mask_tcam_ofs + f3_offset + 24, 8); 3043 3044 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMplsForwardingLabelAction, 3045 _bcmFieldSliceSelFpf3, 12, 3046 fp_global_mask_tcam_ofs + f3_offset + 33, 3 3047 ); 3048 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyTos, 3049 _bcmFieldDevSelDisable, 0, 3050 _bcmFieldSliceSelFpf3, 13, 3051 0, 3052 _bcmFieldSliceTosClassSelect, 0, 3053 fp_global_mask_tcam_ofs + f3_offset, 8, 3054 0, 0, 0, 0, 0, 0); 3055 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyTosClassZero, 3056 _bcmFieldDevSelDisable, 0, 3057 _bcmFieldSliceSelFpf3, 13, 3058 0, 3059 _bcmFieldSliceTosClassSelect, 0, 3060 fp_global_mask_tcam_ofs + f3_offset, 8, 3061 0, 0, 0, 0, 0, 0); 3062 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyTosClassOne, 3063 _bcmFieldDevSelDisable, 0, 3064 _bcmFieldSliceSelFpf3, 13, 3065 0, 3066 _bcmFieldSliceTosClassSelect, 1, 3067 fp_global_mask_tcam_ofs + f3_offset, 8, 3068 0, 0, 0, 0, 0, 0); 3069 3070 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyExtensionHeader2Type, 3071 _bcmFieldSliceSelFpf3, 13, 3072 fp_global_mask_tcam_ofs + f3_offset + 8, 8); 3073 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyExtensionHeaderSubCode, 3074 _bcmFieldSliceSelFpf3, 13, 3075 fp_global_mask_tcam_ofs + f3_offset + 16, 8); 3076 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyExtensionHeaderType, 3077 _bcmFieldSliceSelFpf3, 13, 3078 fp_global_mask_tcam_ofs + f3_offset + 24, 8); 3079 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstIpLocal, 3080 _bcmFieldSliceSelFpf3, 13, 3081 fp_global_mask_tcam_ofs + f3_offset + 32, 1 3082 ); 3083 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpAddrsNormalized, 3084 _bcmFieldSliceSelFpf3, 13, 3085 fp_global_mask_tcam_ofs + f3_offset + 33, 1 3086 ); 3087 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMacAddrsNormalized, 3088 _bcmFieldSliceSelFpf3, 13, 3089 fp_global_mask_tcam_ofs + f3_offset + 34, 1 3090 ); 3091 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3Ingress, 3092 _bcmFieldSliceSelFpf3, 13, 3093 fp_global_mask_tcam_ofs + f3_offset + 35, 13 3094 ); 3095 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMacAddrsNormalized, 3096 _bcmFieldSliceSelFpf3, 14, 3097 fp_global_mask_tcam_ofs + f3_offset + 48, 1 3098 ); 3099 3100 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstMac, 3101 _bcmFieldDevSelDisable, 0, 3102 _bcmFieldSliceSelFpf3, 14, 3103 0, 3104 _bcmFieldSliceSelDisable, 0, 3105 fp_global_mask_tcam_ofs + f3_offset, 48, 3106 0, 0, 0, 0, 0, 0); 3107 3108 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstPort, 3109 _bcmFieldDevSelDisable, 0, 3110 _bcmFieldSliceSelFpf3, 15, 3111 _bcmFieldSliceDstFwdEntitySelect, _bcmFieldFwdEntityGlp, 3112 0, 3113 fp_global_mask_tcam_ofs + f3_offset, 21, 3114 0, 0, 0, 0, 0, 0); 3115 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstTrunk, 3116 _bcmFieldDevSelDisable, 0, 3117 _bcmFieldSliceSelFpf3, 15, 3118 _bcmFieldSliceDstFwdEntitySelect, _bcmFieldFwdEntityGlp, 3119 0, 3120 fp_global_mask_tcam_ofs + f3_offset, 21, 3121 0, 0, 0, 0, 0, 0); 3122 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstMplsGport, 3123 _bcmFieldDevSelDisable, 0, 3124 _bcmFieldSliceSelFpf3, 15, 3125 _bcmFieldSliceDstFwdEntitySelect, _bcmFieldFwdEntityMplsGport, 3126 0, 3127 fp_global_mask_tcam_ofs + f3_offset, 21, 3128 0, 0, 0, 0, 0, 0); 3129 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstMplsGports, 3130 _bcmFieldDevSelDisable, 0, 3131 _bcmFieldSliceSelFpf3, 15, 3132 _bcmFieldSliceDstFwdEntitySelect, _bcmFieldFwdEntityMplsGport, 3133 0, 3134 fp_global_mask_tcam_ofs + f3_offset, 21, 3135 0, 0, 0, 0, 0, 0); 3136 3137 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstNivGport, 3138 _bcmFieldDevSelDisable, 0, 3139 _bcmFieldSliceSelFpf3, 15, 3140 _bcmFieldSliceDstFwdEntitySelect, _bcmFieldFwdEntityNivGport, 3141 0, 3142 fp_global_mask_tcam_ofs + f3_offset, 21, 3143 0, 0, 0, 0, 0, 0); 3144 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstNivGports, 3145 _bcmFieldDevSelDisable, 0, 3146 _bcmFieldSliceSelFpf3, 15, 3147 _bcmFieldSliceDstFwdEntitySelect, _bcmFieldFwdEntityNivGport, 3148 0, 3149 fp_global_mask_tcam_ofs + f3_offset, 21, 3150 0, 0, 0, 0, 0, 0); 3151 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstMimGport, 3152 _bcmFieldDevSelDisable, 0, 3153 _bcmFieldSliceSelFpf3, 15, 3154 _bcmFieldSliceDstFwdEntitySelect, _bcmFieldFwdEntityMimGport, 3155 0, 3156 fp_global_mask_tcam_ofs + f3_offset, 21, 3157 0, 0, 0, 0, 0, 0); 3158 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstMimGports, 3159 _bcmFieldDevSelDisable, 0, 3160 _bcmFieldSliceSelFpf3, 15, 3161 _bcmFieldSliceDstFwdEntitySelect, _bcmFieldFwdEntityMimGport, 3162 0, 3163 fp_global_mask_tcam_ofs + f3_offset, 21, 3164 0, 0, 0, 0, 0, 0); 3165 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstVxlanGport, 3166 _bcmFieldDevSelDisable, 0, 3167 _bcmFieldSliceSelFpf3, 15, 3168 _bcmFieldSliceDstFwdEntitySelect, _bcmFieldFwdEntityVxlanGport, 3169 0, 3170 fp_global_mask_tcam_ofs + f3_offset, 21, 3171 0, 0, 0, 0, 0, 0); 3172 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstVxlanGports, 3173 _bcmFieldDevSelDisable, 0, 3174 _bcmFieldSliceSelFpf3, 15, 3175 _bcmFieldSliceDstFwdEntitySelect, _bcmFieldFwdEntityVxlanGport, 3176 0, 3177 fp_global_mask_tcam_ofs + f3_offset, 21, 3178 0, 0, 0, 0, 0, 0); 3179 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstVlanGport, 3180 _bcmFieldDevSelDisable, 0, 3181 _bcmFieldSliceSelFpf3, 15, 3182 _bcmFieldSliceDstFwdEntitySelect, _bcmFieldFwdEntityVlanGport, 3183 0, 3184 fp_global_mask_tcam_ofs + f3_offset, 21, 3185 0, 0, 0, 0, 0, 0); 3186 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstVlanGports, 3187 _bcmFieldDevSelDisable, 0, 3188 _bcmFieldSliceSelFpf3, 15, 3189 _bcmFieldSliceDstFwdEntitySelect, _bcmFieldFwdEntityVlanGport, 3190 0, 3191 fp_global_mask_tcam_ofs + f3_offset, 21, 3192 0, 0, 0, 0, 0, 0); 3193 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstGport, 3194 _bcmFieldDevSelDisable, 0, 3195 _bcmFieldSliceSelFpf3, 15, 3196 _bcmFieldSliceDstFwdEntitySelect, _bcmFieldFwdEntityCommonGport, 3197 0, 3198 fp_global_mask_tcam_ofs + f3_offset, 21, 3199 0, 0, 0, 0, 0, 0); 3200 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstGports, 3201 _bcmFieldDevSelDisable, 0, 3202 _bcmFieldSliceSelFpf3, 15, 3203 _bcmFieldSliceDstFwdEntitySelect, _bcmFieldFwdEntityCommonGport, 3204 0, 3205 fp_global_mask_tcam_ofs + f3_offset, 21, 3206 0, 0, 0, 0, 0, 0); 3207 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstL3EgressNextHops, 3208 _bcmFieldDevSelDisable, 0, 3209 _bcmFieldSliceSelFpf3, 15, 3210 _bcmFieldSliceDstFwdEntitySelect, _bcmFieldFwdEntityL3Egress, 3211 0, 3212 fp_global_mask_tcam_ofs + f3_offset, 21, 3213 0, 0, 0, 0, 0, 0); 3214 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstMulticastGroup, 3215 _bcmFieldDevSelDisable, 0, 3216 _bcmFieldSliceSelFpf3, 15, 3217 _bcmFieldSliceDstFwdEntitySelect, _bcmFieldFwdEntityMulticastGroup, 3218 0, 3219 fp_global_mask_tcam_ofs + f3_offset, 21, 3220 0, 0, 0, 0, 0, 0); 3221 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstMulticastGroups, 3222 _bcmFieldDevSelDisable, 0, 3223 _bcmFieldSliceSelFpf3, 15, 3224 _bcmFieldSliceDstFwdEntitySelect, _bcmFieldFwdEntityMulticastGroup, 3225 0, 3226 fp_global_mask_tcam_ofs + f3_offset, 21, 3227 0, 0, 0, 0, 0, 0); 3228 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstMultipath, 3229 _bcmFieldDevSelDisable, 0, 3230 _bcmFieldSliceSelFpf3, 15, 3231 _bcmFieldSliceDstFwdEntitySelect, _bcmFieldFwdEntityMultipath, 3232 0, 3233 fp_global_mask_tcam_ofs + f3_offset, 21, 3234 0, 0, 0, 0, 0, 0); 3235 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcPort, 3236 _bcmFieldSliceSelFpf3, 15, 3237 _bcmFieldSliceIngressEntitySelect, 3238 _bcmFieldFwdEntityGlp, 3239 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 3240 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcTrunk, 3241 _bcmFieldSliceSelFpf3, 15, 3242 _bcmFieldSliceIngressEntitySelect, 3243 _bcmFieldFwdEntityGlp, 3244 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 3245 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMplsGport, 3246 _bcmFieldSliceSelFpf3, 15, 3247 _bcmFieldSliceIngressEntitySelect, 3248 _bcmFieldFwdEntityMplsGport, 3249 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 3250 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMplsGports, 3251 _bcmFieldSliceSelFpf3, 15, 3252 _bcmFieldSliceIngressEntitySelect, 3253 _bcmFieldFwdEntityMplsGport, 3254 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 3255 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcNivGport, 3256 _bcmFieldSliceSelFpf3, 15, 3257 _bcmFieldSliceIngressEntitySelect, 3258 _bcmFieldFwdEntityNivGport, 3259 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 3260 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcNivGports, 3261 _bcmFieldSliceSelFpf3, 15, 3262 _bcmFieldSliceIngressEntitySelect, 3263 _bcmFieldFwdEntityNivGport, 3264 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 3265 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMimGport, 3266 _bcmFieldSliceSelFpf3, 15, 3267 _bcmFieldSliceIngressEntitySelect, 3268 _bcmFieldFwdEntityMimGport, 3269 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 3270 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMimGports, 3271 _bcmFieldSliceSelFpf3, 15, 3272 _bcmFieldSliceIngressEntitySelect, 3273 _bcmFieldFwdEntityMimGport, 3274 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 3275 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVxlanGport, 3276 _bcmFieldSliceSelFpf3, 15, 3277 _bcmFieldSliceIngressEntitySelect, 3278 _bcmFieldFwdEntityVxlanGport, 3279 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 3280 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVxlanGports, 3281 _bcmFieldSliceSelFpf3, 15, 3282 _bcmFieldSliceIngressEntitySelect, 3283 _bcmFieldFwdEntityVxlanGport, 3284 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 3285 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVlanGport, 3286 _bcmFieldSliceSelFpf3, 15, 3287 _bcmFieldSliceIngressEntitySelect, 3288 _bcmFieldFwdEntityVlanGport, 3289 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 3290 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVlanGports, 3291 _bcmFieldSliceSelFpf3, 15, 3292 _bcmFieldSliceIngressEntitySelect, 3293 _bcmFieldFwdEntityVlanGport, 3294 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 3295 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcModPortGport, 3296 _bcmFieldSliceSelFpf3, 15, 3297 _bcmFieldSliceIngressEntitySelect, 3298 _bcmFieldFwdEntityModPortGport, 3299 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 3300 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcModPortGports, 3301 _bcmFieldSliceSelFpf3, 15, 3302 _bcmFieldSliceIngressEntitySelect, 3303 _bcmFieldFwdEntityModPortGport, 3304 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 3305 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcGport, 3306 _bcmFieldSliceSelFpf3, 15, 3307 _bcmFieldSliceIngressEntitySelect, 3308 _bcmFieldFwdEntityCommonGport, 3309 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 3310 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcGports, 3311 _bcmFieldSliceSelFpf3, 15, 3312 _bcmFieldSliceIngressEntitySelect, 3313 _bcmFieldFwdEntityCommonGport, 3314 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 3315 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 3316 _bcmFieldSliceSelFpf3, 15, 3317 fp_global_mask_tcam_ofs + f3_offset + 37, 12); 3318 3319 3320 3321 if (soc_feature(unit, soc_feature_fcoe)) { 3322 _FP_QUAL_COND_EXT_ADD(unit, stage_fc, bcmFieldQualifyFcoeVersionIsZero, 3323 _bcmFieldDevSelDisable, 0, 3324 _bcmFieldSliceSelFpf3, 16, 3325 _bcmFieldSliceSelDisable, 0, 3326 0, 3327 fp_global_mask_tcam_ofs + f3_offset, 1, 3328 0, 0, 0, 0, 0, 0); 3329 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFcoeSOF, 3330 _bcmFieldSliceSelFpf3, 16, 3331 fp_global_mask_tcam_ofs + f3_offset + 1, 8); 3332 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanInner, 3333 _bcmFieldSliceSelFpf3, 16, 3334 fp_global_mask_tcam_ofs + f3_offset + 9, 3); 3335 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanOuter, 3336 _bcmFieldSliceSelFpf3, 16, 3337 fp_global_mask_tcam_ofs + f3_offset + 12, 3); 3338 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanRCtl, 3339 _bcmFieldSliceSelFpf3, 16, 3340 fp_global_mask_tcam_ofs + f3_offset + 15, 8); 3341 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanVFTVersion, 3342 _bcmFieldSliceSelFpf3, 16, 3343 fp_global_mask_tcam_ofs + f3_offset + 23, 2); 3344 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanVFTHopCount, 3345 _bcmFieldSliceSelFpf3, 16, 3346 fp_global_mask_tcam_ofs + f3_offset + 25, 5); 3347 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanVFTVsanId, 3348 _bcmFieldSliceSelFpf3, 16, 3349 fp_global_mask_tcam_ofs + f3_offset + 30, 12); 3350 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanVFTVsanPri, 3351 _bcmFieldSliceSelFpf3, 16, 3352 fp_global_mask_tcam_ofs + f3_offset + 42, 3); 3353 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanSrcFpmaCheck, 3354 _bcmFieldSliceSelFpf3, 16, 3355 fp_global_mask_tcam_ofs + f3_offset + 45, 1); 3356 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanSrcBindCheck, 3357 _bcmFieldSliceSelFpf3, 16, 3358 fp_global_mask_tcam_ofs + f3_offset + 46, 1); 3359 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanZoneCheck, 3360 _bcmFieldSliceSelFpf3, 16, 3361 fp_global_mask_tcam_ofs + f3_offset + 47, 2); 3362 } 3363 3364 /* FIXED single wide */ 3365 #if defined(BCM_MONTEREY_SUPPORT) && defined(INCLUDE_XFLOW_MACSEC) 3366 if (SOC_IS_MONTEREY(unit)) { 3367 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyMacSecTagPresent, 3368 _bcmFieldSliceSelDisable, 0, fixed_offset + 24, 1); 3369 } 3370 #endif 3371 if ((soc_property_get(unit, spn_RIOT_ENABLE, 0)) || 3372 (soc_feature(unit, soc_feature_l2_entry_used_as_my_station) && 3373 soc_property_get(unit,spn_L2_ENTRY_USED_AS_MY_STATION, 0))) { 3374 /* MY_STATION TCAM_2 hit maps to MY_STATION_HIT in FP */ 3375 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyMyStation2Hit, 3376 _bcmFieldSliceSelDisable, 0, fixed_offset, 1); 3377 } 3378 /* MY_STATION_TCAM hit maps to MY_STATION_1_HIT in FP */ 3379 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyMyStationHit, 3380 _bcmFieldSliceSelDisable, 0, fixed_offset + 23, 1); 3381 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyHiGig, 3382 _bcmFieldSliceSelDisable, 0, fixed_offset + 1, 1); 3383 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyForwardingType, 3384 _bcmFieldSliceSelDisable, 0, fixed_offset + 2, 3); 3385 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, _bcmFieldQualifySvpValid, 3386 _bcmFieldSliceSelDisable, 0, fixed_offset + 5, 1); 3387 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifySrcVirtualPortValid, 3388 _bcmFieldSliceSelDisable, 0, fixed_offset + 5, 1); 3389 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyIpType, 3390 _bcmFieldSliceSelDisable, 0, fixed_offset + 6, 5); 3391 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyL4Ports, 3392 _bcmFieldSliceSelDisable, 0, fixed_offset + 11, 1); 3393 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyL3Routable, 3394 _bcmFieldSliceSelDisable, 0, fixed_offset + 12, 1); 3395 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyLoopback, 3396 _bcmFieldSliceSelDisable, 0, fixed_offset + 17, 1); 3397 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyLoopbackType, 3398 _bcmFieldSliceSelDisable, 0, fixed_offset + 13, 5); 3399 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyTunnelType, 3400 _bcmFieldSliceSelDisable, 0, fixed_offset + 13, 5); 3401 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyMirrorCopy, 3402 _bcmFieldSliceSelDisable, 0, fixed_offset + 18, 1); 3403 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyRepCopy, 3404 _bcmFieldSliceSelDisable, 0, fixed_offset + 19, 1); 3405 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyIpInfo, 3406 _bcmFieldSliceSelDisable, 0, fixed_offset + 20, 1); 3407 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyDrop, 3408 _bcmFieldSliceSelDisable, 0, fixed_offset + 21, 1); 3409 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyRecoverableDrop, 3410 _bcmFieldSliceSelDisable, 0, fixed_offset + 22, 1); 3411 3412 /* Overlay of FIXED key in pairing mode */ 3413 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyIpFrag, 3414 _bcmFieldDevSelDisable, 0, 3415 _bcmFieldSliceSelDisable, 0, 3416 _bcmFieldSliceSelDisable, 0, 3417 0, 3418 0, 0, 3419 fixed_pairing_overlay_offset, 2, 3420 0, 0, 3421 1); 3422 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol, 3423 _bcmFieldDevSelDisable, 0, 3424 _bcmFieldSliceSelDisable, 0, 3425 _bcmFieldSliceSelDisable, 0, 3426 0, 3427 0, 0, 3428 fixed_pairing_overlay_offset + 2, 8, 3429 0, 0, 3430 1); 3431 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyTtl, 3432 _bcmFieldDevSelDisable, 0, 3433 _bcmFieldSliceSelDisable, 0, 3434 _bcmFieldSliceTtlClassSelect, 0, 3435 0, 3436 0, 0, 3437 fixed_pairing_overlay_offset + 10, 8, 3438 0, 0, 3439 1); 3440 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyTtlClassZero, 3441 _bcmFieldDevSelDisable, 0, 3442 _bcmFieldSliceSelDisable, 0, 3443 _bcmFieldSliceTtlClassSelect, 0, 3444 0, 3445 0, 0, 3446 fixed_pairing_overlay_offset + 10, 8, 3447 0, 0, 3448 1); 3449 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyTtlClassOne, 3450 _bcmFieldDevSelDisable, 0, 3451 _bcmFieldSliceSelDisable, 0, 3452 _bcmFieldSliceTtlClassSelect, 1, 3453 0, 3454 0, 0, 3455 fixed_pairing_overlay_offset + 10, 8, 3456 0, 0, 3457 1); 3458 3459 /* Overlay of IPBM in pairing mode */ 3460 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyTcpControl, 3461 _bcmFieldDevSelDisable, 0, 3462 _bcmFieldSliceSelDisable, 0, 3463 _bcmFieldSliceTcpClassSelect, 0, 3464 0, 3465 0, 0, 3466 fp_global_mask_tcam_ofs + ipbm_pairing_f0_offset, 6, 3467 0, 0, 3468 1); 3469 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyTcpClassZero, 3470 _bcmFieldDevSelDisable, 0, 3471 _bcmFieldSliceSelDisable, 0, 3472 _bcmFieldSliceTcpClassSelect, 0, 3473 0, 3474 0, 0, 3475 fp_global_mask_tcam_ofs + ipbm_pairing_f0_offset, 6, 3476 0, 0, 3477 1); 3478 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyTcpClassOne, 3479 _bcmFieldDevSelDisable, 0, 3480 _bcmFieldSliceSelDisable, 0, 3481 _bcmFieldSliceTcpClassSelect, 1, 3482 0, 3483 0, 0, 3484 fp_global_mask_tcam_ofs + ipbm_pairing_f0_offset, 6, 3485 0, 0, 3486 1); 3487 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyL4DstPort, 3488 _bcmFieldDevSelDisable, 0, 3489 _bcmFieldSliceSelDisable, 0, 3490 _bcmFieldSliceSelDisable, 0, 3491 0, 3492 0, 0, 3493 fp_global_mask_tcam_ofs + ipbm_pairing_f0_offset + 6, 16, 3494 0, 0, 3495 1); 3496 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyL4SrcPort, 3497 _bcmFieldDevSelDisable, 0, 3498 _bcmFieldSliceSelDisable, 0, 3499 _bcmFieldSliceSelDisable, 0, 3500 0, 3501 0, 0, 3502 fp_global_mask_tcam_ofs + ipbm_pairing_f0_offset + 22, 16, 3503 0, 0, 3504 1); 3505 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyIcmpTypeCode, 3506 _bcmFieldDevSelDisable, 0, 3507 _bcmFieldSliceSelDisable, 0, 3508 _bcmFieldSliceSelDisable, 0, 3509 0, 3510 0, 0, 3511 fp_global_mask_tcam_ofs + ipbm_pairing_f0_offset + 22, 16, 3512 0, 0, 3513 1); 3514 3515 return (BCM_E_NONE); 3516 } 3517 3518 3519 /* 3520 * Function: 3521 * _field_apache_lookup_qualifiers_init 3522 * Purpose: 3523 * Initialize device stage lookup qaualifiers 3524 * select codes & offsets 3525 * Parameters: 3526 * unit - (IN) BCM device number. 3527 * stage_fc - (IN) Field Processor stage control structure. 3528 3529 * Returns: 3530 * BCM_E_NONE 3531 */ 3532 STATIC int 3533 _field_apache_lookup_qualifiers_init(int unit, _field_stage_t *stage_fc) 3534 { 3535 const unsigned f1_offset = 164, f2_offset = 36, f3_offset = 0; 3536 _FP_QUAL_DECL; 3537 3538 /* Input parameters check. */ 3539 if (NULL == stage_fc) { 3540 return (BCM_E_PARAM); 3541 } 3542 3543 /* Enable the overlay of Sender Ethernet Address onto MACSA 3544 * on ARP/RARP packets. 3545 */ 3546 BCM_IF_ERROR_RETURN 3547 (soc_reg_field32_modify(unit, ING_CONFIG_64r, REG_PORT_ANY, 3548 ARP_VALIDATION_ENf, 1)); 3549 3550 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyStageLookup, 3551 _bcmFieldSliceSelDisable, 0, 0, 0); 3552 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIp4, 3553 _bcmFieldSliceSelDisable, 0, 0, 0); 3554 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIp6, 3555 _bcmFieldSliceSelDisable, 0, 0, 0); 3556 3557 /* FPF1 */ 3558 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 3559 bcmFieldQualifyInnerIpProtocolCommon, 3560 _bcmFieldSliceSelFpf1, 0, 3561 _bcmFieldSliceIpHeaderSelect, 1, f1_offset, 3); 3562 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocolCommon, 3563 _bcmFieldSliceSelFpf1, 0, 3564 _bcmFieldSliceIpHeaderSelect, 0, f1_offset, 3); 3565 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTunnelTerminated, 3566 _bcmFieldSliceSelFpf1, 0, f1_offset + 3, 1); 3567 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpInfo, 3568 _bcmFieldSliceSelFpf1, 0, f1_offset + 4, 1); 3569 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerTpid, 3570 _bcmFieldSliceSelFpf1, 0, f1_offset + 5, 2); 3571 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterTpid, 3572 _bcmFieldSliceSelFpf1, 0, f1_offset + 7, 2); 3573 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2Format, 3574 _bcmFieldSliceSelFpf1, 0, f1_offset + 9, 2); 3575 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyHiGigProxy, 3576 _bcmFieldSliceSelFpf1, 0, f1_offset + 11, 1); 3577 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyHiGig, 3578 _bcmFieldSliceSelFpf1, 0, f1_offset + 12, 1); 3579 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan, 3580 _bcmFieldSliceSelFpf1, 0, f1_offset + 13, 16); 3581 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 3582 _bcmFieldSliceSelFpf1, 0, f1_offset + 13, 12); 3583 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi, 3584 _bcmFieldSliceSelFpf1, 0, f1_offset + 25, 1); 3585 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri, 3586 _bcmFieldSliceSelFpf1, 0, f1_offset + 26, 3); 3587 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVlanFormat, 3588 _bcmFieldSliceSelFpf1, 0, f1_offset + 29, 2); 3589 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInnerIpType, 3590 _bcmFieldSliceSelFpf1, 0, 3591 _bcmFieldSliceIpHeaderSelect, 1, f1_offset + 31, 3592 5); 3593 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyIpType, 3594 _bcmFieldSliceSelFpf1, 0, 3595 _bcmFieldSliceIpHeaderSelect, 0, f1_offset + 31, 3596 5); 3597 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifySrcPort, 3598 _bcmFieldDevSelDisable, 0, 3599 _bcmFieldSliceSelFpf1, 0, 3600 _bcmFieldSliceSrcEntitySelect, _bcmFieldFwdEntityGlp, 3601 0, 3602 f1_offset + 36, 7, /* Port value in SGLP */ 3603 f1_offset + 43, 8, /* Module value in SGLP */ 3604 f1_offset + 51, 1, /* Trunk bit in SGLP (should be 0) */ 3605 0 3606 ); 3607 3608 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifySrcTrunk, 3609 _bcmFieldDevSelDisable, 0, 3610 _bcmFieldSliceSelFpf1, 0, 3611 _bcmFieldSliceSrcEntitySelect, _bcmFieldFwdEntityGlp, 3612 0, 3613 f1_offset + 36, 15, /* trunk id field of SGLP */ 3614 f1_offset + 51, 1, /* trunk bit of SGLP */ 3615 0, 0, 3616 0 3617 ); 3618 3619 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifySrcMplsGport, 3620 _bcmFieldDevSelDisable, 0, 3621 _bcmFieldSliceSelFpf1, 0, 3622 _bcmFieldSliceSrcEntitySelect, _bcmFieldFwdEntityMplsGport, 3623 0, 3624 f1_offset + 36, 20, /* SVP_VALID + S_TYPE_SEL + S_FIELD */ 3625 0, 0, 3626 0, 0, 3627 0 3628 ); 3629 3630 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifySrcMplsGports, 3631 _bcmFieldDevSelDisable, 0, 3632 _bcmFieldSliceSelFpf1, 0, 3633 _bcmFieldSliceSrcEntitySelect, _bcmFieldFwdEntityMplsGport, 3634 0, 3635 f1_offset + 36, 20, /* SVP_VALID + S_TYPE_SEL + S_FIELD */ 3636 0, 0, 3637 0, 0, 3638 0 3639 ); 3640 3641 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifySrcNivGport, 3642 _bcmFieldDevSelDisable, 0, 3643 _bcmFieldSliceSelFpf1, 0, 3644 _bcmFieldSliceSrcEntitySelect, _bcmFieldFwdEntityNivGport, 3645 0, 3646 f1_offset + 36, 20, /* SVP_VALID + S_TYPE_SEL + S_FIELD */ 3647 0, 0, 3648 0, 0, 3649 0 3650 ); 3651 3652 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifySrcNivGports, 3653 _bcmFieldDevSelDisable, 0, 3654 _bcmFieldSliceSelFpf1, 0, 3655 _bcmFieldSliceSrcEntitySelect, _bcmFieldFwdEntityNivGport, 3656 0, 3657 f1_offset + 36, 20, /* SVP_VALID + S_TYPE_SEL + S_FIELD */ 3658 0, 0, 3659 0, 0, 3660 0 3661 ); 3662 3663 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifySrcMimGport, 3664 _bcmFieldDevSelDisable, 0, 3665 _bcmFieldSliceSelFpf1, 0, 3666 _bcmFieldSliceSrcEntitySelect, _bcmFieldFwdEntityMimGport, 3667 0, 3668 f1_offset + 36, 20, /* SVP_VALID + S_TYPE_SEL + S_FIELD */ 3669 0, 0, 3670 0, 0, 3671 0 3672 ); 3673 3674 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifySrcMimGports, 3675 _bcmFieldDevSelDisable, 0, 3676 _bcmFieldSliceSelFpf1, 0, 3677 _bcmFieldSliceSrcEntitySelect, _bcmFieldFwdEntityMimGport, 3678 0, 3679 f1_offset + 36, 20, /* SVP_VALID + S_TYPE_SEL + S_FIELD */ 3680 0, 0, 3681 0, 0, 3682 0 3683 ); 3684 3685 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifySrcVxlanGport, 3686 _bcmFieldDevSelDisable, 0, 3687 _bcmFieldSliceSelFpf1, 0, 3688 _bcmFieldSliceSrcEntitySelect, _bcmFieldFwdEntityVxlanGport, 3689 0, 3690 f1_offset + 36, 20, /* SVP_VALID + S_TYPE_SEL + S_FIELD */ 3691 0, 0, 3692 0, 0, 3693 0 3694 ); 3695 3696 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifySrcVxlanGports, 3697 _bcmFieldDevSelDisable, 0, 3698 _bcmFieldSliceSelFpf1, 0, 3699 _bcmFieldSliceSrcEntitySelect, _bcmFieldFwdEntityVxlanGport, 3700 0, 3701 f1_offset + 36, 20, /* SVP_VALID + S_TYPE_SEL + S_FIELD */ 3702 0, 0, 3703 0, 0, 3704 0 3705 ); 3706 3707 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifySrcVlanGport, 3708 _bcmFieldDevSelDisable, 0, 3709 _bcmFieldSliceSelFpf1, 0, 3710 _bcmFieldSliceSrcEntitySelect, _bcmFieldFwdEntityVlanGport, 3711 0, 3712 f1_offset + 36, 20, /* SVP_VALID + S_TYPE_SEL + S_FIELD */ 3713 0, 0, 3714 0, 0, 3715 0 3716 ); 3717 3718 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifySrcVlanGports, 3719 _bcmFieldDevSelDisable, 0, 3720 _bcmFieldSliceSelFpf1, 0, 3721 _bcmFieldSliceSrcEntitySelect, _bcmFieldFwdEntityVlanGport, 3722 0, 3723 f1_offset + 36, 20, /* SVP_VALID + S_TYPE_SEL + S_FIELD */ 3724 0, 0, 3725 0, 0, 3726 0 3727 ); 3728 3729 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifySrcModPortGport, 3730 _bcmFieldDevSelDisable, 0, 3731 _bcmFieldSliceSelFpf1, 0, 3732 _bcmFieldSliceSrcEntitySelect, _bcmFieldFwdEntityModPortGport, 3733 0, 3734 f1_offset + 36, 15, /* mod + port field of unresolved SGLP */ 3735 0, 0, 3736 0, 0, 3737 0 3738 ); 3739 3740 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifySrcModPortGports, 3741 _bcmFieldDevSelDisable, 0, 3742 _bcmFieldSliceSelFpf1, 0, 3743 _bcmFieldSliceSrcEntitySelect, _bcmFieldFwdEntityModPortGport, 3744 0, 3745 f1_offset + 36, 15, /* mod + port field of unresolved SGLP */ 3746 0, 0, 3747 0, 0, 3748 0 3749 ); 3750 3751 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifySrcModuleGport, 3752 _bcmFieldDevSelDisable, 0, 3753 _bcmFieldSliceSelFpf1, 0, 3754 _bcmFieldSliceSrcEntitySelect, _bcmFieldFwdEntityModPortGport, 3755 0, 3756 f1_offset + 36 + 7, 8, /* mod field of unresolved SGLP */ 3757 0, 0, 3758 0, 0, 3759 0 3760 ); 3761 3762 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyTrunkMemberSourceModuleId, 3763 _bcmFieldDevSelDisable, 0, 3764 _bcmFieldSliceSelFpf1, 0, 3765 _bcmFieldSliceSrcEntitySelect, _bcmFieldFwdEntityModPortGport, 3766 0, 3767 f1_offset + 36 + 7, 8, /* mod field of unresolved SGLP */ 3768 0, 0, 3769 0, 0, 3770 0 3771 ); 3772 3773 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyInPort, 3774 _bcmFieldDevSelDisable, 0, 3775 _bcmFieldSliceSelFpf1, 0, 3776 _bcmFieldSliceSrcEntitySelect, _bcmFieldFwdEntityPortGroupNum, 3777 0, 3778 f1_offset + 36, 7, /* ingress port field */ 3779 0, 0, 3780 0, 0, 3781 0 3782 ); 3783 3784 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassPort, 3785 _bcmFieldDevSelDisable, 0, 3786 _bcmFieldSliceSelFpf1, 0, 3787 _bcmFieldSliceSrcEntitySelect, _bcmFieldFwdEntityPortGroupNum, 3788 0, 3789 f1_offset + 36 + 7, 8, /* ingress port group field */ 3790 0, 0, 3791 0, 0, 3792 0 3793 ); 3794 3795 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4Ports, 3796 _bcmFieldSliceSelFpf1, 0, f1_offset + 56, 1); 3797 #if defined(BCM_MONTEREY_SUPPORT) && defined(INCLUDE_XFLOW_MACSEC) 3798 if (SOC_IS_MONTEREY(unit)) { 3799 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFromMacSecPort, 3800 _bcmFieldSliceSelFpf1, 0, f1_offset + 57, 1); 3801 } 3802 #endif 3803 3804 3805 /* FPF2 */ 3806 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInnerTtl, 3807 _bcmFieldSliceSelFpf2, 0, 3808 _bcmFieldSliceIpHeaderSelect, 1, f2_offset, 8); 3809 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTtl, 3810 _bcmFieldSliceSelFpf2, 0, 3811 _bcmFieldSliceIpHeaderSelect, 0, f2_offset, 8); 3812 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTcpControl, 3813 _bcmFieldSliceSelFpf2, 0, f2_offset + 8, 6); 3814 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInnerIpFrag, 3815 _bcmFieldSliceSelFpf2, 0, 3816 _bcmFieldSliceIpHeaderSelect, 1, f2_offset + 14, 3817 2); 3818 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyIpFrag, 3819 _bcmFieldSliceSelFpf2, 0, 3820 _bcmFieldSliceIpHeaderSelect, 0, f2_offset + 14, 3821 2); 3822 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInnerTos, 3823 _bcmFieldSliceSelFpf2, 0, 3824 _bcmFieldSliceIpHeaderSelect, 1, f2_offset + 16, 3825 8); 3826 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTos, 3827 _bcmFieldSliceSelFpf2, 0, 3828 _bcmFieldSliceIpHeaderSelect, 0, f2_offset + 16, 3829 8); 3830 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInnerL4DstPort, 3831 _bcmFieldSliceSelFpf2, 0, 3832 _bcmFieldSliceIpHeaderSelect, 1, f2_offset + 24, 3833 16); 3834 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyL4DstPort, 3835 _bcmFieldSliceSelFpf2, 0, 3836 _bcmFieldSliceIpHeaderSelect, 0, f2_offset + 24, 3837 16); 3838 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInnerL4SrcPort, 3839 _bcmFieldSliceSelFpf2, 0, 3840 _bcmFieldSliceIpHeaderSelect, 1, f2_offset + 40, 3841 16); 3842 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyL4SrcPort, 3843 _bcmFieldSliceSelFpf2, 0, 3844 _bcmFieldSliceIpHeaderSelect, 0, f2_offset + 40, 3845 16); 3846 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyIcmpTypeCode, 3847 _bcmFieldSliceSelFpf2, 0, 3848 _bcmFieldSliceIpHeaderSelect, 0, f2_offset + 40, 3849 16); 3850 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInnerIpProtocol, 3851 _bcmFieldSliceSelFpf2, 0, 3852 _bcmFieldSliceIpHeaderSelect, 1, f2_offset + 56, 3853 8); 3854 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol, 3855 _bcmFieldSliceSelFpf2, 0, 3856 _bcmFieldSliceIpHeaderSelect, 0, f2_offset + 56, 3857 8); 3858 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInnerDstIp, 3859 _bcmFieldSliceSelFpf2, 0, 3860 _bcmFieldSliceIpHeaderSelect, 1, f2_offset + 64, 3861 32); 3862 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstIp, 3863 _bcmFieldSliceSelFpf2, 0, 3864 _bcmFieldSliceIpHeaderSelect, 0, f2_offset + 64, 3865 32); 3866 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInnerSrcIp, 3867 _bcmFieldSliceSelFpf2, 0, 3868 _bcmFieldSliceIpHeaderSelect, 1, f2_offset + 96, 3869 32); 3870 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcIp, 3871 _bcmFieldSliceSelFpf2, 0, 3872 _bcmFieldSliceIpHeaderSelect, 0, f2_offset + 96, 3873 32); 3874 3875 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInnerSrcIp6, 3876 _bcmFieldSliceSelFpf2, 1, 3877 _bcmFieldSliceIpHeaderSelect, 1, f2_offset, 128); 3878 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcIp6, 3879 _bcmFieldSliceSelFpf2, 1, 3880 _bcmFieldSliceIpHeaderSelect, 0, f2_offset, 128); 3881 3882 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInnerDstIp6, 3883 _bcmFieldSliceSelFpf2, 2, 3884 _bcmFieldSliceIpHeaderSelect, 1, f2_offset, 128); 3885 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstIp6, 3886 _bcmFieldSliceSelFpf2, 2, 3887 _bcmFieldSliceIpHeaderSelect, 0, f2_offset, 128); 3888 3889 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyEtherType, 3890 _bcmFieldSliceSelFpf2, 3, f2_offset + 16, 16); 3891 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcMac, 3892 _bcmFieldSliceSelFpf2, 3, f2_offset + 32, 48); 3893 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstMac, 3894 _bcmFieldSliceSelFpf2, 3, f2_offset + 80, 48); 3895 3896 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInnerTos, 3897 _bcmFieldSliceSelFpf2, 4, 3898 _bcmFieldSliceIpHeaderSelect, 1, f2_offset, 8); 3899 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTos, 3900 _bcmFieldSliceSelFpf2, 4, 3901 _bcmFieldSliceIpHeaderSelect, 0, f2_offset, 8); 3902 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInnerIpProtocol, 3903 _bcmFieldSliceSelFpf2, 4, 3904 _bcmFieldSliceIpHeaderSelect, 1, f2_offset + 8, 3905 8); 3906 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol, 3907 _bcmFieldSliceSelFpf2, 4, 3908 _bcmFieldSliceIpHeaderSelect, 0, f2_offset + 8, 3909 8); 3910 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInnerDstIp, 3911 _bcmFieldSliceSelFpf2, 4, 3912 _bcmFieldSliceIpHeaderSelect, 1, f2_offset + 16, 3913 32); 3914 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstIp, 3915 _bcmFieldSliceSelFpf2, 4, 3916 _bcmFieldSliceIpHeaderSelect, 0, f2_offset + 16, 3917 32); 3918 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInnerSrcIp, 3919 _bcmFieldSliceSelFpf2, 4, 3920 _bcmFieldSliceIpHeaderSelect, 1, f2_offset + 48, 3921 32); 3922 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcIp, 3923 _bcmFieldSliceSelFpf2, 4, 3924 _bcmFieldSliceIpHeaderSelect, 0, f2_offset + 48, 3925 32); 3926 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcMac, 3927 _bcmFieldSliceSelFpf2, 4, f2_offset + 80, 48); 3928 3929 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInnerTos, 3930 _bcmFieldSliceSelFpf2, 5, 3931 _bcmFieldSliceIpHeaderSelect, 1, f2_offset, 8); 3932 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTos, 3933 _bcmFieldSliceSelFpf2, 5, 3934 _bcmFieldSliceIpHeaderSelect, 0, f2_offset, 8); 3935 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInnerIpProtocol, 3936 _bcmFieldSliceSelFpf2, 5, 3937 _bcmFieldSliceIpHeaderSelect, 1, f2_offset + 8, 3938 8); 3939 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol, 3940 _bcmFieldSliceSelFpf2, 5, 3941 _bcmFieldSliceIpHeaderSelect, 0, f2_offset + 8, 3942 8); 3943 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInnerDstIp, 3944 _bcmFieldSliceSelFpf2, 5, 3945 _bcmFieldSliceIpHeaderSelect, 1, f2_offset + 16, 3946 32); 3947 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstIp, 3948 _bcmFieldSliceSelFpf2, 5, 3949 _bcmFieldSliceIpHeaderSelect, 0, f2_offset + 16, 3950 32); 3951 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInnerSrcIp, 3952 _bcmFieldSliceSelFpf2, 5, 3953 _bcmFieldSliceIpHeaderSelect, 1, f2_offset + 48, 3954 32); 3955 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcIp, 3956 _bcmFieldSliceSelFpf2, 5, 3957 _bcmFieldSliceIpHeaderSelect, 0, f2_offset + 48, 3958 32); 3959 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstMac, 3960 _bcmFieldSliceSelFpf2, 5, f2_offset + 80, 48); 3961 3962 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInnerSrcIp6High, 3963 _bcmFieldSliceSelFpf2, 6, 3964 _bcmFieldSliceIpHeaderSelect, 1, f2_offset, 64); 3965 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcIp6High, 3966 _bcmFieldSliceSelFpf2, 6, 3967 _bcmFieldSliceIpHeaderSelect, 0, f2_offset, 64); 3968 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInnerDstIp6High, 3969 _bcmFieldSliceSelFpf2, 6, 3970 _bcmFieldSliceIpHeaderSelect, 1, f2_offset + 64, 3971 64); 3972 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstIp6High, 3973 _bcmFieldSliceSelFpf2, 6, 3974 _bcmFieldSliceIpHeaderSelect, 0, f2_offset + 64, 3975 64); 3976 3977 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVnTag, 3978 _bcmFieldSliceSelFpf2, 7, f2_offset, 33); 3979 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySnap, 3980 _bcmFieldSliceSelFpf2, 7, f2_offset + 64, 40); 3981 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyLlc, 3982 _bcmFieldSliceSelFpf2, 7, f2_offset + 104, 24); 3983 3984 _FP_QUAL_ADD(unit, stage_fc, _bcmFieldQualifyData0, 3985 _bcmFieldSliceSelFpf2, 8, f2_offset, 128); 3986 3987 _FP_QUAL_ADD(unit, stage_fc, _bcmFieldQualifyData1, 3988 _bcmFieldSliceSelFpf2, 9, f2_offset, 128); 3989 3990 if (soc_feature(unit, soc_feature_fcoe)) { 3991 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanInner, 3992 _bcmFieldSliceSelFpf2, 10, f2_offset, 3); 3993 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanOuter, 3994 _bcmFieldSliceSelFpf2, 10, f2_offset + 3, 6); 3995 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFcoeSOF, 3996 _bcmFieldSliceSelFpf2, 10, f2_offset + 6, 8); 3997 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanDFCtl, 3998 _bcmFieldSliceSelFpf2, 10, f2_offset + 14, 8); 3999 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanCSCtl, 4000 _bcmFieldSliceSelFpf2, 10, f2_offset + 22, 8); 4001 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanFCtl, 4002 _bcmFieldSliceSelFpf2, 10, f2_offset + 30, 24); 4003 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanType, 4004 _bcmFieldSliceSelFpf2, 10, f2_offset + 54, 8); 4005 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanDstId, 4006 _bcmFieldSliceSelFpf2, 10, f2_offset + 62, 24); 4007 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanSrcId, 4008 _bcmFieldSliceSelFpf2, 10, f2_offset + 86, 24); 4009 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanRCtl, 4010 _bcmFieldSliceSelFpf2, 10, f2_offset + 110, 8); 4011 } 4012 4013 /* FPF3 */ 4014 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlan, 4015 _bcmFieldSliceSelFpf3, 0, f3_offset + 0, 16); 4016 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanId, 4017 _bcmFieldSliceSelFpf3, 0, f3_offset + 0, 12); 4018 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanCfi, 4019 _bcmFieldSliceSelFpf3, 0, f3_offset + 12, 1); 4020 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanPri, 4021 _bcmFieldSliceSelFpf3, 0, f3_offset + 13, 3); 4022 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyEtherType, 4023 _bcmFieldSliceSelFpf3, 0, f3_offset + 16, 16); 4024 4025 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInnerL4DstPort, 4026 _bcmFieldSliceSelFpf3, 1, 4027 _bcmFieldSliceIpHeaderSelect, 1, f3_offset + 0, 4028 16); 4029 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyL4DstPort, 4030 _bcmFieldSliceSelFpf3, 1, 4031 _bcmFieldSliceIpHeaderSelect, 0, f3_offset + 0, 4032 16); 4033 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInnerL4SrcPort, 4034 _bcmFieldSliceSelFpf3, 1, 4035 _bcmFieldSliceIpHeaderSelect, 1, f3_offset + 16, 4036 16); 4037 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyL4SrcPort, 4038 _bcmFieldSliceSelFpf3, 1, 4039 _bcmFieldSliceIpHeaderSelect, 0, f3_offset + 16, 4040 16); 4041 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyIcmpTypeCode, 4042 _bcmFieldSliceSelFpf3, 1, 4043 _bcmFieldSliceIpHeaderSelect, 0, f3_offset + 16, 4044 16); 4045 4046 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInnerTos, 4047 _bcmFieldSliceSelFpf3, 2, 4048 _bcmFieldSliceIpHeaderSelect, 1, f3_offset + 0, 4049 8); 4050 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTos, 4051 _bcmFieldSliceSelFpf3, 2, 4052 _bcmFieldSliceIpHeaderSelect, 0, f3_offset + 0, 4053 8); 4054 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInnerIpProtocol, 4055 _bcmFieldSliceSelFpf3, 2, 4056 _bcmFieldSliceIpHeaderSelect, 1, f3_offset + 8, 4057 8); 4058 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol, 4059 _bcmFieldSliceSelFpf3, 2, 4060 _bcmFieldSliceIpHeaderSelect, 0, f3_offset + 8, 4061 8); 4062 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyExtensionHeaderSubCode, 4063 _bcmFieldSliceSelFpf3, 2, f3_offset + 16, 8); 4064 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyExtensionHeaderType, 4065 _bcmFieldSliceSelFpf3, 2, f3_offset + 24, 8); 4066 4067 4068 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassL3, 4069 _bcmFieldSliceSelFpf3, 3, f3_offset + 0, 8); 4070 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlan, 4071 _bcmFieldSliceSelFpf3, 3, f3_offset + 8, 16); 4072 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanId, 4073 _bcmFieldSliceSelFpf3, 3, f3_offset + 8, 12); 4074 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanCfi, 4075 _bcmFieldSliceSelFpf3, 3, f3_offset + 20, 1); 4076 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanPri, 4077 _bcmFieldSliceSelFpf3, 3, f3_offset + 21, 3); 4078 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcModuleGport, 4079 _bcmFieldSliceSelFpf3, 3, f3_offset + 24, 8); 4080 if (soc_feature(unit, soc_feature_fcoe)) { 4081 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanVFTHopCount, 4082 _bcmFieldSliceSelFpf3, 5, f3_offset, 8); 4083 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanVFTVsanId, 4084 _bcmFieldSliceSelFpf3, 5, f3_offset + 8, 12); 4085 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanVFTVsanPri, 4086 _bcmFieldSliceSelFpf3, 5, f3_offset + 20, 3); 4087 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanVFTVersion, 4088 _bcmFieldSliceSelFpf3, 5, f3_offset + 23, 2); 4089 4090 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanVFTHopCount, 4091 _bcmFieldSliceSelFpf3, 6, f3_offset, 8); 4092 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanVFTVsanId, 4093 _bcmFieldSliceSelFpf3, 6, f3_offset + 8, 12); 4094 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanVFTVsanPri, 4095 _bcmFieldSliceSelFpf3, 6, f3_offset + 20, 3); 4096 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanVFTVersion, 4097 _bcmFieldSliceSelFpf3, 6, f3_offset + 23, 2); 4098 } 4099 4100 /* DWF3 */ 4101 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyInnerTos, 4102 _bcmFieldSliceSelFpf3, 0, 4103 _bcmFieldSliceIpHeaderSelect, 1, f3_offset + 0, 8); 4104 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyTos, 4105 _bcmFieldSliceSelFpf3, 0, 4106 _bcmFieldSliceIpHeaderSelect, 0, f3_offset + 0, 8); 4107 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyInnerTtl, 4108 _bcmFieldSliceSelFpf3, 0, 4109 _bcmFieldSliceIpHeaderSelect, 1, f3_offset + 8, 8); 4110 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyTtl, 4111 _bcmFieldSliceSelFpf3, 0, 4112 _bcmFieldSliceIpHeaderSelect, 0, f3_offset + 8, 8); 4113 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyTcpControl, 4114 _bcmFieldSliceSelFpf3, 0, 4115 _bcmFieldSliceIpHeaderSelect, 0, f3_offset + 16, 4116 6); 4117 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyInnerIpFrag, 4118 _bcmFieldSliceSelFpf3, 0, 4119 _bcmFieldSliceIpHeaderSelect, 1, f3_offset + 22, 4120 2); 4121 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyIpFrag, 4122 _bcmFieldSliceSelFpf3, 0, 4123 _bcmFieldSliceIpHeaderSelect, 0, f3_offset + 22, 4124 2); 4125 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyInnerIpProtocol, 4126 _bcmFieldSliceSelFpf3, 0, 4127 _bcmFieldSliceIpHeaderSelect, 1, f3_offset + 24, 4128 8); 4129 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol, 4130 _bcmFieldSliceSelFpf3, 0, 4131 _bcmFieldSliceIpHeaderSelect, 0, f3_offset + 24, 4132 8); 4133 4134 /* DWF2 */ 4135 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyInnerTtl, 4136 _bcmFieldSliceSelFpf2, 0, 4137 _bcmFieldSliceIpHeaderSelect, 1, f2_offset + 0, 4138 8); 4139 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyTtl, 4140 _bcmFieldSliceSelFpf2, 0, 4141 _bcmFieldSliceIpHeaderSelect, 0, f2_offset + 0, 4142 8); 4143 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyTcpControl, 4144 _bcmFieldSliceSelFpf2, 0, 4145 _bcmFieldSliceIpHeaderSelect, 0, f2_offset + 8, 4146 6); 4147 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyInnerIpFrag, 4148 _bcmFieldSliceSelFpf2, 0, 4149 _bcmFieldSliceIpHeaderSelect, 1, f2_offset + 14, 4150 2); 4151 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyIpFrag, 4152 _bcmFieldSliceSelFpf2, 0, 4153 _bcmFieldSliceIpHeaderSelect, 0, f2_offset + 14, 4154 2); 4155 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyInnerTos, 4156 _bcmFieldSliceSelFpf2, 0, 4157 _bcmFieldSliceIpHeaderSelect, 1, f2_offset + 16, 4158 8); 4159 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyTos, 4160 _bcmFieldSliceSelFpf2, 0, 4161 _bcmFieldSliceIpHeaderSelect, 0, f2_offset + 16, 4162 8); 4163 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyInnerL4DstPort, 4164 _bcmFieldSliceSelFpf2, 0, 4165 _bcmFieldSliceIpHeaderSelect, 1, f2_offset + 24, 4166 16); 4167 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyL4DstPort, 4168 _bcmFieldSliceSelFpf2, 0, 4169 _bcmFieldSliceIpHeaderSelect, 0, f2_offset + 24, 4170 16); 4171 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyInnerL4SrcPort, 4172 _bcmFieldSliceSelFpf2, 0, 4173 _bcmFieldSliceIpHeaderSelect, 1, f2_offset + 40, 4174 16); 4175 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyL4SrcPort, 4176 _bcmFieldSliceSelFpf2, 0, 4177 _bcmFieldSliceIpHeaderSelect, 0, f2_offset + 40, 4178 16); 4179 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyIcmpTypeCode, 4180 _bcmFieldSliceSelFpf2, 0, 4181 _bcmFieldSliceIpHeaderSelect, 0, f2_offset + 40, 4182 16); 4183 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyInnerIpProtocol, 4184 _bcmFieldSliceSelFpf2, 0, 4185 _bcmFieldSliceIpHeaderSelect, 1, f2_offset + 56, 4186 8); 4187 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol, 4188 _bcmFieldSliceSelFpf2, 0, 4189 _bcmFieldSliceIpHeaderSelect, 0, f2_offset + 56, 4190 8); 4191 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyInnerDstIp, 4192 _bcmFieldSliceSelFpf2, 0, 4193 _bcmFieldSliceIpHeaderSelect, 1, f2_offset + 64, 4194 32); 4195 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyDstIp, 4196 _bcmFieldSliceSelFpf2, 0, 4197 _bcmFieldSliceIpHeaderSelect, 0, f2_offset + 64, 4198 32); 4199 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyInnerSrcIp, 4200 _bcmFieldSliceSelFpf2, 0, 4201 _bcmFieldSliceIpHeaderSelect, 1, f2_offset + 96, 4202 32); 4203 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifySrcIp, 4204 _bcmFieldSliceSelFpf2, 0, 4205 _bcmFieldSliceIpHeaderSelect, 0, f2_offset + 96, 4206 32); 4207 4208 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyInnerSrcIp6, 4209 _bcmFieldSliceSelFpf2, 1, 4210 _bcmFieldSliceIpHeaderSelect, 1, f2_offset, 4211 128); 4212 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifySrcIp6, 4213 _bcmFieldSliceSelFpf2, 1, 4214 _bcmFieldSliceIpHeaderSelect, 0, f2_offset, 4215 128); 4216 4217 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, _bcmFieldQualifyData1, 4218 _bcmFieldSliceSelFpf2, 2, 4219 _bcmFieldSliceSelDisable, 0, 4220 f2_offset, 128); 4221 4222 /* DWF1 */ 4223 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, 4224 bcmFieldQualifyExtensionHeaderSubCode, 4225 _bcmFieldSliceSelFpf1, 0, 4226 _bcmFieldSliceIpHeaderSelect, 0, f1_offset + 0, 4227 8); 4228 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyExtensionHeaderType, 4229 _bcmFieldSliceSelFpf1, 0, 4230 _bcmFieldSliceIpHeaderSelect, 0, f1_offset + 8, 4231 8); 4232 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassL3, 4233 _bcmFieldSliceSelFpf1, 0, 4234 _bcmFieldSliceIpHeaderSelect, 0, f1_offset + 16, 4235 8); 4236 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyEtherType, 4237 _bcmFieldSliceSelFpf1, 0, 4238 _bcmFieldSliceIpHeaderSelect, 0, f1_offset + 24, 4239 16); 4240 4241 return (BCM_E_NONE); 4242 } 4243 4244 /* 4245 * Function: 4246 * _field_apache_egress_qualifiers_init 4247 * Purpose: 4248 * Initialize device stage egress qaualifiers 4249 * select codes & offsets 4250 * Parameters: 4251 * unit - (IN) BCM device number. 4252 * stage_fc - (IN) Field Processor stage control structure. 4253 * 4254 * Returns: 4255 * BCM_E_NONE 4256 */ 4257 STATIC int 4258 _field_apache_egress_qualifiers_init(int unit, _field_stage_t *stage_fc) 4259 { 4260 _FP_QUAL_DECL; 4261 _key_fld_ = KEYf; 4262 4263 /* Input parameters check. */ 4264 if (NULL == stage_fc) { 4265 return (BCM_E_PARAM); 4266 } 4267 4268 if (soc_feature(unit, soc_feature_fp_based_oam)) { 4269 /* Initialze ETH_OAM type and SAT FLPDU type to corresponding class id's */ 4270 BCM_IF_ERROR_RETURN(soc_reg_field32_modify(unit, 4271 EGR_OAM_SAT_MISC_ETHERTYPE_0r, REG_PORT_ANY, 4272 ETHERTYPEf, _FP_ETHOAM_ETHER_TYPE)); 4273 BCM_IF_ERROR_RETURN(soc_reg_field32_modify(unit, 4274 EGR_OAM_SAT_MISC_ETHERTYPE_0r, REG_PORT_ANY, 4275 CLASS_IDf, _FP_EGRESS_OAM_CLASS_ID)); 4276 BCM_IF_ERROR_RETURN(soc_reg_field32_modify(unit, 4277 EGR_OAM_SAT_MISC_ETHERTYPE_1r, REG_PORT_ANY, 4278 ETHERTYPEf, _FP_SAT_ETHER_TYPE)); 4279 BCM_IF_ERROR_RETURN(soc_reg_field32_modify(unit, 4280 EGR_OAM_SAT_MISC_ETHERTYPE_1r, REG_PORT_ANY, 4281 CLASS_IDf, _FP_EGRESS_SAT_CLASS_ID)); 4282 } 4283 4284 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyStageEgress, 4285 _bcmFieldSliceSelDisable, 0, 0, 0); 4286 4287 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4Ports, 4288 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 0, 1); 4289 /* EG_DVP_CLASS_ID */ 4290 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyEgressClassTrill, 4291 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 4292 _bcmFieldSliceSelEgrDvpKey4, 3, 4293 2, 12); 4294 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyEgressClassWlan, 4295 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 4296 _bcmFieldSliceSelEgrDvpKey4, 3, 4297 2, 12); 4298 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyEgressClassL2Gre, 4299 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 4300 _bcmFieldSliceSelEgrDvpKey4, 3, 4301 2, 12); 4302 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyEgressClassVxlan, 4303 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 4304 _bcmFieldSliceSelEgrDvpKey4, 3, 4305 2, 12); 4306 /* DVP_VALID + DVP + SPARE_DVP */ 4307 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMplsGport, 4308 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 4309 _bcmFieldSliceSelEgrDvpKey4, 0, 4310 1, 15); 4311 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMplsGports, 4312 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 4313 _bcmFieldSliceSelEgrDvpKey4, 0, 4314 1, 15); 4315 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstNivGport, 4316 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 4317 _bcmFieldSliceSelEgrDvpKey4, 0, 4318 1, 15); 4319 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstNivGports, 4320 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 4321 _bcmFieldSliceSelEgrDvpKey4, 0, 4322 1, 15); 4323 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMimGport, 4324 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 4325 _bcmFieldSliceSelEgrDvpKey4, 0, 4326 1, 15); 4327 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMimGports, 4328 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 4329 _bcmFieldSliceSelEgrDvpKey4, 0, 4330 1, 15); 4331 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstVxlanGport, 4332 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 4333 _bcmFieldSliceSelEgrDvpKey4, 0, 4334 1, 15); 4335 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstVxlanGports, 4336 _bcmFieldDevSelDisable, 0, 4337 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 4338 _bcmFieldSliceSelEgrDvpKey4, 0, 4339 0, 4340 1, 15, 4341 227, 2, /* DVP TYPE */ 4342 0, 0, 4343 0 4344 ); 4345 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstVlanGport, 4346 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 4347 _bcmFieldSliceSelEgrDvpKey4, 0, 4348 1, 15); 4349 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstVlanGports, 4350 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 4351 _bcmFieldSliceSelEgrDvpKey4, 0, 4352 1, 15); 4353 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstGport, 4354 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 4355 _bcmFieldSliceSelEgrDvpKey4, 0, 4356 1, 15); 4357 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstGports, 4358 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 4359 _bcmFieldSliceSelEgrDvpKey4, 0, 4360 1, 15); 4361 #if defined(BCM_MONTEREY_SUPPORT) && defined(INCLUDE_XFLOW_MACSEC) 4362 if (SOC_IS_MONTEREY(unit)) { 4363 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMacSecFlow, 4364 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 16, 2); 4365 } 4366 #endif 4367 #if 0 /* Apache HW doesn't support DvpKey4 1 and 2 */ 4368 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyEgressClass, 4369 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 4370 _bcmFieldSliceSelEgrDvpKey4, 1, 4371 2, 8); 4372 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassL3, 4373 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 4374 _bcmFieldSliceSelEgrDvpKey4, 2, 4375 2, 12); 4376 #endif 4377 4378 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIntPriority, 4379 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 18, 4); 4380 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyColor, 4381 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 22, 2); 4382 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2Format, 4383 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 24, 2); 4384 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyEtherType, 4385 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 26, 16); 4386 if (!soc_feature(unit, soc_feature_fp_based_oam)) { 4387 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcMac, 4388 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 42, 48); 4389 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstMac, 4390 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 90, 48); 4391 } else { 4392 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 4393 bcmFieldQualifySrcMac, 4394 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 4395 _bcmFieldSliceSelEgrOamOverlayKey4, 0, 4396 42, 48); 4397 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 4398 bcmFieldQualifyDstMac, 4399 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 4400 _bcmFieldSliceSelEgrOamOverlayKey4, 0, 4401 90, 48); 4402 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 4403 bcmFieldQualifyOamHeaderBits32_63, 4404 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 4405 _bcmFieldSliceSelEgrOamOverlayKey4, 1, 4406 42, 32); 4407 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 4408 bcmFieldQualifyOamHeaderBits0_31, 4409 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 4410 _bcmFieldSliceSelEgrOamOverlayKey4, 1, 4411 74, 32); 4412 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 4413 bcmFieldQualifyOamEgressClassVxlt, 4414 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 4415 _bcmFieldSliceSelEgrOamOverlayKey4, 1, 4416 106, 12); 4417 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 4418 bcmFieldQualifyOamEgressClassPort, 4419 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 4420 _bcmFieldSliceSelEgrOamOverlayKey4, 1, 4421 118, 12); 4422 } 4423 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVlanTranslationHit, 4424 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 138, 1); 4425 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyHiGigProxy, 4426 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 139, 1); 4427 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyHiGig, 4428 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 140, 1); 4429 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanCfi, 4430 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 141, 1); 4431 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanPri, 4432 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 142, 3); 4433 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanId, 4434 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 145, 12); 4435 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInPort, 4436 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 157, 7); 4437 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3Routable, 4438 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 164, 1); 4439 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMirrorCopy, 4440 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 165, 1); 4441 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan, 4442 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 166, 16); 4443 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 4444 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 166, 12); 4445 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi, 4446 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 178, 1); 4447 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri, 4448 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 179, 3); 4449 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVlanFormat, 4450 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 182, 2); 4451 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstHiGig, 4452 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 184, 1); 4453 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassPort, 4454 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 4455 _bcmFieldSliceSelEgrClassF4, 0, 4456 185, 8); 4457 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL2, 4458 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 4459 _bcmFieldSliceSelEgrClassF4, 0, 4460 193, 13 4461 ); 4462 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL3, 4463 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 4464 _bcmFieldSliceSelEgrClassF4, 0, 4465 193, 13 4466 ); 4467 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField, 4468 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 4469 _bcmFieldSliceSelEgrClassF4, 0, 4470 193, 13 4471 ); 4472 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField, 4473 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 4474 _bcmFieldSliceSelEgrClassF4, 0, 4475 193, 13 4476 ); 4477 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL2, 4478 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 4479 _bcmFieldSliceSelEgrClassF4, 0, 4480 193, 13 4481 ); 4482 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL3, 4483 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 4484 _bcmFieldSliceSelEgrClassF4, 0, 4485 193, 13 4486 ); 4487 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassL2, 4488 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 4489 _bcmFieldSliceSelEgrClassF4, 0, 4490 193, 13 4491 ); 4492 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassL3, 4493 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 4494 _bcmFieldSliceSelEgrClassF4, 0, 4495 193, 13 4496 ); 4497 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyIngressClassField, 4498 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 4499 _bcmFieldSliceSelEgrClassF4, 0, 4500 193, 13 4501 ); 4502 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 4503 bcmFieldQualifyIngressInterfaceClassPort, 4504 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 4505 _bcmFieldSliceSelEgrClassF4, 0, 4506 193, 13 4507 ); 4508 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 4509 bcmFieldQualifyIngressInterfaceClassVPort, 4510 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 4511 _bcmFieldSliceSelEgrClassF4, 0, 4512 193, 13 4513 ); 4514 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 4515 bcmFieldQualifyInterfaceClassVPort, 4516 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 4517 _bcmFieldSliceSelEgrClassF4, 0, 4518 193, 12 4519 ); 4520 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassPort, 4521 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 4522 _bcmFieldSliceSelEgrClassF4, 1, 4523 185, 8); 4524 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyOutPort, 4525 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 4526 _bcmFieldSliceSelEgrClassF4, 1, 4527 193, 7); 4528 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassPort, 4529 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 4530 _bcmFieldSliceSelEgrClassF4, 2, 4531 185, 8); 4532 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyCpuQueue, 4533 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 4534 _bcmFieldSliceSelEgrClassF4, 2, 4535 193, 6); 4536 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstPort, 4537 _bcmFieldDevSelDisable, 0, 4538 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 4539 _bcmFieldSliceSelEgrClassF4, 3, 4540 0, 4541 193, 7, /* DST_PORT */ 4542 185, 8, /* DST_MODID */ 4543 0, 0, 4544 0 4545 ); 4546 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassPort, 4547 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 4548 _bcmFieldSliceSelEgrClassF4, 4, 4549 185, 8); 4550 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyEgressClass, 4551 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 4552 _bcmFieldSliceSelEgrClassF4, 4, 4553 193, 8); 4554 4555 /* L3_PKT_TYPE */ 4556 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyIpType, 4557 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 4558 _bcmFieldSliceSelEgrMdlKey4, 0, 4559 206, 5); 4560 /* MDL */ 4561 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyOamMdl, 4562 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 4563 _bcmFieldSliceSelEgrMdlKey4, 1, 4564 206, 3); 4565 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyForwardingVlanId, 4566 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 211, 12); 4567 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVrf, 4568 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 211, 13); 4569 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVpn, 4570 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 211, 13); 4571 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyForwardingType, 4572 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 224, 2); 4573 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDrop, 4574 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 226, 1); 4575 #if defined(BCM_MONTEREY_SUPPORT) && defined(BCM_PREEMPTION_SUPPORT) 4576 if (SOC_IS_MONTEREY(unit)) { 4577 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyPreemptablePacket, 4578 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 229, 1); 4579 } 4580 #endif 4581 4582 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4Ports, 4583 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 0, 1); 4584 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIntPriority, 4585 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 1, 4); 4586 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyColor, 4587 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 5, 2); 4588 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpFrag, 4589 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 7, 2); 4590 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTcpControl, 4591 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 9, 6); 4592 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4DstPort, 4593 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 15, 16); 4594 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4SrcPort, 4595 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 31, 16); 4596 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIcmpTypeCode, 4597 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 31, 16); 4598 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTtl, 4599 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 47, 8); 4600 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol, 4601 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 55, 8); 4602 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstIp, 4603 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 63, 32); 4604 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcIp, 4605 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 95, 32); 4606 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTos, 4607 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 127, 8); 4608 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyHiGigProxy, 4609 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 135, 1); 4610 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyHiGig, 4611 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 136, 1); 4612 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanId, 4613 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 137, 12); 4614 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInPort, 4615 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 149, 7); 4616 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3Routable, 4617 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 156, 1); 4618 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMirrorCopy, 4619 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 157, 1); 4620 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan, 4621 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 158, 16); 4622 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 4623 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 158, 12); 4624 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi, 4625 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 170, 1); 4626 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri, 4627 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 171, 3); 4628 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVlanFormat, 4629 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 174, 2); 4630 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstHiGig, 4631 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 176, 1); 4632 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassPort, 4633 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 4634 _bcmFieldSliceSelEgrDestPortF1, 0, 4635 177, 8 4636 ); 4637 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyOutPort, 4638 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 4639 _bcmFieldSliceSelEgrDestPortF1, 0, 4640 185, 7 4641 ); 4642 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstPort, 4643 _bcmFieldDevSelDisable, 0, 4644 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 4645 _bcmFieldSliceSelEgrDestPortF1, 1, 4646 0, 4647 185, 7, /* DST_PORT */ 4648 177, 8, /* DST_MODID */ 4649 0, 0, 4650 0 4651 ); 4652 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpType, 4653 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 192, 5); 4654 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL2, 4655 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 4656 _bcmFieldSliceSelEgrClassF1, 0, 4657 197, 13 4658 ); 4659 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL3, 4660 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 4661 _bcmFieldSliceSelEgrClassF1, 0, 4662 197, 13 4663 ); 4664 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField, 4665 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 4666 _bcmFieldSliceSelEgrClassF1, 0, 4667 197, 13 4668 ); 4669 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField, 4670 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 4671 _bcmFieldSliceSelEgrClassF1, 0, 4672 197, 13 4673 ); 4674 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL2, 4675 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 4676 _bcmFieldSliceSelEgrClassF1, 0, 4677 197, 13 4678 ); 4679 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL3, 4680 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 4681 _bcmFieldSliceSelEgrClassF1, 0, 4682 197, 13 4683 ); 4684 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassL2, 4685 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 4686 _bcmFieldSliceSelEgrClassF1, 0, 4687 197, 13 4688 ); 4689 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassL3, 4690 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 4691 _bcmFieldSliceSelEgrClassF1, 0, 4692 197, 13 4693 ); 4694 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyIngressClassField, 4695 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 4696 _bcmFieldSliceSelEgrClassF1, 0, 4697 197, 13 4698 ); 4699 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 4700 bcmFieldQualifyIngressInterfaceClassPort, 4701 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 4702 _bcmFieldSliceSelEgrClassF1, 0, 4703 197, 13 4704 ); 4705 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 4706 bcmFieldQualifyIngressInterfaceClassVPort, 4707 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 4708 _bcmFieldSliceSelEgrClassF1, 0, 4709 197, 13 4710 ); 4711 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 4712 bcmFieldQualifyInterfaceClassVPort, 4713 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 4714 _bcmFieldSliceSelEgrClassF1, 0, 4715 197, 12 4716 ); 4717 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyEgressClassTrill, 4718 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 4719 _bcmFieldSliceSelEgrClassF1, 3, 4720 197, 12 4721 ); 4722 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyEgressClassWlan, 4723 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 4724 _bcmFieldSliceSelEgrClassF1, 3, 4725 197, 12 4726 ); 4727 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyEgressClassL2Gre, 4728 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 4729 _bcmFieldSliceSelEgrClassF1, 3, 4730 197, 12 4731 ); 4732 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyEgressClassVxlan, 4733 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 4734 _bcmFieldSliceSelEgrClassF1, 3, 4735 197, 12 4736 ); 4737 4738 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyForwardingVlanId, 4739 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 210, 12); 4740 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVrf, 4741 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 210, 13); 4742 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVpn, 4743 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 210, 13); 4744 4745 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyForwardingType, 4746 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 223, 2); 4747 4748 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDrop, 4749 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 225, 1); 4750 #if defined(BCM_MONTEREY_SUPPORT) && defined(BCM_PREEMPTION_SUPPORT) 4751 if (SOC_IS_MONTEREY(unit)) { 4752 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyPreemptablePacket, 4753 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 226, 1); 4754 } 4755 #endif 4756 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIp4, 4757 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 0, 0); 4758 4759 /* KEY1 without v4 specific fields. */ 4760 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4Ports, 4761 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 0, 1); 4762 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIntPriority, 4763 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 1, 4); 4764 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyColor, 4765 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 5, 2); 4766 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTcpControl, 4767 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 9, 6); 4768 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4DstPort, 4769 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 15, 16); 4770 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4SrcPort, 4771 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 31, 16); 4772 4773 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIcmpTypeCode, 4774 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 31, 16); 4775 4776 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTtl, 4777 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 47, 8); 4778 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol, 4779 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 55, 8); 4780 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTos, 4781 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 127, 8); 4782 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyHiGigProxy, 4783 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 135, 1); 4784 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyHiGig, 4785 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 136, 1); 4786 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanId, 4787 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 137, 12); 4788 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInPort, 4789 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 149, 7); 4790 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3Routable, 4791 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 156, 1); 4792 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMirrorCopy, 4793 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 157, 1); 4794 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan, 4795 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 158, 16); 4796 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 4797 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 158, 12); 4798 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi, 4799 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 170, 1); 4800 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri, 4801 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 171, 3); 4802 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVlanFormat, 4803 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 174, 2); 4804 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstHiGig, 4805 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 176, 1); 4806 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassPort, 4807 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 4808 _bcmFieldSliceSelEgrDestPortF1, 0, 4809 177, 8 4810 ); 4811 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyOutPort, 4812 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 4813 _bcmFieldSliceSelEgrDestPortF1, 0, 4814 185, 7 4815 ); 4816 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstPort, 4817 _bcmFieldDevSelDisable, 0, 4818 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 4819 _bcmFieldSliceSelEgrDestPortF1, 1, 4820 0, 4821 185, 7, /* DST_PORT */ 4822 177, 8, /* DST_MODID */ 4823 0, 0, 4824 0 4825 ); 4826 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpType, 4827 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 192, 5); 4828 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL2, 4829 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 4830 _bcmFieldSliceSelEgrClassF1, 0, 4831 197, 13); 4832 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL3, 4833 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 4834 _bcmFieldSliceSelEgrClassF1, 0, 4835 197, 13); 4836 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField, 4837 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 4838 _bcmFieldSliceSelEgrClassF1, 0, 4839 197, 13); 4840 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField, 4841 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 4842 _bcmFieldSliceSelEgrClassF1, 0, 4843 197, 13); 4844 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL2, 4845 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 4846 _bcmFieldSliceSelEgrClassF1, 0, 4847 197, 13); 4848 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL3, 4849 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 4850 _bcmFieldSliceSelEgrClassF1, 0, 4851 197, 13); 4852 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassL2, 4853 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 4854 _bcmFieldSliceSelEgrClassF1, 0, 4855 197, 13); 4856 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassL3, 4857 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 4858 _bcmFieldSliceSelEgrClassF1, 0, 4859 197, 13); 4860 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyIngressClassField, 4861 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 4862 _bcmFieldSliceSelEgrClassF1, 0, 4863 197, 13); 4864 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 4865 bcmFieldQualifyIngressInterfaceClassPort, 4866 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 4867 _bcmFieldSliceSelEgrClassF1, 0, 4868 197, 13); 4869 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 4870 bcmFieldQualifyIngressInterfaceClassVPort, 4871 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 4872 _bcmFieldSliceSelEgrClassF1, 0, 4873 197, 13); 4874 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 4875 bcmFieldQualifyInterfaceClassVPort, 4876 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 4877 _bcmFieldSliceSelEgrClassF1, 0, 4878 197, 12); 4879 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyEgressClassTrill, 4880 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 4881 _bcmFieldSliceSelEgrClassF1, 3, 4882 197, 12); 4883 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyEgressClassL2Gre, 4884 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 4885 _bcmFieldSliceSelEgrClassF1, 3, 4886 197, 12); 4887 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyEgressClassVxlan, 4888 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 4889 _bcmFieldSliceSelEgrClassF1, 3, 4890 197, 12); 4891 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyForwardingVlanId, 4892 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 210, 12); 4893 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVrf, 4894 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 210, 13); 4895 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVpn, 4896 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 210, 13); 4897 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyForwardingType, 4898 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 223, 2); 4899 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDrop, 4900 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 225, 1); 4901 #if defined(BCM_MONTEREY_SUPPORT) && defined(BCM_PREEMPTION_SUPPORT) 4902 if (SOC_IS_MONTEREY(unit)) { 4903 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyPreemptablePacket, 4904 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 226, 1); 4905 } 4906 #endif 4907 4908 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4Ports, 4909 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 0, 1); 4910 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol, 4911 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 1, 8); 4912 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcIp6, 4913 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 4914 _bcmFieldSliceIp6AddrSelect, 4915 _BCM_FIELD_EGRESS_SLICE_V6_KEY_MODE_SIP6, 4916 9, 128); 4917 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstIp6, 4918 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 4919 _bcmFieldSliceIp6AddrSelect, 4920 _BCM_FIELD_EGRESS_SLICE_V6_KEY_MODE_DIP6, 4921 9, 128); 4922 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcIp6High, 4923 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 4924 _bcmFieldSliceIp6AddrSelect, 4925 _BCM_FIELD_EGRESS_SLICE_V6_KEY_MODE_SIP_DIP_64, 4926 9, 64); 4927 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstIp6High, 4928 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 4929 _bcmFieldSliceIp6AddrSelect, 4930 _BCM_FIELD_EGRESS_SLICE_V6_KEY_MODE_SIP_DIP_64, 4931 73, 64); 4932 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTos, 4933 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 137, 8); 4934 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyHiGigProxy, 4935 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 145, 1); 4936 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyHiGig, 4937 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 146, 1); 4938 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanId, 4939 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 147, 12); 4940 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInPort, 4941 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 159, 7); 4942 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3Routable, 4943 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 166, 1); 4944 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMirrorCopy, 4945 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 167, 1); 4946 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan, 4947 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 168, 16); 4948 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 4949 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 168, 12); 4950 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi, 4951 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 180, 1); 4952 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri, 4953 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 181, 3); 4954 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVlanFormat, 4955 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 184, 2); 4956 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstHiGig, 4957 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 186, 1); 4958 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassPort, 4959 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 4960 _bcmFieldSliceSelEgrClassF2, 0, 4961 187, 8); 4962 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL2, 4963 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 4964 _bcmFieldSliceSelEgrClassF2, 0, 4965 195, 13 4966 ); 4967 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL3, 4968 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 4969 _bcmFieldSliceSelEgrClassF2, 0, 4970 195, 13 4971 ); 4972 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField, 4973 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 4974 _bcmFieldSliceSelEgrClassF2, 0, 4975 195, 13 4976 ); 4977 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField, 4978 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 4979 _bcmFieldSliceSelEgrClassF2, 0, 4980 195, 13 4981 ); 4982 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL2, 4983 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 4984 _bcmFieldSliceSelEgrClassF2, 0, 4985 195, 13 4986 ); 4987 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL3, 4988 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 4989 _bcmFieldSliceSelEgrClassF2, 0, 4990 195, 13 4991 ); 4992 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassL2, 4993 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 4994 _bcmFieldSliceSelEgrClassF2, 0, 4995 195, 13 4996 ); 4997 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassL3, 4998 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 4999 _bcmFieldSliceSelEgrClassF2, 0, 5000 195, 13 5001 ); 5002 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyIngressClassField, 5003 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 5004 _bcmFieldSliceSelEgrClassF2, 0, 5005 195, 13 5006 ); 5007 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 5008 bcmFieldQualifyIngressInterfaceClassPort, 5009 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 5010 _bcmFieldSliceSelEgrClassF2, 0, 5011 195, 13 5012 ); 5013 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 5014 bcmFieldQualifyIngressInterfaceClassVPort, 5015 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 5016 _bcmFieldSliceSelEgrClassF2, 0, 5017 195, 13 5018 ); 5019 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 5020 bcmFieldQualifyInterfaceClassVPort, 5021 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 5022 _bcmFieldSliceSelEgrClassF2, 0, 5023 195, 12 5024 ); 5025 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassPort, 5026 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 5027 _bcmFieldSliceSelEgrClassF2, 3, 5028 187, 8); 5029 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyOutPort, 5030 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 5031 _bcmFieldSliceSelEgrClassF2, 3, 5032 195, 7 5033 ); 5034 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassPort, 5035 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 5036 _bcmFieldSliceSelEgrClassF2, 4, 5037 187, 8); 5038 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyEgressClassTrill, 5039 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 5040 _bcmFieldSliceSelEgrClassF2, 4, 5041 195, 12 5042 ); 5043 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyEgressClassWlan, 5044 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 5045 _bcmFieldSliceSelEgrClassF2, 4, 5046 195, 12 5047 ); 5048 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyEgressClassL2Gre, 5049 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 5050 _bcmFieldSliceSelEgrClassF2, 4, 5051 195, 12 5052 ); 5053 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyEgressClassVxlan, 5054 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 5055 _bcmFieldSliceSelEgrClassF2, 4, 5056 195, 12 5057 ); 5058 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstPort, 5059 _bcmFieldDevSelDisable, 0, 5060 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 5061 _bcmFieldSliceSelEgrClassF2, 5, 5062 0, 5063 195, 7, /* DST_PORT */ 5064 187, 8, /* DST_MODID */ 5065 0, 0, 5066 0 5067 ); 5068 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassPort, 5069 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 5070 _bcmFieldSliceSelEgrClassF2, 6, 5071 187, 8); 5072 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyEgressClass, 5073 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 5074 _bcmFieldSliceSelEgrClassF2, 6, 5075 195, 8); 5076 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpType, 5077 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 208, 5); 5078 5079 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyForwardingVlanId, 5080 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 213, 12); 5081 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVrf, 5082 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 213, 13); 5083 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVpn, 5084 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 213, 13); 5085 5086 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyForwardingType, 5087 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 226, 2); 5088 5089 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDrop, 5090 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 228, 1); 5091 #if defined(BCM_MONTEREY_SUPPORT) && defined(BCM_PREEMPTION_SUPPORT) 5092 if (SOC_IS_MONTEREY(unit)) { 5093 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyPreemptablePacket, 5094 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 229, 1); 5095 } 5096 #endif 5097 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIp6, 5098 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 0, 0); 5099 5100 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4Ports, 5101 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 0, 1); 5102 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIntPriority, 5103 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 1, 4); 5104 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyColor, 5105 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 5, 2); 5106 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpFrag, 5107 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 7, 2); 5108 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTcpControl, 5109 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 9, 6); 5110 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4DstPort, 5111 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 15, 16); 5112 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4SrcPort, 5113 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 31, 16); 5114 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIcmpTypeCode, 5115 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 31, 16); 5116 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTtl, 5117 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 47, 8); 5118 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstIp6, 5119 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 55, 128); 5120 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyExtensionHeaderSubCode, 5121 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 183, 8); 5122 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyExtensionHeaderType, 5123 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 191, 8); 5124 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpType, 5125 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 199, 5); 5126 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyEgressClassTrill, 5127 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 204, 12); 5128 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyEgressClassL2Gre, 5129 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 204, 12); 5130 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyEgressClassVxlan, 5131 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 204, 12); 5132 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDrop, 5133 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 216, 1); 5134 #if defined(BCM_MONTEREY_SUPPORT) && defined(BCM_PREEMPTION_SUPPORT) 5135 if (SOC_IS_MONTEREY(unit)) { 5136 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyPreemptablePacket, 5137 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 217, 1); 5138 } 5139 #endif 5140 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIp6, 5141 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 0, 0); 5142 5143 5144 /* FCOE EFP_KEY5 */ 5145 if (soc_feature(unit, soc_feature_fcoe)) { 5146 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanVFTFabricId, 5147 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 1, 12); 5148 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanVFTHopCount, 5149 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 13, 8); 5150 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanVFTValid, 5151 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 21, 1); 5152 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanRCtl, 5153 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 22, 8); 5154 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanDFCtl, 5155 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 30, 8); 5156 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanFCtl, 5157 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 38, 24); 5158 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanType, 5159 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 62, 8); 5160 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanDstId, 5161 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 70, 24); 5162 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanSrcId, 5163 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 94, 24); 5164 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanCSCtl, 5165 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 118, 8); 5166 } 5167 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyHiGigProxy, 5168 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 126, 1); 5169 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyHiGig, 5170 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 127, 1); 5171 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanId, 5172 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 128, 12); 5173 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInPort, 5174 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 140, 7); 5175 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3Routable, 5176 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 147, 1); 5177 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMirrorCopy, 5178 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 148, 1); 5179 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan, 5180 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 149, 16); 5181 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 5182 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 149, 12); 5183 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi, 5184 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 161, 1); 5185 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri, 5186 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 162, 3); 5187 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVlanFormat, 5188 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 165, 2); 5189 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstHiGig, 5190 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 167, 1); 5191 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassPort, 5192 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 5193 _bcmFieldSliceSelEgrDestPortF5, 0, 5194 168, 8 5195 ); 5196 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyOutPort, 5197 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 5198 _bcmFieldSliceSelEgrDestPortF5, 0, 5199 176, 7 5200 ); 5201 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstPort, 5202 _bcmFieldDevSelDisable, 0, 5203 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 5204 _bcmFieldSliceSelEgrDestPortF5, 1, 5205 0, 5206 176, 7, /* DST_PORT */ 5207 168, 8, /* DST_MODID */ 5208 0, 0, 5209 0 5210 ); 5211 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDrop, 5212 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 183, 1); 5213 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyForwardingVlanId, 5214 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 184, 12); 5215 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVrf, 5216 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 184, 13); 5217 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVpn, 5218 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 184, 13); 5219 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyForwardingType, 5220 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 198, 2); 5221 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL2, 5222 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 200, 13); 5223 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL3, 5224 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 200, 13); 5225 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField, 5226 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 200, 13); 5227 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField, 5228 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 200, 13); 5229 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL2, 5230 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 200, 13); 5231 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL3, 5232 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 200, 13); 5233 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassL2, 5234 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 200, 13); 5235 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassL3, 5236 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 200, 13); 5237 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIngressClassField, 5238 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 200, 13); 5239 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIngressInterfaceClassPort, 5240 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 200, 13); 5241 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIngressInterfaceClassVPort, 5242 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 200, 13); 5243 if (soc_feature(unit, soc_feature_fcoe)) { 5244 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanVFTPri, 5245 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 213, 3); 5246 } 5247 #if defined(BCM_MONTEREY_SUPPORT) && defined(BCM_PREEMPTION_SUPPORT) 5248 if (SOC_IS_MONTEREY(unit)) { 5249 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyPreemptablePacket, 5250 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 216, 1); 5251 } 5252 #endif 5253 5254 if (soc_feature(unit, soc_feature_fp_based_oam)) { 5255 /* OAM_SAT EFP_KEY6 */ 5256 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOamSat, 5257 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY6, 0, 0); 5258 /* EG_DVP_CLASS_ID */ 5259 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyEgressClassTrill, 5260 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY6, 5261 _bcmFieldSliceSelEgrOamOverlayKey4, 2, 5262 1, 12); 5263 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyEgressClassWlan, 5264 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY6, 5265 _bcmFieldSliceSelEgrOamOverlayKey4, 2, 5266 1, 12); 5267 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyEgressClassL2Gre, 5268 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY6, 5269 _bcmFieldSliceSelEgrOamOverlayKey4, 2, 5270 1, 12); 5271 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyEgressClassVxlan, 5272 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY6, 5273 _bcmFieldSliceSelEgrOamOverlayKey4, 2, 5274 1, 12); 5275 /* DVP_VALID + DVP + SPARE_DVP */ 5276 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstMplsGport, 5277 _bcmFieldDevSelDisable, 0, 5278 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY6, 5279 _bcmFieldSliceSelEgrOamOverlayKey4, 2, 5280 0, 5281 0, 1, /* DVP_VALID */ 5282 13, 14, /* DVP + SPARE_DVP */ 5283 0, 0, 5284 0 5285 ); 5286 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstMplsGports, 5287 _bcmFieldDevSelDisable, 0, 5288 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY6, 5289 _bcmFieldSliceSelEgrOamOverlayKey4, 2, 5290 0, 5291 0, 1, /* DVP_VALID */ 5292 13, 14, /* DVP + SPARE_DVP */ 5293 0, 0, 5294 0 5295 ); 5296 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstNivGport, 5297 _bcmFieldDevSelDisable, 0, 5298 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY6, 5299 _bcmFieldSliceSelEgrOamOverlayKey4, 2, 5300 0, 5301 0, 1, /* DVP_VALID */ 5302 13, 14, /* DVP + SPARE_DVP */ 5303 0, 0, 5304 0 5305 ); 5306 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstNivGports, 5307 _bcmFieldDevSelDisable, 0, 5308 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY6, 5309 _bcmFieldSliceSelEgrOamOverlayKey4, 2, 5310 0, 5311 0, 1, /* DVP_VALID */ 5312 13, 14, /* DVP + SPARE_DVP */ 5313 0, 0, 5314 0 5315 ); 5316 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstMimGport, 5317 _bcmFieldDevSelDisable, 0, 5318 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY6, 5319 _bcmFieldSliceSelEgrOamOverlayKey4, 2, 5320 0, 5321 0, 1, /* DVP_VALID */ 5322 13, 14, /* DVP + SPARE_DVP */ 5323 0, 0, 5324 0 5325 ); 5326 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstMimGports, 5327 _bcmFieldDevSelDisable, 0, 5328 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY6, 5329 _bcmFieldSliceSelEgrOamOverlayKey4, 2, 5330 0, 5331 0, 1, /* DVP_VALID */ 5332 13, 14, /* DVP + SPARE_DVP */ 5333 0, 0, 5334 0 5335 ); 5336 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstVxlanGport, 5337 _bcmFieldDevSelDisable, 0, 5338 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY6, 5339 _bcmFieldSliceSelEgrOamOverlayKey4, 2, 5340 0, 5341 0, 1, /* DVP_VALID */ 5342 13, 14, /* DVP + SPARE_DVP */ 5343 0, 0, 5344 0 5345 ); 5346 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstVxlanGports, 5347 _bcmFieldDevSelDisable, 0, 5348 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY6, 5349 _bcmFieldSliceSelEgrOamOverlayKey4, 2, 5350 0, 5351 0, 1, /* DVP_VALID */ 5352 13, 14, /* DVP + SPARE_DVP */ 5353 0, 0, 5354 0 5355 ); 5356 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstVlanGport, 5357 _bcmFieldDevSelDisable, 0, 5358 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY6, 5359 _bcmFieldSliceSelEgrOamOverlayKey4, 2, 5360 0, 5361 0, 1, /* DVP_VALID */ 5362 13, 14, /* DVP + SPARE_DVP */ 5363 0, 0, 5364 0 5365 ); 5366 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstVlanGports, 5367 _bcmFieldDevSelDisable, 0, 5368 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY6, 5369 _bcmFieldSliceSelEgrOamOverlayKey4, 2, 5370 0, 5371 0, 1, /* DVP_VALID */ 5372 13, 14, /* DVP + SPARE_DVP */ 5373 0, 0, 5374 0 5375 ); 5376 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstGport, 5377 _bcmFieldDevSelDisable, 0, 5378 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY6, 5379 _bcmFieldSliceSelEgrOamOverlayKey4, 2, 5380 0, 5381 0, 1, /* DVP_VALID */ 5382 13, 14, /* DVP + SPARE_DVP */ 5383 0, 0, 5384 0 5385 ); 5386 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstGports, 5387 _bcmFieldDevSelDisable, 0, 5388 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY6, 5389 _bcmFieldSliceSelEgrOamOverlayKey4, 2, 5390 0, 5391 0, 1, /* DVP_VALID */ 5392 13, 14, /* DVP + SPARE_DVP */ 5393 0, 0, 5394 0 5395 ); 5396 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyOamEgressPortUnicastDstMacHit, 5397 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY6, 5398 _bcmFieldSliceSelEgrOamOverlayKey4, 2, 5399 28, 1); 5400 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyIntPriority, 5401 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY6, 5402 _bcmFieldSliceSelEgrOamOverlayKey4, 2, 5403 29, 4); 5404 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyColor, 5405 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY6, 5406 _bcmFieldSliceSelEgrOamOverlayKey4, 2, 5407 33, 2); 5408 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 5409 bcmFieldQualifyOamHeaderBits32_63, 5410 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY6, 5411 _bcmFieldSliceSelEgrOamOverlayKey4, 2, 5412 35, 32); 5413 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 5414 bcmFieldQualifyOamHeaderBits0_31, 5415 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY6, 5416 _bcmFieldSliceSelEgrOamOverlayKey4, 2, 5417 67, 32); 5418 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyOamEgressClass2Vxlt, 5419 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY6, 5420 _bcmFieldSliceSelEgrOamOverlayKey4, 2, 5421 99, 12); 5422 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyOamEgressClassVxlt, 5423 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY6, 5424 _bcmFieldSliceSelEgrOamOverlayKey4, 2, 5425 111, 12); 5426 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 5427 bcmFieldQualifyOamEgressClassPort, 5428 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY6, 5429 _bcmFieldSliceSelEgrOamOverlayKey4, 2, 5430 123, 12); 5431 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyEgressClass, 5432 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY6, 5433 _bcmFieldSliceSelEgrOamOverlayKey4, 2, 5434 135, 8); 5435 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyOamEgressVxltSecondHit, 5436 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY6, 5437 _bcmFieldSliceSelEgrOamOverlayKey4, 2, 5438 143, 1); 5439 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyOamEgressVxltFirstHit, 5440 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY6, 5441 _bcmFieldSliceSelEgrOamOverlayKey4, 2, 5442 144, 1); 5443 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyOamEgressMulticastMacHit, 5444 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY6, 5445 _bcmFieldSliceSelEgrOamOverlayKey4, 2, 5446 145, 2); 5447 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlan, 5448 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY6, 5449 _bcmFieldSliceSelEgrOamOverlayKey4, 2, 5450 147, 16); 5451 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanId, 5452 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY6, 5453 _bcmFieldSliceSelEgrOamOverlayKey4, 2, 5454 147, 12); 5455 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanCfi, 5456 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY6, 5457 _bcmFieldSliceSelEgrOamOverlayKey4, 2, 5458 159, 1); 5459 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanPri, 5460 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY6, 5461 _bcmFieldSliceSelEgrOamOverlayKey4, 2, 5462 160, 3); 5463 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInPort, 5464 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY6, 5465 _bcmFieldSliceSelEgrOamOverlayKey4, 2, 5466 163, 7); 5467 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan, 5468 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY6, 5469 _bcmFieldSliceSelEgrOamOverlayKey4, 2, 5470 170, 16); 5471 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 5472 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY6, 5473 _bcmFieldSliceSelEgrOamOverlayKey4, 2, 5474 170, 12); 5475 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi, 5476 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY6, 5477 _bcmFieldSliceSelEgrOamOverlayKey4, 2, 5478 182, 1); 5479 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri, 5480 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY6, 5481 _bcmFieldSliceSelEgrOamOverlayKey4, 2, 5482 183, 3); 5483 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVlanFormat, 5484 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY6, 5485 _bcmFieldSliceSelEgrOamOverlayKey4, 2, 5486 186, 2); 5487 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyOamDownMEPLoopbackPacket, 5488 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY6, 5489 _bcmFieldSliceSelEgrOamOverlayKey4, 2, 5490 188, 1); 5491 _FP_QUAL_THREE_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassPort, 5492 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY6, 5493 _bcmFieldSliceSelEgrOamOverlayKey4, 2, 5494 _bcmFieldSliceSelEgrClassF6, 0, 5495 189, 8); 5496 _FP_QUAL_THREE_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL2, 5497 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY6, 5498 _bcmFieldSliceSelEgrOamOverlayKey4, 2, 5499 _bcmFieldSliceSelEgrClassF6, 0, 5500 197, 13 5501 ); 5502 _FP_QUAL_THREE_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL3, 5503 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY6, 5504 _bcmFieldSliceSelEgrOamOverlayKey4, 2, 5505 _bcmFieldSliceSelEgrClassF6, 0, 5506 197, 13 5507 ); 5508 _FP_QUAL_THREE_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField, 5509 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY6, 5510 _bcmFieldSliceSelEgrOamOverlayKey4, 2, 5511 _bcmFieldSliceSelEgrClassF6, 0, 5512 197, 13 5513 ); 5514 _FP_QUAL_THREE_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField, 5515 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY6, 5516 _bcmFieldSliceSelEgrOamOverlayKey4, 2, 5517 _bcmFieldSliceSelEgrClassF6, 0, 5518 197, 13 5519 ); 5520 _FP_QUAL_THREE_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL2, 5521 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY6, 5522 _bcmFieldSliceSelEgrOamOverlayKey4, 2, 5523 _bcmFieldSliceSelEgrClassF6, 0, 5524 197, 13 5525 ); 5526 _FP_QUAL_THREE_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL3, 5527 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY6, 5528 _bcmFieldSliceSelEgrOamOverlayKey4, 2, 5529 _bcmFieldSliceSelEgrClassF6, 0, 5530 197, 13 5531 ); 5532 _FP_QUAL_THREE_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassL2, 5533 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY6, 5534 _bcmFieldSliceSelEgrOamOverlayKey4, 2, 5535 _bcmFieldSliceSelEgrClassF6, 0, 5536 197, 13 5537 ); 5538 _FP_QUAL_THREE_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassL3, 5539 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY6, 5540 _bcmFieldSliceSelEgrOamOverlayKey4, 2, 5541 _bcmFieldSliceSelEgrClassF6, 0, 5542 197, 13 5543 ); 5544 _FP_QUAL_THREE_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyIngressClassField, 5545 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY6, 5546 _bcmFieldSliceSelEgrOamOverlayKey4, 2, 5547 _bcmFieldSliceSelEgrClassF6, 0, 5548 197, 13 5549 ); 5550 _FP_QUAL_THREE_SLICE_SEL_ADD(unit, stage_fc, 5551 bcmFieldQualifyIngressInterfaceClassPort, 5552 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY6, 5553 _bcmFieldSliceSelEgrOamOverlayKey4, 2, 5554 _bcmFieldSliceSelEgrClassF6, 0, 5555 197, 13 5556 ); 5557 _FP_QUAL_THREE_SLICE_SEL_ADD(unit, stage_fc, 5558 bcmFieldQualifyIngressInterfaceClassVPort, 5559 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY6, 5560 _bcmFieldSliceSelEgrOamOverlayKey4, 2, 5561 _bcmFieldSliceSelEgrClassF6, 0, 5562 197, 13 5563 ); 5564 _FP_QUAL_THREE_SLICE_SEL_ADD(unit, stage_fc, 5565 bcmFieldQualifyInterfaceClassVPort, 5566 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY6, 5567 _bcmFieldSliceSelEgrOamOverlayKey4, 2, 5568 _bcmFieldSliceSelEgrClassF6, 0, 5569 197, 12 5570 ); 5571 _FP_QUAL_THREE_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassPort, 5572 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY6, 5573 _bcmFieldSliceSelEgrOamOverlayKey4, 2, 5574 _bcmFieldSliceSelEgrClassF6, 1, 5575 189, 8); 5576 _FP_QUAL_THREE_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyOutPort, 5577 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY6, 5578 _bcmFieldSliceSelEgrOamOverlayKey4, 2, 5579 _bcmFieldSliceSelEgrClassF6, 1, 5580 197, 7); 5581 _FP_QUAL_THREE_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassPort, 5582 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY6, 5583 _bcmFieldSliceSelEgrOamOverlayKey4, 2, 5584 _bcmFieldSliceSelEgrClassF6, 2, 5585 189, 8); 5586 _FP_QUAL_THREE_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyCpuQueue, 5587 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY6, 5588 _bcmFieldSliceSelEgrOamOverlayKey4, 2, 5589 _bcmFieldSliceSelEgrClassF6, 2, 5590 197, 6); 5591 __FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstPort, 5592 _bcmFieldDevSelDisable, 0, 5593 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY6, 5594 _bcmFieldSliceSelEgrOamOverlayKey4, 2, 5595 _bcmFieldSliceSelEgrClassF6, 3, 5596 0, 5597 197, 7, /* DST_PORT */ 5598 189, 8, /* DST_MODID */ 5599 0, 0, 5600 0, 0 5601 ); 5602 _FP_QUAL_THREE_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassPort, 5603 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY6, 5604 _bcmFieldSliceSelEgrOamOverlayKey4, 2, 5605 _bcmFieldSliceSelEgrClassF6, 4, 5606 189, 8); 5607 _FP_QUAL_THREE_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyEgressClass, 5608 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY6, 5609 _bcmFieldSliceSelEgrOamOverlayKey4, 2, 5610 _bcmFieldSliceSelEgrClassF6, 4, 5611 197, 8); 5612 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyOamEgressEtherType, 5613 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY6, 5614 _bcmFieldSliceSelEgrOamOverlayKey4, 2, 5615 224, 2); 5616 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyOamEgressClassSrcMac, 5617 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY6, 5618 _bcmFieldSliceSelEgrOamOverlayKey4, 2, 5619 226, 4); 5620 } 5621 5622 return (BCM_E_NONE); 5623 } 5624 5625 /* 5626 * Function: 5627 * _field_apache_qualifiers_init 5628 * Purpose: 5629 * Initialize device qaualifiers select codes & offsets 5630 * Parameters: 5631 * unit - (IN) BCM device number. 5632 * stage_fc - (IN) Field Processor stage control structure. 5633 * 5634 * Returns: 5635 * BCM_E_NONE 5636 * Notes: 5637 */ 5638 int 5639 _field_apache_qualifiers_init(int unit, _field_stage_t *stage_fc) 5640 { 5641 /* Allocated stage qualifiers configuration array. */ 5642 _FP_XGS3_ALLOC(stage_fc->f_qual_arr, 5643 (_bcmFieldQualifyCount * sizeof(_bcm_field_qual_info_t *)), 5644 "Field qualifiers"); 5645 if (stage_fc->f_qual_arr == 0) { 5646 return (BCM_E_MEMORY); 5647 } 5648 5649 switch (stage_fc->stage_id) { 5650 case _BCM_FIELD_STAGE_LOOKUP: 5651 return (_field_apache_lookup_qualifiers_init(unit, stage_fc)); 5652 case _BCM_FIELD_STAGE_INGRESS: 5653 return (_field_apache_ingress_qualifiers_init(unit, stage_fc)); 5654 case _BCM_FIELD_STAGE_EGRESS: 5655 return (_field_apache_egress_qualifiers_init(unit, stage_fc)); 5656 default: 5657 ; 5658 } 5659 5660 sal_free(stage_fc->f_qual_arr); 5661 return (BCM_E_INTERNAL); 5662 } 5663 5664 /* 5665 * Function: 5666 * _bcm_field_apache_oam_drop_hw_encode 5667 * Purpose: 5668 * Encode data and mask based on the OAM MEP type 5669 * Parameters: 5670 * unit - (IN) BCM device number. 5671 * stage_id - (IN) Field Processor stage id 5672 * qual_id - (IN) Field Processor qualifier id 5673 * mep_type - (IN) OAM Drop MEP type 5674 * data - (OUT) Encoded data 5675 * mask - (OUT) Encoded mask 5676 * 5677 * Returns: 5678 * BCM_E_XXXX 5679 * Notes: 5680 */ 5681 int 5682 _bcm_field_apache_oam_drop_hw_encode(int unit, 5683 _field_stage_id_t stage_id, 5684 int qual_id, 5685 bcm_field_oam_drop_mep_type_t mep_type, 5686 uint8 *data, uint8 *mask) 5687 { 5688 uint8 mask_bits; 5689 int rv; 5690 5691 if ((data == NULL) || (mask == NULL)) { 5692 return BCM_E_PARAM; 5693 } 5694 5695 if (stage_id == _BCM_FIELD_STAGE_INGRESS) { 5696 if (qual_id == bcmFieldQualifyIngressDropEthernetOamControl) { 5697 switch (mep_type) { 5698 case bcmFieldOamDropPortDownMepControl: 5699 case bcmFieldOamDropInnerVlanDownMepControl: 5700 case bcmFieldOamDropOuterVlanDownMepControl: 5701 case bcmFieldOamDropInnerPlusOuterVlanDownMepControl: 5702 mask_bits = 7; 5703 rv = _bcm_oam_drop_control_fp_encode(unit, mep_type, data, mask); 5704 *mask = *mask & ((1 << mask_bits) - 1); 5705 return rv; 5706 break; 5707 default : 5708 break; 5709 } 5710 } else if (qual_id == bcmFieldQualifyIngressDropEthernetOamData) { 5711 switch (mep_type) { 5712 case bcmFieldOamDropPortDownMepData: 5713 case bcmFieldOamDropInnerVlanDownMepData: 5714 case bcmFieldOamDropOuterVlanDownMepData: 5715 case bcmFieldOamDropInnerPlusOuterVlanDownMepData: 5716 case bcmFieldOamDropInnerVlanUpMepData: 5717 case bcmFieldOamDropOuterVlanUpMepData: 5718 case bcmFieldOamDropInnerPlusOuterVlanUpMepData: 5719 mask_bits = 7; 5720 rv = _bcm_oam_drop_control_fp_encode(unit, mep_type, data, mask); 5721 *mask = *mask & ((1 << mask_bits) - 1); 5722 return rv; 5723 break; 5724 default : 5725 break; 5726 } 5727 }else if (qual_id == bcmFieldQualifyIngressDropMplsOamControl) { 5728 switch (mep_type) { 5729 case bcmFieldOamDropSectionPortMepControl: 5730 case bcmFieldOamDropSectionInnerVlanMepControl: 5731 case bcmFieldOamDropSectionOuterVlanMepControl: 5732 case bcmFieldOamDropSectionInnerPlusOuterVlanMepControl: 5733 case bcmFieldOamDropLSPMepControl: 5734 case bcmFieldOamDropPwMepControl: 5735 mask_bits = 8; 5736 rv = _bcm_oam_drop_control_fp_encode(unit, mep_type, data, mask); 5737 *mask = *mask & ((1 << mask_bits) - 1); 5738 return rv; 5739 break; 5740 default : 5741 break; 5742 } 5743 } else if (qual_id == bcmFieldQualifyIngressDropMplsOamData) { 5744 switch (mep_type) { 5745 case bcmFieldOamDropSectionPortMepData: 5746 case bcmFieldOamDropSectionInnerVlanMepData: 5747 case bcmFieldOamDropSectionOuterVlanMepData: 5748 case bcmFieldOamDropSectionInnerPlusOuterVlanMepData: 5749 case bcmFieldOamDropLSPMepData: 5750 case bcmFieldOamDropPwMepData: 5751 mask_bits = 7; 5752 rv = _bcm_oam_drop_control_fp_encode(unit, mep_type, data, mask); 5753 *mask = *mask & ((1 << mask_bits) - 1); 5754 return rv; 5755 break; 5756 default : 5757 break; 5758 } 5759 } 5760 } 5761 5762 return BCM_E_PARAM; 5763 } 5764 5765 /* 5766 * Function: 5767 * _bcm_field_apache_qualify_OamDropReason 5768 * Purpose: 5769 * Set match criteria to qualify on Drop reason for 5770 * a given entry. 5771 * Parameters: 5772 * unit - (IN) Unit number. 5773 * entry - (IN) BCM field entry id. 5774 * qual_id - (IN) BCM field qualifier id. 5775 * mep_type - (IN) Qualifier Mep Type. 5776 * Returns: 5777 * BCM_E_XXX 5778 * Notes: 5779 */ 5780 int 5781 _bcm_field_apache_qualify_OamDropReason( 5782 int unit, 5783 bcm_field_entry_t entry, 5784 int qual_id, 5785 bcm_field_oam_drop_mep_type_t mep_type) 5786 { 5787 int rv; 5788 _field_entry_t *f_ent = NULL; 5789 uint8 data; 5790 uint8 mask; 5791 5792 /* Search the entry by eid. */ 5793 BCM_IF_ERROR_RETURN(_field_entry_get(unit, entry, _FP_ENTRY_PRIMARY, &f_ent)); 5794 5795 if (f_ent->group == NULL) { 5796 return BCM_E_INTERNAL; 5797 } 5798 5799 BCM_IF_ERROR_RETURN(_bcm_field_apache_oam_drop_hw_encode(unit, 5800 f_ent->group->stage_id, 5801 qual_id, mep_type, &data, &mask)); 5802 5803 rv = _field_qualify32(unit, entry, qual_id, 5804 data, mask); 5805 5806 /* Update the Software Database*/ 5807 if (BCM_SUCCESS(rv)) { 5808 switch(qual_id) { 5809 case bcmFieldQualifyIngressDropEthernetOamControl: 5810 f_ent->eth_oam_ctrl_mep_type = mep_type; 5811 break; 5812 case bcmFieldQualifyIngressDropEthernetOamData: 5813 f_ent->eth_oam_data_mep_type = mep_type; 5814 break; 5815 case bcmFieldQualifyIngressDropMplsOamControl: 5816 f_ent->mpls_oam_ctrl_mep_type = mep_type; 5817 break; 5818 case bcmFieldQualifyIngressDropMplsOamData: 5819 f_ent->mpls_oam_data_mep_type = mep_type; 5820 break; 5821 default : 5822 break; 5823 } 5824 } 5825 5826 return rv; 5827 } 5828 5829 /* 5830 * Function: 5831 * _bcm_field_apache_qualify_OamDropReason_get 5832 * Purpose: 5833 * Get qualifier Drop reason for a given entry. 5834 * Parameters: 5835 * unit - (IN) Unit number. 5836 * entry - (IN) BCM field entry id. 5837 * qual_id - (IN) BCM field qualifier id. 5838 * mep_type - (OUT) Qualifier Mep Type. 5839 * Returns: 5840 * BCM_E_XXX 5841 * Notes: 5842 */ 5843 int 5844 _bcm_field_apache_qualify_OamDropReason_get( 5845 int unit, 5846 bcm_field_entry_t entry, 5847 int qual_id, 5848 bcm_field_oam_drop_mep_type_t *mep_type) 5849 { 5850 int rv; 5851 _field_entry_t *f_ent = NULL; 5852 uint8 data; 5853 uint8 mask; 5854 5855 if (mep_type == NULL) { 5856 return BCM_E_PARAM; 5857 } 5858 5859 /* Read qualifier match value and mask. */ 5860 BCM_IF_ERROR_RETURN(_bcm_field_entry_qualifier_uint8_get(unit, entry, 5861 qual_id, &data, &mask)); 5862 5863 if (mask == 0) { 5864 return BCM_E_NOT_FOUND; 5865 } 5866 5867 FP_LOCK(unit); 5868 5869 /* Search the entry by eid. */ 5870 rv = _field_entry_get(unit, entry, _FP_ENTRY_PRIMARY, &f_ent); 5871 5872 if (BCM_FAILURE(rv)) { 5873 FP_UNLOCK(unit); 5874 return rv; 5875 } 5876 5877 switch(qual_id) { 5878 case bcmFieldQualifyIngressDropEthernetOamControl: 5879 *mep_type = f_ent->eth_oam_ctrl_mep_type; 5880 break; 5881 case bcmFieldQualifyIngressDropEthernetOamData: 5882 *mep_type = f_ent->eth_oam_data_mep_type; 5883 break; 5884 case bcmFieldQualifyIngressDropMplsOamControl: 5885 *mep_type = f_ent->mpls_oam_ctrl_mep_type; 5886 break; 5887 case bcmFieldQualifyIngressDropMplsOamData: 5888 *mep_type = f_ent->mpls_oam_data_mep_type; 5889 break; 5890 default : 5891 *mep_type = 0; 5892 FP_UNLOCK(unit); 5893 return BCM_E_INTERNAL; 5894 break; 5895 } 5896 5897 FP_UNLOCK(unit); 5898 5899 if (*mep_type == 0) { 5900 return BCM_E_NOT_FOUND; 5901 } 5902 5903 return rv; 5904 } 5905 5906 int 5907 _bcm_field_apache_qualify_OamDropReason_delete( 5908 int unit, 5909 bcm_field_entry_t entry, 5910 int qual_id) 5911 { 5912 _field_entry_t *f_ent = NULL; 5913 5914 if(!((qual_id == bcmFieldQualifyIngressDropEthernetOamControl) || 5915 (qual_id == bcmFieldQualifyIngressDropEthernetOamData) || 5916 (qual_id == bcmFieldQualifyIngressDropMplsOamControl) || 5917 (qual_id == bcmFieldQualifyIngressDropMplsOamData))) { 5918 return BCM_E_NONE; 5919 } 5920 5921 /* Search the entry by eid. */ 5922 BCM_IF_ERROR_RETURN(_field_entry_get(unit, entry, _FP_ENTRY_PRIMARY, &f_ent)); 5923 5924 switch(qual_id) { 5925 case bcmFieldQualifyIngressDropEthernetOamControl: 5926 f_ent->eth_oam_ctrl_mep_type = 0; 5927 break; 5928 case bcmFieldQualifyIngressDropEthernetOamData: 5929 f_ent->eth_oam_data_mep_type = 0; 5930 break; 5931 case bcmFieldQualifyIngressDropMplsOamControl: 5932 f_ent->mpls_oam_ctrl_mep_type = 0; 5933 break; 5934 case bcmFieldQualifyIngressDropMplsOamData: 5935 f_ent->mpls_oam_data_mep_type = 0; 5936 break; 5937 /* coverity[dead_error_begin] */ 5938 default : 5939 break; 5940 } 5941 5942 return BCM_E_NONE; 5943 } 5944 5945 /* 5946 * Function: 5947 * _bcm_field_apache_sat_macsa_add 5948 * Purpose: 5949 * Add a mac sa and class id entry. 5950 * Parameters: 5951 * unit - (IN) Unit number. 5952 * mac - (IN) Src Mac. 5953 * class_id - (IN) Class id. 5954 * Returns: 5955 * BCM_E_XXX 5956 * Notes: 5957 */ 5958 int 5959 _bcm_field_apache_sat_macsa_add( 5960 int unit, 5961 bcm_mac_t mac, 5962 uint32 class_id) 5963 { 5964 int index; 5965 uint64 reg64,temp_mac; 5966 uint32 class_id_get; 5967 int rv = BCM_E_NONE; 5968 5969 COMPILER_64_ZERO(reg64); 5970 COMPILER_64_ZERO(temp_mac); 5971 5972 if (class_id <= 0 || class_id > BCM_MAX_SAT_MAC_SA_ENTRIES) { 5973 return BCM_E_PARAM; 5974 } 5975 rv = _bcm_field_apache_sat_macsa_get(unit, mac, &class_id_get, &index); 5976 if (rv == BCM_E_NONE) { 5977 return BCM_E_EXISTS; 5978 } 5979 SAL_MAC_ADDR_TO_UINT64(mac, temp_mac); 5980 if (index < BCM_MAX_SAT_MAC_SA_ENTRIES) { 5981 soc_reg64_field_set(unit, EGR_OAM_SAT_MISC_MAC_SAr, ®64, 5982 MAC_SAf, temp_mac); 5983 soc_reg64_field32_set(unit, EGR_OAM_SAT_MISC_MAC_SAr, ®64, 5984 MAC_SA_CLASS_IDf, class_id); 5985 rv = WRITE_EGR_OAM_SAT_MISC_MAC_SAr(unit, index, reg64); 5986 if (BCM_FAILURE(rv)) { 5987 return rv; 5988 } 5989 return BCM_E_NONE; 5990 } 5991 return BCM_E_FULL; 5992 } 5993 5994 /* 5995 * Function: 5996 * _bcm_field_apache_sat_macsa_get 5997 * Purpose: 5998 * Get class id corresponding to mac sa entry. 5999 * Parameters: 6000 * unit - (IN) Unit number. 6001 * maci - (IN) Src Mac. 6002 * class_id - (OUT)Class id. 6003 * idx - (OUT)index 6004 * Returns: 6005 * BCM_E_XXX 6006 * Notes: 6007 */ 6008 int 6009 _bcm_field_apache_sat_macsa_get( 6010 int unit, 6011 bcm_mac_t mac, 6012 uint32 *class_id, 6013 int *idx) 6014 { 6015 int index, empty = 0, first_void = 0; 6016 uint64 reg64, temp_mac, fetch_mac, zero64; 6017 int rv = BCM_E_NONE; 6018 6019 *idx = -1; 6020 COMPILER_64_ZERO(reg64); 6021 COMPILER_64_ZERO(temp_mac); 6022 COMPILER_64_ZERO(fetch_mac); 6023 COMPILER_64_ZERO(zero64); 6024 6025 SAL_MAC_ADDR_TO_UINT64(mac, temp_mac); 6026 for (index = 0; index < BCM_MAX_SAT_MAC_SA_ENTRIES; index++) { 6027 rv = READ_EGR_OAM_SAT_MISC_MAC_SAr(unit, index, ®64); 6028 if (BCM_FAILURE(rv)) { 6029 return rv; 6030 } 6031 fetch_mac = soc_reg64_field_get(unit, EGR_OAM_SAT_MISC_MAC_SAr, 6032 reg64, MAC_SAf); 6033 if (COMPILER_64_EQ(fetch_mac, zero64) && first_void == 0) { 6034 *idx = index; 6035 first_void = 1; 6036 } else if (COMPILER_64_NE(fetch_mac, zero64)) { 6037 if (COMPILER_64_EQ(fetch_mac, temp_mac)) { 6038 *class_id = soc_reg64_field32_get(unit, EGR_OAM_SAT_MISC_MAC_SAr, 6039 reg64, MAC_SA_CLASS_IDf); 6040 *idx = index; 6041 return BCM_E_NONE; 6042 } else { 6043 empty = 1; 6044 } 6045 } 6046 } 6047 if (*idx == -1) { 6048 *idx = index; 6049 } 6050 *class_id = 0; 6051 if (empty == 0) { 6052 return BCM_E_EMPTY; 6053 } 6054 return BCM_E_NOT_FOUND; 6055 } 6056 6057 /* 6058 * Function: 6059 * _bcm_field_apache_sat_macsa_delete 6060 * Purpose: 6061 * Delete mac sa and class id entry. 6062 * Parameters: 6063 * unit - (IN) Unit number. 6064 * mac - (IN) Src Mac. 6065 * Returns: 6066 * BCM_E_XXX 6067 * Notes: 6068 */ 6069 int 6070 _bcm_field_apache_sat_macsa_delete( 6071 int unit, 6072 bcm_mac_t mac) 6073 { 6074 int index; 6075 uint64 reg64, zero64; 6076 uint32 class_id_get; 6077 int rv = BCM_E_NONE; 6078 6079 COMPILER_64_ZERO(reg64); 6080 COMPILER_64_ZERO(zero64); 6081 6082 rv = _bcm_field_apache_sat_macsa_get(unit, mac, &class_id_get, &index); 6083 if (rv == BCM_E_NONE) { 6084 soc_reg64_field_set(unit, EGR_OAM_SAT_MISC_MAC_SAr, ®64, 6085 MAC_SAf, zero64); 6086 soc_reg64_field32_set(unit, EGR_OAM_SAT_MISC_MAC_SAr, ®64, 6087 MAC_SA_CLASS_IDf, 0); 6088 rv = WRITE_EGR_OAM_SAT_MISC_MAC_SAr(unit, index, reg64); 6089 } 6090 return rv; 6091 } 6092 6093 /* 6094 * Function: 6095 * _bcm_field_apache_sat_macsa_delete_all 6096 * Purpose: 6097 * Delete all mac sa and class id entries. 6098 * Parameters: 6099 * unit - (IN) Unit number. 6100 * Returns: 6101 * BCM_E_XXX 6102 * Notes: 6103 */ 6104 int 6105 _bcm_field_apache_sat_macsa_delete_all(int unit) 6106 { 6107 int index; 6108 uint64 reg64, zero64; 6109 int rv = BCM_E_NONE; 6110 6111 COMPILER_64_ZERO(reg64); 6112 COMPILER_64_ZERO(zero64); 6113 6114 for (index = 0; index < BCM_MAX_SAT_MAC_SA_ENTRIES; index++) { 6115 soc_reg64_field_set(unit, EGR_OAM_SAT_MISC_MAC_SAr, ®64, 6116 MAC_SAf, zero64); 6117 soc_reg64_field32_set(unit, EGR_OAM_SAT_MISC_MAC_SAr, ®64, 6118 MAC_SA_CLASS_IDf, 0); 6119 rv = WRITE_EGR_OAM_SAT_MISC_MAC_SAr(unit, index, reg64); 6120 if (BCM_FAILURE(rv)) { 6121 return rv; 6122 } 6123 } 6124 return BCM_E_NONE; 6125 } 6126 6127 #if defined BCM_WARM_BOOT_SUPPORT 6128 int 6129 _field_apache_entry_info_sync(int unit, 6130 _field_control_t *fc, 6131 _field_stage_t *stage_fc, 6132 _field_entry_t *f_ent 6133 ) 6134 { 6135 _field_action_t *redirect_action = NULL; 6136 _field_action_t *fa = NULL; 6137 uint8 action_flags = 0; 6138 uint8 statobject = 0; 6139 uint8 *buf = fc->scache_ptr[_FIELD_SCACHE_PART_0]; 6140 6141 if ( (stage_fc == NULL) || (f_ent == NULL)) { 6142 return BCM_E_INTERNAL; 6143 } 6144 6145 /* Save Ingress OAM Drop MEP Types */ 6146 if (_BCM_FIELD_STAGE_INGRESS == f_ent->group->stage_id) { 6147 buf[fc->scache_pos] = f_ent->eth_oam_ctrl_mep_type; 6148 fc->scache_pos++; 6149 buf[fc->scache_pos] = f_ent->eth_oam_data_mep_type; 6150 fc->scache_pos++; 6151 buf[fc->scache_pos] = f_ent->mpls_oam_ctrl_mep_type; 6152 fc->scache_pos++; 6153 buf[fc->scache_pos] = f_ent->mpls_oam_data_mep_type; 6154 fc->scache_pos++; 6155 } 6156 6157 /* Save COPYTOCPU, Redirect & StatObjSessionId action values */ 6158 if ((_BCM_FIELD_STAGE_INGRESS == f_ent->group->stage_id) || 6159 (_BCM_FIELD_STAGE_EGRESS == f_ent->group->stage_id)) { 6160 6161 fa = f_ent->actions; 6162 6163 while (fa !=NULL) { 6164 if ((fa->action == bcmFieldActionRedirect) && 6165 (fa->param[2])){ 6166 action_flags |= _FIELD_WB_ENTRY_ACTION_REDIRECT; 6167 if ((fa->param[3] == bcmFieldRedirectDestinationTrunk) && 6168 !BCM_GPORT_IS_TRUNK(fa->param[4])) { 6169 action_flags |= _FIELD_WB_ENTRY_ACTION_REDIRECT_TRUNK; 6170 } 6171 if (fa->param[2] & BCM_FIELD_REDIRECT_SOURCE_USE_CONFIGURED) { 6172 action_flags |= _FIELD_WB_ENTRY_ACTION_REDIRECT_SOURCE_GPORT; 6173 } 6174 redirect_action = fa; 6175 } else if ((fa->action == bcmFieldActionCopyToCpu) && 6176 (fa->param[2])){ 6177 action_flags |= _FIELD_WB_ENTRY_ACTION_COPYTOCPU; 6178 } else if (fa->action == bcmFieldActionOamStatObjectSessionId) { 6179 statobject = fa->param[0]; 6180 action_flags |= _FIELD_WB_ENTRY_ACTION_OAM_STATOBJECT_SESSION_ID; 6181 } 6182 fa = fa->next; 6183 } 6184 6185 buf[fc->scache_pos] = action_flags; 6186 fc->scache_pos++; 6187 6188 /* Write bcm_stat_object_t value */ 6189 if (action_flags & 6190 _FIELD_WB_ENTRY_ACTION_OAM_STATOBJECT_SESSION_ID) { 6191 buf[fc->scache_pos] = statobject; 6192 fc->scache_pos++; 6193 } 6194 6195 /* Write source gport type encoding values */ 6196 if ((action_flags & _FIELD_WB_ENTRY_ACTION_REDIRECT_SOURCE_GPORT) && 6197 redirect_action) { 6198 buf[fc->scache_pos] = 0; 6199 if (BCM_GPORT_IS_MPLS_PORT(redirect_action->param[5])) { 6200 buf[fc->scache_pos] = 1; 6201 } else if (BCM_GPORT_IS_NIV_PORT(redirect_action->param[5])) { 6202 buf[fc->scache_pos] = 2; 6203 } else if (BCM_GPORT_IS_MIM_PORT(redirect_action->param[5])) { 6204 buf[fc->scache_pos] = 3; 6205 } else if (BCM_GPORT_IS_TRILL_PORT(redirect_action->param[5])) { 6206 buf[fc->scache_pos] = 4; 6207 } else if (BCM_GPORT_IS_L2GRE_PORT(redirect_action->param[5])) { 6208 buf[fc->scache_pos] = 5; 6209 } else if (BCM_GPORT_IS_VXLAN_PORT(redirect_action->param[5])) { 6210 buf[fc->scache_pos] = 6; 6211 } 6212 fc->scache_pos++; 6213 } 6214 } 6215 return BCM_E_NONE; 6216 } 6217 6218 int 6219 _field_apache_entry_info_recovery(int unit, 6220 _field_control_t *fc, 6221 _field_stage_t *stage_fc, 6222 _field_entry_wb_info_t *f_ent_wb_info 6223 ) 6224 { 6225 uint8 *buf = fc->scache_ptr[_FIELD_SCACHE_PART_0]; 6226 uint8 action_flags; 6227 6228 if ((f_ent_wb_info == NULL) || (stage_fc == NULL)) { 6229 return BCM_E_INTERNAL; 6230 } 6231 6232 /* Retrieve OAM MEP type */ 6233 if (stage_fc->stage_id == _BCM_FIELD_STAGE_INGRESS) { 6234 f_ent_wb_info->ingress_oam_mep_type[0] = buf[fc->scache_pos]; 6235 fc->scache_pos++; 6236 f_ent_wb_info->ingress_oam_mep_type[1] = buf[fc->scache_pos]; 6237 fc->scache_pos++; 6238 f_ent_wb_info->ingress_oam_mep_type[2] = buf[fc->scache_pos]; 6239 fc->scache_pos++; 6240 f_ent_wb_info->ingress_oam_mep_type[3] = buf[fc->scache_pos]; 6241 fc->scache_pos++; 6242 } 6243 6244 /* Retrieve COPYTOCPU, Redirect & StatObjectSessionId params */ 6245 if ((_BCM_FIELD_STAGE_INGRESS == stage_fc->stage_id) || 6246 (_BCM_FIELD_STAGE_EGRESS == stage_fc->stage_id)) { 6247 6248 action_flags = buf[fc->scache_pos]; 6249 fc->scache_pos++; 6250 6251 /* Retrieve StatObjectSessionId params */ 6252 if (action_flags & 6253 _FIELD_WB_ENTRY_ACTION_OAM_STATOBJECT_SESSION_ID) { 6254 f_ent_wb_info->action_StatObjSId_wb.valid = 1; 6255 f_ent_wb_info->action_StatObjSId_wb.stat_object = buf[fc->scache_pos]; 6256 fc->scache_pos++; 6257 } 6258 6259 /* Retrieve COPYTOCPU params */ 6260 if (action_flags & 6261 _FIELD_WB_ENTRY_ACTION_COPYTOCPU) { 6262 f_ent_wb_info->action_copytocpu_wb.valid = 1; 6263 } 6264 6265 /* Retrieve Redirect params */ 6266 if (action_flags & 6267 _FIELD_WB_ENTRY_ACTION_REDIRECT) { 6268 f_ent_wb_info->action_redir_wb.valid = 1; 6269 6270 if (action_flags & 6271 _FIELD_WB_ENTRY_ACTION_REDIRECT_TRUNK) { 6272 f_ent_wb_info->action_redir_wb.valid = 3; 6273 } 6274 6275 f_ent_wb_info->action_redir_wb.params.destination = BCM_GPORT_INVALID; 6276 f_ent_wb_info->action_redir_wb.params.source_port = BCM_GPORT_INVALID; 6277 /* Retrieve Redirect source port */ 6278 if (action_flags & 6279 _FIELD_WB_ENTRY_ACTION_REDIRECT_SOURCE_GPORT) { 6280 f_ent_wb_info->action_redir_wb.params.source_port = buf[fc->scache_pos]; 6281 fc->scache_pos++; 6282 } 6283 } 6284 } 6285 return BCM_E_NONE; 6286 } 6287 6288 int 6289 _field_apache_actions_recovery(int unit, 6290 soc_mem_t policy_mem, 6291 uint32 *policy_entry, 6292 _field_entry_t *f_ent, 6293 _field_entry_wb_info_t *f_ent_wb_info 6294 ) 6295 { 6296 uint32 param0, param1, param2 = 0, param3 = 0, param4 = 0, param5 = 0; 6297 uint32 hw_index, append; 6298 bcm_field_action_t action; /* Action type */ 6299 int rv = BCM_E_NONE; 6300 6301 if ((f_ent == NULL) || (f_ent_wb_info == NULL) || 6302 (policy_entry == NULL)) { 6303 return BCM_E_INTERNAL; 6304 } 6305 6306 if (f_ent_wb_info->action_copytocpu_wb.valid) { 6307 f_ent_wb_info->action_copytocpu_wb.valid = 0; 6308 action = param0 = param1 = param2 = param3 = param4 = param5 = hw_index = append = 0; 6309 action = bcmFieldActionCopyToCpu; 6310 param2 = f_ent_wb_info->action_copytocpu_wb.params.flags; 6311 if (SOC_MEM_FIELD_VALID(unit, policy_mem, MATCHED_RULEf)) { 6312 param3 = PolicyGet(unit, policy_mem, policy_entry, MATCHED_RULEf); 6313 } 6314 rv = _field_trx_actions_recover_action_add(unit, 6315 f_ent, 6316 action, 6317 param0, 6318 param1, 6319 param2, 6320 param3, 6321 param4, 6322 param5, 6323 hw_index 6324 ); 6325 if (BCM_FAILURE(rv)) { 6326 return rv; 6327 } 6328 } 6329 6330 if (f_ent_wb_info->action_redir_wb.valid) { 6331 f_ent_wb_info->action_redir_wb.valid = 0; 6332 action = param0 = param1 = param2 = param3 = param4 = param5 = hw_index = append = 0; 6333 action = bcmFieldActionRedirect; 6334 param2 = f_ent_wb_info->action_redir_wb.params.flags; 6335 param3 = f_ent_wb_info->action_redir_wb.params.destination_type; 6336 param4 = f_ent_wb_info->action_redir_wb.params.destination; 6337 param5 = f_ent_wb_info->action_redir_wb.params.source_port; 6338 rv = _field_trx_actions_recover_action_add(unit, 6339 f_ent, 6340 action, 6341 param0, 6342 param1, 6343 param2, 6344 param3, 6345 param4, 6346 param5, 6347 hw_index 6348 ); 6349 if (BCM_FAILURE(rv)) { 6350 return rv; 6351 } 6352 } 6353 return rv; 6354 } 6355 #endif /* BCM_WARM_BOOT_SUPPORT */ 6356 6357 #endif /* BCM_APACHE_SUPPORT && BCM_FIELD_SUPPORT */