field.c (452549B)
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: BCM56860 Field Processor installation functions. 8 */ 9 10 #include <shared/bsl.h> 11 12 #include <soc/defs.h> 13 #if (defined(BCM_TRIDENT2PLUS_SUPPORT) || defined(BCM_APACHE_SUPPORT)) && \ 14 defined(BCM_FIELD_SUPPORT) 15 16 #include <soc/mem.h> 17 #include <soc/drv.h> 18 #include <soc/trident2.h> 19 #include <soc/triumph3.h> 20 21 #include <bcm/error.h> 22 #include <bcm/l3.h> 23 #include <bcm/field.h> 24 #include <bcm/tunnel.h> 25 26 #include <bcm_int/common/multicast.h> 27 28 #include <bcm_int/esw_dispatch.h> 29 #include <bcm_int/esw/field.h> 30 #include <bcm_int/esw/flex_ctr.h> 31 #include <bcm_int/esw/l3.h> 32 #include <bcm_int/esw/policer.h> 33 #include <bcm_int/esw/trx.h> 34 #include <bcm_int/esw/triumph.h> 35 #include <bcm_int/esw/trident.h> 36 #include <bcm_int/esw/trident2.h> 37 #include <bcm_int/esw/nat.h> 38 39 #define ALIGN32(x) (((x) + 31) & ~31) 40 41 42 /* 43 * Function: 44 * _field_td2_functions_init 45 * 46 * Purpose: 47 * Set up functions pointers 48 * 49 * Parameters: 50 * stage_fc - (IN/OUT) pointers to stage control block whe the device 51 * and stage specific functions will be registered. 52 * 53 * Returns: 54 * nothing 55 * Notes: 56 */ 57 void _field_td2plus_functions_init(_field_funct_t *functions) 58 { 59 functions->fp_detach = _bcm_field_tr_detach; 60 functions->fp_group_install = _field_td2_group_install; 61 functions->fp_selcodes_install = _field_td2_selcodes_install; 62 functions->fp_slice_clear = _field_td2_slice_clear; 63 functions->fp_entry_remove = _bcm_field_fb_entry_remove; 64 functions->fp_entry_move = _field_td2_entry_move; 65 functions->fp_selcode_get = _field_td2_selcode_get; 66 functions->fp_selcode_to_qset = _bcm_field_selcode_to_qset; 67 functions->fp_qual_list_get = _bcm_field_qual_lists_get; 68 functions->fp_tcam_policy_clear = NULL; 69 functions->fp_tcam_policy_install = _bcm_field_tr_entry_install; 70 functions->fp_tcam_policy_reinstall = _bcm_field_tr_entry_reinstall; 71 functions->fp_policer_install = _bcm_field_trx_policer_install; 72 functions->fp_write_slice_map = _bcm_field_td2_write_slice_map; 73 functions->fp_qualify_ip_type = _bcm_field_td2_qualify_ip_type; 74 functions->fp_qualify_ip_type_get = _bcm_field_td2_qualify_ip_type_get; 75 functions->fp_action_support_check = _field_td2_action_support_check; 76 functions->fp_action_conflict_check = _bcm_field_td2_action_conflict_check; 77 functions->fp_counter_get = _bcm_field_td_counter_get; 78 functions->fp_counter_set = _bcm_field_td_counter_set; 79 functions->fp_stat_index_get = _bcm_field_trx_stat_index_get; 80 functions->fp_action_params_check = _field_td2_action_params_check; 81 functions->fp_action_depends_check = NULL; 82 functions->fp_egress_key_match_type_set 83 = _bcm_field_trx_egress_key_match_type_set; 84 functions->fp_external_entry_install = NULL; 85 functions->fp_external_entry_reinstall = NULL; 86 functions->fp_external_entry_remove = NULL; 87 functions->fp_external_entry_prio_set = NULL; 88 functions->fp_data_qualifier_ethertype_add 89 = _bcm_field_trx2_data_qualifier_ethertype_add; 90 functions->fp_data_qualifier_ethertype_delete 91 = _bcm_field_trx2_data_qualifier_ethertype_delete; 92 functions->fp_data_qualifier_ip_protocol_add 93 = _bcm_field_trx2_data_qualifier_ip_protocol_add; 94 functions->fp_data_qualifier_ip_protocol_delete 95 = _bcm_field_trx2_data_qualifier_ip_protocol_delete; 96 functions->fp_data_qualifier_packet_format_add 97 = _bcm_field_trx2_data_qualifier_packet_format_add; 98 functions->fp_data_qualifier_packet_format_delete 99 = _bcm_field_trx2_data_qualifier_packet_format_delete; 100 functions->fp_stat_value_get = NULL; 101 functions->fp_stat_value_set = NULL; 102 functions->fp_control_set = _bcm_field_control_set; 103 functions->fp_control_get = _bcm_field_control_get; 104 functions->fp_stat_hw_mode_get = _bcm_field_stat_hw_mode_get; 105 functions->fp_stat_hw_alloc = _bcm_field_td2plus_stat_hw_alloc; 106 functions->fp_stat_hw_free = _bcm_field_td2plus_stat_hw_free; 107 functions->fp_group_add = NULL; 108 functions->fp_qualify_trunk = _bcm_field_qualify_trunk; 109 functions->fp_qualify_trunk_get = _bcm_field_qualify_trunk_get; 110 functions->fp_qualify_inports = _bcm_field_qualify_InPorts; 111 functions->fp_entry_stat_extended_attach = 112 _bcm_field_td2plus_entry_stat_extended_attach; 113 functions->fp_entry_stat_extended_get = 114 _bcm_field_td2plus_entry_stat_extended_get; 115 functions->fp_entry_stat_detach = _bcm_field_td2plus_entry_stat_detach; 116 functions->fp_class_size_get = NULL; 117 functions->fp_qualify_packet_res = _bcm_field_td2_qualify_PacketRes; 118 functions->fp_qualify_packet_res_get = _bcm_field_td2_qualify_PacketRes_get; 119 120 return; 121 } 122 123 /* 124 * Function: 125 * _field_td2plus_ingress_qualifiers_init 126 * Purpose: 127 * Initialize device stage ingress qualifiers 128 * select codes & offsets 129 * Parameters: 130 * unit - (IN) BCM device number. 131 * stage_fc - (IN) Field Processor stage control structure. 132 * 133 * Returns: 134 * BCM_E_NONE 135 */ 136 STATIC int 137 _field_td2plus_ingress_qualifiers_init(int unit, _field_stage_t *stage_fc) 138 { 139 const unsigned 140 f2_offset = 10 - 2, 141 fixed_offset = 138 - 2, 142 fixed_pairing_overlay_offset = fixed_offset, 143 fp_global_mask_tcam_ofs = ALIGN32(soc_mem_field_length(unit, FP_TCAMm, KEYf)), 144 f3_offset = 2 - 2, 145 f1_offset = 51 - 2, 146 ipbm_pairing_f0_offset = 101 - 2; 147 148 _FP_QUAL_DECL; 149 150 /* Handled outside normal qualifier set/get scheme */ 151 152 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyStage, 153 _bcmFieldSliceSelDisable, 0, 154 0, 0 155 ); 156 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyStageIngress, 157 _bcmFieldSliceSelDisable, 0, 158 0, 0 159 ); 160 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIp4, 161 _bcmFieldSliceSelDisable, 0, 162 0, 0 163 ); 164 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIp6, 165 _bcmFieldSliceSelDisable, 0, 166 0, 0 167 ); 168 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInPort, 169 _bcmFieldSliceSelDisable, 0, 170 0, 0 171 ); 172 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInPorts, 173 _bcmFieldSliceSelDisable, 0, 174 0, 0 175 ); 176 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyNormalizeIpAddrs, 177 _bcmFieldSliceSelDisable, 0, 178 0, 0 179 ); 180 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyNormalizeMacAddrs, 181 _bcmFieldSliceSelDisable, 0, 182 0, 0 183 ); 184 185 /* FPF1 single wide */ 186 /* Present in Global Mask Field */ 187 if (soc_feature(unit, soc_feature_td2p_fp_sw_war)) { 188 /* SW WAR for Td2+ A0 to ignore F1_0[3:0] for second part of double wide mode */ 189 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL2, 190 _bcmFieldSliceSelFpf1, 0, 191 _bcmFieldSliceDstClassSelect, 0, 192 fp_global_mask_tcam_ofs + f1_offset, 10); 193 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL3, 194 _bcmFieldSliceSelFpf1, 0, 195 _bcmFieldSliceDstClassSelect, 1, 196 fp_global_mask_tcam_ofs + f1_offset, 10); 197 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField, 198 _bcmFieldSliceSelFpf1, 0, 199 _bcmFieldSliceDstClassSelect, 2, 200 fp_global_mask_tcam_ofs + f1_offset, 10); 201 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField, 202 _bcmFieldSliceSelFpf1, 0, 203 _bcmFieldSliceDstClassSelect, 3, 204 fp_global_mask_tcam_ofs + f1_offset, 10); 205 } else { 206 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL2, 207 _bcmFieldSliceSelFpf1, 0, 208 _bcmFieldSliceDstClassSelect, 0, 209 fp_global_mask_tcam_ofs + f1_offset, 10); 210 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL3, 211 _bcmFieldSliceSelFpf1, 0, 212 _bcmFieldSliceDstClassSelect, 1, 213 fp_global_mask_tcam_ofs + f1_offset, 10); 214 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField, 215 _bcmFieldSliceSelFpf1, 0, 216 _bcmFieldSliceDstClassSelect, 2, 217 fp_global_mask_tcam_ofs + f1_offset, 10); 218 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField, 219 _bcmFieldSliceSelFpf1, 0, 220 _bcmFieldSliceDstClassSelect, 3, 221 fp_global_mask_tcam_ofs + f1_offset, 10); 222 } 223 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL2, 224 _bcmFieldSliceSelFpf1, 0, 225 _bcmFieldSliceSrcClassSelect, 0, 226 fp_global_mask_tcam_ofs + f1_offset + 10, 10); 227 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL3, 228 _bcmFieldSliceSelFpf1, 0, 229 _bcmFieldSliceSrcClassSelect, 1, 230 fp_global_mask_tcam_ofs + f1_offset + 10, 10); 231 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField, 232 _bcmFieldSliceSelFpf1, 0, 233 _bcmFieldSliceSrcClassSelect, 2, 234 fp_global_mask_tcam_ofs + f1_offset + 10, 10); 235 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField, 236 _bcmFieldSliceSelFpf1, 0, 237 _bcmFieldSliceSrcClassSelect, 3, 238 fp_global_mask_tcam_ofs + f1_offset + 10, 10); 239 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVrf, 240 _bcmFieldSliceSelFpf1, 0, 241 _bcmFieldSliceFwdFieldSelect, 242 _bcmFieldFwdFieldVrf, 243 fp_global_mask_tcam_ofs + f1_offset + 20, 13); 244 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVpn, 245 _bcmFieldSliceSelFpf1, 0, 246 _bcmFieldSliceFwdFieldSelect, 247 _bcmFieldFwdFieldVpn, 248 fp_global_mask_tcam_ofs + f1_offset + 20, 13); 249 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyForwardingVlanId, 250 _bcmFieldSliceSelFpf1, 0, 251 _bcmFieldSliceFwdFieldSelect, 252 _bcmFieldFwdFieldVlan, 253 fp_global_mask_tcam_ofs + f1_offset + 20, 13); 254 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMplsGport, 255 _bcmFieldSliceSelFpf1, 0, 256 _bcmFieldSliceIngressEntitySelect, 257 _bcmFieldFwdEntityMplsGport, 258 fp_global_mask_tcam_ofs + f1_offset + 33, 16); 259 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMplsGports, 260 _bcmFieldSliceSelFpf1, 0, 261 _bcmFieldSliceIngressEntitySelect, 262 _bcmFieldFwdEntityMplsGport, 263 fp_global_mask_tcam_ofs + f1_offset + 33, 16); 264 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcNivGport, 265 _bcmFieldSliceSelFpf1, 0, 266 _bcmFieldSliceIngressEntitySelect, 267 _bcmFieldFwdEntityNivGport, 268 fp_global_mask_tcam_ofs + f1_offset + 33, 16); 269 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcNivGports, 270 _bcmFieldSliceSelFpf1, 0, 271 _bcmFieldSliceIngressEntitySelect, 272 _bcmFieldFwdEntityNivGport, 273 fp_global_mask_tcam_ofs + f1_offset + 33, 16); 274 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMimGport, 275 _bcmFieldSliceSelFpf1, 0, 276 _bcmFieldSliceIngressEntitySelect, 277 _bcmFieldFwdEntityMimGport, 278 fp_global_mask_tcam_ofs + f1_offset + 33, 16); 279 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMimGports, 280 _bcmFieldSliceSelFpf1, 0, 281 _bcmFieldSliceIngressEntitySelect, 282 _bcmFieldFwdEntityMimGport, 283 fp_global_mask_tcam_ofs + f1_offset + 33, 16); 284 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVxlanGport, 285 _bcmFieldSliceSelFpf1, 0, 286 _bcmFieldSliceIngressEntitySelect, 287 _bcmFieldFwdEntityVxlanGport, 288 fp_global_mask_tcam_ofs + f1_offset + 33, 16); 289 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVxlanGports, 290 _bcmFieldSliceSelFpf1, 0, 291 _bcmFieldSliceIngressEntitySelect, 292 _bcmFieldFwdEntityVxlanGport, 293 fp_global_mask_tcam_ofs + f1_offset + 33, 16); 294 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVlanGport, 295 _bcmFieldSliceSelFpf1, 0, 296 _bcmFieldSliceIngressEntitySelect, 297 _bcmFieldFwdEntityVlanGport, 298 fp_global_mask_tcam_ofs + f1_offset + 33, 16); 299 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVlanGports, 300 _bcmFieldSliceSelFpf1, 0, 301 _bcmFieldSliceIngressEntitySelect, 302 _bcmFieldFwdEntityVlanGport, 303 fp_global_mask_tcam_ofs + f1_offset + 33, 16); 304 if (soc_feature(unit, soc_feature_td2p_fp_sw_war)) { 305 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstPort, 306 _bcmFieldSliceSelFpf1, 1, 307 _bcmFieldSliceDstFwdEntitySelect, 308 _bcmFieldFwdEntityGlp, 309 fp_global_mask_tcam_ofs + f1_offset, 21); 310 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstTrunk, 311 _bcmFieldSliceSelFpf1, 1, 312 _bcmFieldSliceDstFwdEntitySelect, 313 _bcmFieldFwdEntityGlp, 314 fp_global_mask_tcam_ofs + f1_offset, 21); 315 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMplsGport, 316 _bcmFieldSliceSelFpf1, 1, 317 _bcmFieldSliceDstFwdEntitySelect, 318 _bcmFieldFwdEntityMplsGport, 319 fp_global_mask_tcam_ofs + f1_offset, 21); 320 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMplsGports, 321 _bcmFieldSliceSelFpf1, 1, 322 _bcmFieldSliceDstFwdEntitySelect, 323 _bcmFieldFwdEntityMplsGport, 324 fp_global_mask_tcam_ofs + f1_offset, 21); 325 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstNivGport, 326 _bcmFieldSliceSelFpf1, 1, 327 _bcmFieldSliceDstFwdEntitySelect, 328 _bcmFieldFwdEntityNivGport, 329 fp_global_mask_tcam_ofs + f1_offset, 21); 330 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstNivGports, 331 _bcmFieldSliceSelFpf1, 1, 332 _bcmFieldSliceDstFwdEntitySelect, 333 _bcmFieldFwdEntityNivGport, 334 fp_global_mask_tcam_ofs + f1_offset, 21); 335 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMimGport, 336 _bcmFieldSliceSelFpf1, 1, 337 _bcmFieldSliceDstFwdEntitySelect, 338 _bcmFieldFwdEntityMimGport, 339 fp_global_mask_tcam_ofs + f1_offset, 21); 340 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMimGports, 341 _bcmFieldSliceSelFpf1, 1, 342 _bcmFieldSliceDstFwdEntitySelect, 343 _bcmFieldFwdEntityMimGport, 344 fp_global_mask_tcam_ofs + f1_offset, 21); 345 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstVxlanGport, 346 _bcmFieldSliceSelFpf1, 1, 347 _bcmFieldSliceDstFwdEntitySelect, 348 _bcmFieldFwdEntityVxlanGport, 349 fp_global_mask_tcam_ofs + f1_offset, 21); 350 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstVxlanGports, 351 _bcmFieldSliceSelFpf1, 1, 352 _bcmFieldSliceDstFwdEntitySelect, 353 _bcmFieldFwdEntityVxlanGport, 354 fp_global_mask_tcam_ofs + f1_offset, 21); 355 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstVlanGport, 356 _bcmFieldSliceSelFpf1, 1, 357 _bcmFieldSliceDstFwdEntitySelect, 358 _bcmFieldFwdEntityVlanGport, 359 fp_global_mask_tcam_ofs + f1_offset, 21); 360 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstVlanGports, 361 _bcmFieldSliceSelFpf1, 1, 362 _bcmFieldSliceDstFwdEntitySelect, 363 _bcmFieldFwdEntityVlanGport, 364 fp_global_mask_tcam_ofs + f1_offset, 21); 365 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstL3Egress, 366 _bcmFieldSliceSelFpf1, 1, 367 _bcmFieldSliceDstFwdEntitySelect, 368 _bcmFieldFwdEntityL3Egress, 369 fp_global_mask_tcam_ofs + f1_offset, 21); 370 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstL3EgressNextHops, 371 _bcmFieldSliceSelFpf1, 1, 372 _bcmFieldSliceDstFwdEntitySelect, 373 _bcmFieldFwdEntityL3Egress, 374 fp_global_mask_tcam_ofs + f1_offset, 21); 375 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMulticastGroup, 376 _bcmFieldSliceSelFpf1, 1, 377 _bcmFieldSliceDstFwdEntitySelect, 378 _bcmFieldFwdEntityMulticastGroup, 379 fp_global_mask_tcam_ofs + f1_offset, 21); 380 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMulticastGroups, 381 _bcmFieldSliceSelFpf1, 1, 382 _bcmFieldSliceDstFwdEntitySelect, 383 _bcmFieldFwdEntityMulticastGroup, 384 fp_global_mask_tcam_ofs + f1_offset, 21); 385 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMultipath, 386 _bcmFieldSliceSelFpf1, 1, 387 _bcmFieldSliceDstFwdEntitySelect, 388 _bcmFieldFwdEntityMultipath, 389 fp_global_mask_tcam_ofs + f1_offset, 21); 390 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstGport, 391 _bcmFieldSliceSelFpf1, 1, 392 _bcmFieldSliceDstFwdEntitySelect, 393 _bcmFieldFwdEntityCommonGport, 394 fp_global_mask_tcam_ofs + f1_offset, 21); 395 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstGports, 396 _bcmFieldSliceSelFpf1, 1, 397 _bcmFieldSliceDstFwdEntitySelect, 398 _bcmFieldFwdEntityCommonGport, 399 fp_global_mask_tcam_ofs + f1_offset, 21); 400 } else { 401 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstPort, 402 _bcmFieldSliceSelFpf1, 1, 403 _bcmFieldSliceDstFwdEntitySelect, 404 _bcmFieldFwdEntityGlp, 405 fp_global_mask_tcam_ofs + f1_offset, 21); 406 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstTrunk, 407 _bcmFieldSliceSelFpf1, 1, 408 _bcmFieldSliceDstFwdEntitySelect, 409 _bcmFieldFwdEntityGlp, 410 fp_global_mask_tcam_ofs + f1_offset, 21); 411 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMplsGport, 412 _bcmFieldSliceSelFpf1, 1, 413 _bcmFieldSliceDstFwdEntitySelect, 414 _bcmFieldFwdEntityMplsGport, 415 fp_global_mask_tcam_ofs + f1_offset, 21); 416 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMplsGports, 417 _bcmFieldSliceSelFpf1, 1, 418 _bcmFieldSliceDstFwdEntitySelect, 419 _bcmFieldFwdEntityMplsGport, 420 fp_global_mask_tcam_ofs + f1_offset, 21); 421 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstNivGport, 422 _bcmFieldSliceSelFpf1, 1, 423 _bcmFieldSliceDstFwdEntitySelect, 424 _bcmFieldFwdEntityNivGport, 425 fp_global_mask_tcam_ofs + f1_offset, 21); 426 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstNivGports, 427 _bcmFieldSliceSelFpf1, 1, 428 _bcmFieldSliceDstFwdEntitySelect, 429 _bcmFieldFwdEntityNivGport, 430 fp_global_mask_tcam_ofs + f1_offset, 21); 431 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMimGport, 432 _bcmFieldSliceSelFpf1, 1, 433 _bcmFieldSliceDstFwdEntitySelect, 434 _bcmFieldFwdEntityMimGport, 435 fp_global_mask_tcam_ofs + f1_offset, 21); 436 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMimGports, 437 _bcmFieldSliceSelFpf1, 1, 438 _bcmFieldSliceDstFwdEntitySelect, 439 _bcmFieldFwdEntityMimGport, 440 fp_global_mask_tcam_ofs + f1_offset, 21); 441 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstVxlanGport, 442 _bcmFieldSliceSelFpf1, 1, 443 _bcmFieldSliceDstFwdEntitySelect, 444 _bcmFieldFwdEntityVxlanGport, 445 fp_global_mask_tcam_ofs + f1_offset, 21); 446 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstVxlanGports, 447 _bcmFieldSliceSelFpf1, 1, 448 _bcmFieldSliceDstFwdEntitySelect, 449 _bcmFieldFwdEntityVxlanGport, 450 fp_global_mask_tcam_ofs + f1_offset, 21); 451 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstVlanGport, 452 _bcmFieldSliceSelFpf1, 1, 453 _bcmFieldSliceDstFwdEntitySelect, 454 _bcmFieldFwdEntityVlanGport, 455 fp_global_mask_tcam_ofs + f1_offset, 21); 456 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstVlanGports, 457 _bcmFieldSliceSelFpf1, 1, 458 _bcmFieldSliceDstFwdEntitySelect, 459 _bcmFieldFwdEntityVlanGport, 460 fp_global_mask_tcam_ofs + f1_offset, 21); 461 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstL3Egress, 462 _bcmFieldSliceSelFpf1, 1, 463 _bcmFieldSliceDstFwdEntitySelect, 464 _bcmFieldFwdEntityL3Egress, 465 fp_global_mask_tcam_ofs + f1_offset, 21); 466 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstL3EgressNextHops, 467 _bcmFieldSliceSelFpf1, 1, 468 _bcmFieldSliceDstFwdEntitySelect, 469 _bcmFieldFwdEntityL3Egress, 470 fp_global_mask_tcam_ofs + f1_offset, 21); 471 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMulticastGroup, 472 _bcmFieldSliceSelFpf1, 1, 473 _bcmFieldSliceDstFwdEntitySelect, 474 _bcmFieldFwdEntityMulticastGroup, 475 fp_global_mask_tcam_ofs + f1_offset, 21); 476 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMulticastGroups, 477 _bcmFieldSliceSelFpf1, 1, 478 _bcmFieldSliceDstFwdEntitySelect, 479 _bcmFieldFwdEntityMulticastGroup, 480 fp_global_mask_tcam_ofs + f1_offset, 21); 481 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMultipath, 482 _bcmFieldSliceSelFpf1, 1, 483 _bcmFieldSliceDstFwdEntitySelect, 484 _bcmFieldFwdEntityMultipath, 485 fp_global_mask_tcam_ofs + f1_offset, 21); 486 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstGport, 487 _bcmFieldSliceSelFpf1, 1, 488 _bcmFieldSliceDstFwdEntitySelect, 489 _bcmFieldFwdEntityCommonGport, 490 fp_global_mask_tcam_ofs + f1_offset, 21); 491 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstGports, 492 _bcmFieldSliceSelFpf1, 1, 493 _bcmFieldSliceDstFwdEntitySelect, 494 _bcmFieldFwdEntityCommonGport, 495 fp_global_mask_tcam_ofs + f1_offset, 21); 496 } 497 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcPort, 498 _bcmFieldSliceSelFpf1, 1, 499 _bcmFieldSliceIngressEntitySelect, 500 _bcmFieldFwdEntityGlp, 501 fp_global_mask_tcam_ofs + f1_offset + 21, 16); 502 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcTrunk, 503 _bcmFieldSliceSelFpf1, 1, 504 _bcmFieldSliceIngressEntitySelect, 505 _bcmFieldFwdEntityGlp, 506 fp_global_mask_tcam_ofs + f1_offset + 21, 16); 507 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMplsGport, 508 _bcmFieldSliceSelFpf1, 1, 509 _bcmFieldSliceIngressEntitySelect, 510 _bcmFieldFwdEntityMplsGport, 511 fp_global_mask_tcam_ofs + f1_offset + 21, 16); 512 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMplsGports, 513 _bcmFieldSliceSelFpf1, 1, 514 _bcmFieldSliceIngressEntitySelect, 515 _bcmFieldFwdEntityMplsGport, 516 fp_global_mask_tcam_ofs + f1_offset + 21, 16); 517 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcNivGport, 518 _bcmFieldSliceSelFpf1, 1, 519 _bcmFieldSliceIngressEntitySelect, 520 _bcmFieldFwdEntityNivGport, 521 fp_global_mask_tcam_ofs + f1_offset + 21, 16); 522 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcNivGports, 523 _bcmFieldSliceSelFpf1, 1, 524 _bcmFieldSliceIngressEntitySelect, 525 _bcmFieldFwdEntityNivGport, 526 fp_global_mask_tcam_ofs + f1_offset + 21, 16); 527 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMimGport, 528 _bcmFieldSliceSelFpf1, 1, 529 _bcmFieldSliceIngressEntitySelect, 530 _bcmFieldFwdEntityMimGport, 531 fp_global_mask_tcam_ofs + f1_offset + 21, 16); 532 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMimGports, 533 _bcmFieldSliceSelFpf1, 1, 534 _bcmFieldSliceIngressEntitySelect, 535 _bcmFieldFwdEntityMimGport, 536 fp_global_mask_tcam_ofs + f1_offset + 21, 16); 537 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVxlanGport, 538 _bcmFieldSliceSelFpf1, 1, 539 _bcmFieldSliceIngressEntitySelect, 540 _bcmFieldFwdEntityVxlanGport, 541 fp_global_mask_tcam_ofs + f1_offset + 21, 16); 542 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVxlanGports, 543 _bcmFieldSliceSelFpf1, 1, 544 _bcmFieldSliceIngressEntitySelect, 545 _bcmFieldFwdEntityVxlanGport, 546 fp_global_mask_tcam_ofs + f1_offset + 21, 16); 547 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVlanGport, 548 _bcmFieldSliceSelFpf1, 1, 549 _bcmFieldSliceIngressEntitySelect, 550 _bcmFieldFwdEntityVlanGport, 551 fp_global_mask_tcam_ofs + f1_offset + 21, 16); 552 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVlanGports, 553 _bcmFieldSliceSelFpf1, 1, 554 _bcmFieldSliceIngressEntitySelect, 555 _bcmFieldFwdEntityVlanGport, 556 fp_global_mask_tcam_ofs + f1_offset + 21, 16); 557 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcModPortGport, 558 _bcmFieldSliceSelFpf1, 1, 559 _bcmFieldSliceIngressEntitySelect, 560 _bcmFieldFwdEntityModPortGport, 561 fp_global_mask_tcam_ofs + f1_offset + 21, 15); 562 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcModPortGports, 563 _bcmFieldSliceSelFpf1, 1, 564 _bcmFieldSliceIngressEntitySelect, 565 _bcmFieldFwdEntityModPortGport, 566 fp_global_mask_tcam_ofs + f1_offset + 21, 15); 567 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcTrunkMemberGport, 568 _bcmFieldSliceSelFpf1, 1, 569 _bcmFieldSliceIngressEntitySelect, 570 _bcmFieldFwdEntityModPortGport, 571 fp_global_mask_tcam_ofs + f1_offset + 21, 16); 572 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcModuleGport, 573 _bcmFieldSliceSelFpf1, 1, 574 _bcmFieldSliceIngressEntitySelect, 575 _bcmFieldFwdEntityModPortGport, 576 fp_global_mask_tcam_ofs + f1_offset + 28, 8); 577 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcGport, 578 _bcmFieldSliceSelFpf1, 1, 579 _bcmFieldSliceIngressEntitySelect, 580 _bcmFieldFwdEntityCommonGport, 581 fp_global_mask_tcam_ofs + f1_offset + 21, 16); 582 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcGports, 583 _bcmFieldSliceSelFpf1, 1, 584 _bcmFieldSliceIngressEntitySelect, 585 _bcmFieldFwdEntityCommonGport, 586 fp_global_mask_tcam_ofs + f1_offset + 21, 16); 587 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTrunkMemberSourceModuleId, 588 _bcmFieldSliceSelFpf1, 1, 589 _bcmFieldSliceIngressEntitySelect, 590 _bcmFieldFwdEntityModPortGport, 591 fp_global_mask_tcam_ofs + f1_offset + 28, 8); 592 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMHOpcode, 593 _bcmFieldSliceSelFpf1, 1, 594 fp_global_mask_tcam_ofs + f1_offset + 37, 3); 595 596 597 if (soc_feature(unit, soc_feature_td2p_fp_sw_war)) { 598 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstPort, 599 _bcmFieldSliceSelFpf1, 2, 600 _bcmFieldSliceDstFwdEntitySelect, 601 _bcmFieldFwdEntityGlp, 602 fp_global_mask_tcam_ofs + f1_offset, 21); 603 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstTrunk, 604 _bcmFieldSliceSelFpf1, 2, 605 _bcmFieldSliceDstFwdEntitySelect, 606 _bcmFieldFwdEntityGlp, 607 fp_global_mask_tcam_ofs + f1_offset, 21); 608 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMplsGport, 609 _bcmFieldSliceSelFpf1, 2, 610 _bcmFieldSliceDstFwdEntitySelect, 611 _bcmFieldFwdEntityMplsGport, 612 fp_global_mask_tcam_ofs + f1_offset, 21); 613 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMplsGports, 614 _bcmFieldSliceSelFpf1, 2, 615 _bcmFieldSliceDstFwdEntitySelect, 616 _bcmFieldFwdEntityMplsGport, 617 fp_global_mask_tcam_ofs + f1_offset, 21); 618 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstNivGport, 619 _bcmFieldSliceSelFpf1, 2, 620 _bcmFieldSliceDstFwdEntitySelect, 621 _bcmFieldFwdEntityNivGport, 622 fp_global_mask_tcam_ofs + f1_offset, 21); 623 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstNivGports, 624 _bcmFieldSliceSelFpf1, 2, 625 _bcmFieldSliceDstFwdEntitySelect, 626 _bcmFieldFwdEntityNivGport, 627 fp_global_mask_tcam_ofs + f1_offset, 21); 628 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMimGport, 629 _bcmFieldSliceSelFpf1, 2, 630 _bcmFieldSliceDstFwdEntitySelect, 631 _bcmFieldFwdEntityMimGport, 632 fp_global_mask_tcam_ofs + f1_offset, 21); 633 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMimGports, 634 _bcmFieldSliceSelFpf1, 2, 635 _bcmFieldSliceDstFwdEntitySelect, 636 _bcmFieldFwdEntityMimGport, 637 fp_global_mask_tcam_ofs + f1_offset, 21); 638 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstVxlanGport, 639 _bcmFieldSliceSelFpf1, 2, 640 _bcmFieldSliceDstFwdEntitySelect, 641 _bcmFieldFwdEntityVxlanGport, 642 fp_global_mask_tcam_ofs + f1_offset, 21); 643 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstVxlanGports, 644 _bcmFieldSliceSelFpf1, 2, 645 _bcmFieldSliceDstFwdEntitySelect, 646 _bcmFieldFwdEntityVxlanGport, 647 fp_global_mask_tcam_ofs + f1_offset, 21); 648 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstVlanGport, 649 _bcmFieldSliceSelFpf1, 2, 650 _bcmFieldSliceDstFwdEntitySelect, 651 _bcmFieldFwdEntityVlanGport, 652 fp_global_mask_tcam_ofs + f1_offset, 21); 653 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstVlanGports, 654 _bcmFieldSliceSelFpf1, 2, 655 _bcmFieldSliceDstFwdEntitySelect, 656 _bcmFieldFwdEntityVlanGport, 657 fp_global_mask_tcam_ofs + f1_offset, 21); 658 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstGport, 659 _bcmFieldSliceSelFpf1, 2, 660 _bcmFieldSliceDstFwdEntitySelect, 661 _bcmFieldFwdEntityCommonGport, 662 fp_global_mask_tcam_ofs + f1_offset, 21); 663 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstGports, 664 _bcmFieldSliceSelFpf1, 2, 665 _bcmFieldSliceDstFwdEntitySelect, 666 _bcmFieldFwdEntityCommonGport, 667 fp_global_mask_tcam_ofs + f1_offset, 21); 668 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstL3Egress, 669 _bcmFieldSliceSelFpf1, 2, 670 _bcmFieldSliceDstFwdEntitySelect, 671 _bcmFieldFwdEntityL3Egress, 672 fp_global_mask_tcam_ofs + f1_offset, 21); 673 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, 674 bcmFieldQualifyDstL3EgressNextHops, 675 _bcmFieldSliceSelFpf1, 2, 676 _bcmFieldSliceDstFwdEntitySelect, 677 _bcmFieldFwdEntityL3Egress, 678 fp_global_mask_tcam_ofs + f1_offset, 21); 679 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, 680 bcmFieldQualifyDstMulticastGroup, 681 _bcmFieldSliceSelFpf1, 2, 682 _bcmFieldSliceDstFwdEntitySelect, 683 _bcmFieldFwdEntityMulticastGroup, 684 fp_global_mask_tcam_ofs + f1_offset, 21); 685 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, 686 bcmFieldQualifyDstMulticastGroups, 687 _bcmFieldSliceSelFpf1, 2, 688 _bcmFieldSliceDstFwdEntitySelect, 689 _bcmFieldFwdEntityMulticastGroup, 690 fp_global_mask_tcam_ofs + f1_offset, 21); 691 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMultipath, 692 _bcmFieldSliceSelFpf1, 2, 693 _bcmFieldSliceDstFwdEntitySelect, 694 _bcmFieldFwdEntityMultipath, 695 fp_global_mask_tcam_ofs + f1_offset, 21); 696 } else { 697 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstPort, 698 _bcmFieldSliceSelFpf1, 2, 699 _bcmFieldSliceDstFwdEntitySelect, 700 _bcmFieldFwdEntityGlp, 701 fp_global_mask_tcam_ofs + f1_offset, 21); 702 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstTrunk, 703 _bcmFieldSliceSelFpf1, 2, 704 _bcmFieldSliceDstFwdEntitySelect, 705 _bcmFieldFwdEntityGlp, 706 fp_global_mask_tcam_ofs + f1_offset, 21); 707 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMplsGport, 708 _bcmFieldSliceSelFpf1, 2, 709 _bcmFieldSliceDstFwdEntitySelect, 710 _bcmFieldFwdEntityMplsGport, 711 fp_global_mask_tcam_ofs + f1_offset, 21); 712 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMplsGports, 713 _bcmFieldSliceSelFpf1, 2, 714 _bcmFieldSliceDstFwdEntitySelect, 715 _bcmFieldFwdEntityMplsGport, 716 fp_global_mask_tcam_ofs + f1_offset, 21); 717 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstNivGport, 718 _bcmFieldSliceSelFpf1, 2, 719 _bcmFieldSliceDstFwdEntitySelect, 720 _bcmFieldFwdEntityNivGport, 721 fp_global_mask_tcam_ofs + f1_offset, 21); 722 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstNivGports, 723 _bcmFieldSliceSelFpf1, 2, 724 _bcmFieldSliceDstFwdEntitySelect, 725 _bcmFieldFwdEntityNivGport, 726 fp_global_mask_tcam_ofs + f1_offset, 21); 727 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMimGport, 728 _bcmFieldSliceSelFpf1, 2, 729 _bcmFieldSliceDstFwdEntitySelect, 730 _bcmFieldFwdEntityMimGport, 731 fp_global_mask_tcam_ofs + f1_offset, 21); 732 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMimGports, 733 _bcmFieldSliceSelFpf1, 2, 734 _bcmFieldSliceDstFwdEntitySelect, 735 _bcmFieldFwdEntityMimGport, 736 fp_global_mask_tcam_ofs + f1_offset, 21); 737 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstVxlanGport, 738 _bcmFieldSliceSelFpf1, 2, 739 _bcmFieldSliceDstFwdEntitySelect, 740 _bcmFieldFwdEntityVxlanGport, 741 fp_global_mask_tcam_ofs + f1_offset, 21); 742 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstVxlanGports, 743 _bcmFieldSliceSelFpf1, 2, 744 _bcmFieldSliceDstFwdEntitySelect, 745 _bcmFieldFwdEntityVxlanGport, 746 fp_global_mask_tcam_ofs + f1_offset, 21); 747 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstVlanGport, 748 _bcmFieldSliceSelFpf1, 2, 749 _bcmFieldSliceDstFwdEntitySelect, 750 _bcmFieldFwdEntityVlanGport, 751 fp_global_mask_tcam_ofs + f1_offset, 21); 752 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstVlanGports, 753 _bcmFieldSliceSelFpf1, 2, 754 _bcmFieldSliceDstFwdEntitySelect, 755 _bcmFieldFwdEntityVlanGport, 756 fp_global_mask_tcam_ofs + f1_offset, 21); 757 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstGport, 758 _bcmFieldSliceSelFpf1, 2, 759 _bcmFieldSliceDstFwdEntitySelect, 760 _bcmFieldFwdEntityCommonGport, 761 fp_global_mask_tcam_ofs + f1_offset, 21); 762 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstGports, 763 _bcmFieldSliceSelFpf1, 2, 764 _bcmFieldSliceDstFwdEntitySelect, 765 _bcmFieldFwdEntityCommonGport, 766 fp_global_mask_tcam_ofs + f1_offset, 21); 767 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstL3Egress, 768 _bcmFieldSliceSelFpf1, 2, 769 _bcmFieldSliceDstFwdEntitySelect, 770 _bcmFieldFwdEntityL3Egress, 771 fp_global_mask_tcam_ofs + f1_offset, 21); 772 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 773 bcmFieldQualifyDstL3EgressNextHops, 774 _bcmFieldSliceSelFpf1, 2, 775 _bcmFieldSliceDstFwdEntitySelect, 776 _bcmFieldFwdEntityL3Egress, 777 fp_global_mask_tcam_ofs + f1_offset, 21); 778 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 779 bcmFieldQualifyDstMulticastGroup, 780 _bcmFieldSliceSelFpf1, 2, 781 _bcmFieldSliceDstFwdEntitySelect, 782 _bcmFieldFwdEntityMulticastGroup, 783 fp_global_mask_tcam_ofs + f1_offset, 21); 784 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 785 bcmFieldQualifyDstMulticastGroups, 786 _bcmFieldSliceSelFpf1, 2, 787 _bcmFieldSliceDstFwdEntitySelect, 788 _bcmFieldFwdEntityMulticastGroup, 789 fp_global_mask_tcam_ofs + f1_offset, 21); 790 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMultipath, 791 _bcmFieldSliceSelFpf1, 2, 792 _bcmFieldSliceDstFwdEntitySelect, 793 _bcmFieldFwdEntityMultipath, 794 fp_global_mask_tcam_ofs + f1_offset, 21); 795 } 796 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMHOpcode, 797 _bcmFieldSliceSelFpf1, 2, 798 fp_global_mask_tcam_ofs + f1_offset + 21, 3); 799 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL2, 800 _bcmFieldSliceSelFpf1, 2, 801 _bcmFieldSliceDstClassSelect, 0, 802 fp_global_mask_tcam_ofs + f1_offset + 24, 10); 803 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL3, 804 _bcmFieldSliceSelFpf1, 2, 805 _bcmFieldSliceDstClassSelect, 1, 806 fp_global_mask_tcam_ofs + f1_offset + 24, 10); 807 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField, 808 _bcmFieldSliceSelFpf1, 2, 809 _bcmFieldSliceDstClassSelect, 2, 810 fp_global_mask_tcam_ofs + f1_offset + 24, 10); 811 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField, 812 _bcmFieldSliceSelFpf1, 2, 813 _bcmFieldSliceDstClassSelect, 3, 814 fp_global_mask_tcam_ofs + f1_offset + 24, 10); 815 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL2, 816 _bcmFieldSliceSelFpf1, 2, 817 _bcmFieldSliceSrcClassSelect, 0, 818 fp_global_mask_tcam_ofs + f1_offset + 34, 10); 819 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL3, 820 _bcmFieldSliceSelFpf1, 2, 821 _bcmFieldSliceSrcClassSelect, 1, 822 fp_global_mask_tcam_ofs + f1_offset + 34, 10); 823 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField, 824 _bcmFieldSliceSelFpf1, 2, 825 _bcmFieldSliceSrcClassSelect, 2, 826 fp_global_mask_tcam_ofs + f1_offset + 34, 10); 827 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField, 828 _bcmFieldSliceSelFpf1, 2, 829 _bcmFieldSliceSrcClassSelect, 3, 830 fp_global_mask_tcam_ofs + f1_offset + 34, 10); 831 832 if (soc_feature(unit, soc_feature_td2p_fp_sw_war)) { 833 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan, 834 _bcmFieldSliceSelFpf1, 3, 835 fp_global_mask_tcam_ofs + f1_offset, 16); 836 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 837 _bcmFieldSliceSelFpf1, 3, 838 fp_global_mask_tcam_ofs + f1_offset, 12); 839 } else { 840 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan, 841 _bcmFieldSliceSelFpf1, 3, 842 fp_global_mask_tcam_ofs + f1_offset, 16); 843 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 844 _bcmFieldSliceSelFpf1, 3, 845 fp_global_mask_tcam_ofs + f1_offset, 12); 846 } 847 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi, 848 _bcmFieldSliceSelFpf1, 3, 849 fp_global_mask_tcam_ofs + f1_offset + 12, 1); 850 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri, 851 _bcmFieldSliceSelFpf1, 3, 852 fp_global_mask_tcam_ofs + f1_offset + 13, 3); 853 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlan, 854 _bcmFieldSliceSelFpf1, 3, 855 fp_global_mask_tcam_ofs + f1_offset + 16, 16); 856 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanId, 857 _bcmFieldSliceSelFpf1, 3, 858 fp_global_mask_tcam_ofs + f1_offset + 16, 12); 859 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanCfi, 860 _bcmFieldSliceSelFpf1, 3, 861 fp_global_mask_tcam_ofs + f1_offset + 28, 1); 862 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanPri, 863 _bcmFieldSliceSelFpf1, 3, 864 fp_global_mask_tcam_ofs + f1_offset + 29, 3); 865 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterTpid, 866 _bcmFieldSliceSelFpf1, 3, 867 fp_global_mask_tcam_ofs + f1_offset + 32, 2); 868 869 870 if (soc_feature(unit, soc_feature_td2p_fp_sw_war)) { 871 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan, 872 _bcmFieldSliceSelFpf1, 4, 873 fp_global_mask_tcam_ofs + f1_offset, 16); 874 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 875 _bcmFieldSliceSelFpf1, 4, 876 fp_global_mask_tcam_ofs + f1_offset, 12); 877 } else { 878 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan, 879 _bcmFieldSliceSelFpf1, 4, 880 fp_global_mask_tcam_ofs + f1_offset, 16); 881 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 882 _bcmFieldSliceSelFpf1, 4, 883 fp_global_mask_tcam_ofs + f1_offset, 12); 884 } 885 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi, 886 _bcmFieldSliceSelFpf1, 4, 887 fp_global_mask_tcam_ofs + f1_offset + 12, 1); 888 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri, 889 _bcmFieldSliceSelFpf1, 4, 890 fp_global_mask_tcam_ofs + f1_offset + 13, 3); 891 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyEtherType, 892 _bcmFieldSliceSelFpf1, 4, 893 fp_global_mask_tcam_ofs + f1_offset + 16, 16); 894 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanOuter, 895 _bcmFieldSliceSelFpf1, 4, 896 fp_global_mask_tcam_ofs + f1_offset + 32, 3); 897 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanInner, 898 _bcmFieldSliceSelFpf1, 4, 899 fp_global_mask_tcam_ofs + f1_offset + 35, 3); 900 901 902 if (soc_feature(unit, soc_feature_td2p_fp_sw_war)) { 903 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyVlanTranslationHit, 904 _bcmFieldSliceSelFpf1, 5, 905 fp_global_mask_tcam_ofs + f1_offset + 0, 3); 906 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyForwardingVlanValid, 907 _bcmFieldSliceSelFpf1, 5, 908 fp_global_mask_tcam_ofs + f1_offset + 3, 1); 909 } else { 910 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVlanTranslationHit, 911 _bcmFieldSliceSelFpf1, 5, 912 fp_global_mask_tcam_ofs + f1_offset + 0, 3); 913 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyForwardingVlanValid, 914 _bcmFieldSliceSelFpf1, 5, 915 fp_global_mask_tcam_ofs + f1_offset + 3, 1); 916 } 917 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIngressStpState, 918 _bcmFieldSliceSelFpf1, 5, 919 fp_global_mask_tcam_ofs + f1_offset + 4, 2); 920 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2SrcHit, 921 _bcmFieldSliceSelFpf1, 5, 922 fp_global_mask_tcam_ofs + f1_offset + 6, 1); 923 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2SrcStatic, 924 _bcmFieldSliceSelFpf1, 5, 925 fp_global_mask_tcam_ofs + f1_offset + 7, 1); 926 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2DestHit, 927 _bcmFieldSliceSelFpf1, 5, 928 fp_global_mask_tcam_ofs + f1_offset + 8, 1); 929 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2CacheHit, 930 _bcmFieldSliceSelFpf1, 5, 931 fp_global_mask_tcam_ofs + f1_offset + 9, 1); 932 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3SrcHostHit, 933 _bcmFieldSliceSelFpf1, 5, 934 fp_global_mask_tcam_ofs + f1_offset + 10, 1); 935 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpmcStarGroupHit, 936 _bcmFieldSliceSelFpf1, 5, 937 fp_global_mask_tcam_ofs + f1_offset + 10, 1); 938 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3DestHostHit, 939 _bcmFieldSliceSelFpf1, 5, 940 fp_global_mask_tcam_ofs + f1_offset + 11, 1); 941 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3DestRouteHit, 942 _bcmFieldSliceSelFpf1, 5, 943 fp_global_mask_tcam_ofs + f1_offset + 12, 1); 944 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2StationMove, 945 _bcmFieldSliceSelFpf1, 5, 946 fp_global_mask_tcam_ofs + f1_offset + 13, 1); 947 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDosAttack, 948 _bcmFieldSliceSelFpf1, 5, 949 fp_global_mask_tcam_ofs + f1_offset + 14, 1); 950 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpTunnelHit, 951 _bcmFieldSliceSelFpf1, 5, 952 fp_global_mask_tcam_ofs + f1_offset + 15, 1); 953 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMplsLabel1Hit, 954 _bcmFieldSliceSelFpf1, 5, 955 fp_global_mask_tcam_ofs + f1_offset + 16, 1); 956 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTrillEgressRbridgeHit, 957 _bcmFieldSliceSelFpf1, 5, 958 fp_global_mask_tcam_ofs + f1_offset + 16, 1); 959 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2GreSrcIpHit, 960 _bcmFieldSliceSelFpf1, 5, 961 fp_global_mask_tcam_ofs + f1_offset + 16, 1); 962 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMimSrcGportHit, 963 _bcmFieldSliceSelFpf1, 5, 964 fp_global_mask_tcam_ofs + f1_offset + 16, 1); 965 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMplsLabel2Hit, 966 _bcmFieldSliceSelFpf1, 5, 967 fp_global_mask_tcam_ofs + f1_offset + 17, 1); 968 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTrillIngressRbridgeHit, 969 _bcmFieldSliceSelFpf1, 5, 970 fp_global_mask_tcam_ofs + f1_offset + 17, 1); 971 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2GreVfiHit, 972 _bcmFieldSliceSelFpf1, 5, 973 fp_global_mask_tcam_ofs + f1_offset + 17, 1); 974 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMimVfiHit, 975 _bcmFieldSliceSelFpf1, 5, 976 fp_global_mask_tcam_ofs + f1_offset + 17, 1); 977 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMplsTerminated, 978 _bcmFieldSliceSelFpf1, 5, 979 fp_global_mask_tcam_ofs + f1_offset + 18, 1); 980 981 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyPacketRes, 982 _bcmFieldSliceSelFpf1, 5, 983 fp_global_mask_tcam_ofs + f1_offset + 20, 6); 984 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlan, 985 _bcmFieldSliceSelFpf1, 5, 986 fp_global_mask_tcam_ofs + f1_offset + 26, 16); 987 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanId, 988 _bcmFieldSliceSelFpf1, 5, 989 fp_global_mask_tcam_ofs + f1_offset + 26, 12); 990 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanCfi, 991 _bcmFieldSliceSelFpf1, 5, 992 fp_global_mask_tcam_ofs + f1_offset + 38, 1); 993 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanPri, 994 _bcmFieldSliceSelFpf1, 5, 995 fp_global_mask_tcam_ofs + f1_offset + 39, 3); 996 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerTpid, 997 _bcmFieldSliceSelFpf1, 5, 998 fp_global_mask_tcam_ofs + f1_offset + 42, 2); 999 1000 1001 if (soc_feature(unit, soc_feature_td2p_fp_sw_war)) { 1002 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan, 1003 _bcmFieldSliceSelFpf1, 6, 1004 fp_global_mask_tcam_ofs + f1_offset, 16); 1005 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 1006 _bcmFieldSliceSelFpf1, 6, 1007 fp_global_mask_tcam_ofs + f1_offset, 12); 1008 } else { 1009 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan, 1010 _bcmFieldSliceSelFpf1, 6, 1011 fp_global_mask_tcam_ofs + f1_offset, 16); 1012 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 1013 _bcmFieldSliceSelFpf1, 6, 1014 fp_global_mask_tcam_ofs + f1_offset, 12); 1015 } 1016 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi, 1017 _bcmFieldSliceSelFpf1, 6, 1018 fp_global_mask_tcam_ofs + f1_offset + 12, 1); 1019 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri, 1020 _bcmFieldSliceSelFpf1, 6, 1021 fp_global_mask_tcam_ofs + f1_offset + 13, 3); 1022 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVlanFormat, 1023 _bcmFieldSliceSelFpf1, 6, 1024 fp_global_mask_tcam_ofs + f1_offset + 16, 2); 1025 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2Format, 1026 _bcmFieldSliceSelFpf1, 6, 1027 fp_global_mask_tcam_ofs + f1_offset + 18, 2); 1028 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTranslatedVlanFormat, 1029 _bcmFieldSliceSelFpf1, 6, 1030 fp_global_mask_tcam_ofs + f1_offset + 20, 2); 1031 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMHOpcode, 1032 _bcmFieldSliceSelFpf1, 6, 1033 fp_global_mask_tcam_ofs + f1_offset + 22, 3); 1034 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyPacketRes, 1035 _bcmFieldSliceSelFpf1, 6, 1036 fp_global_mask_tcam_ofs + f1_offset + 25, 6); 1037 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpFrag, 1038 _bcmFieldSliceSelFpf1, 6, 1039 fp_global_mask_tcam_ofs + f1_offset + 31, 2); 1040 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyEtherType, 1041 _bcmFieldSliceSelFpf1, 6, 1042 fp_global_mask_tcam_ofs + f1_offset + 33, 16); 1043 1044 1045 if (soc_feature(unit, soc_feature_td2p_fp_sw_war)) { 1046 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan, 1047 _bcmFieldSliceSelFpf1, 7, 1048 fp_global_mask_tcam_ofs + f1_offset, 16); 1049 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 1050 _bcmFieldSliceSelFpf1, 7, 1051 fp_global_mask_tcam_ofs + f1_offset, 12); 1052 } else { 1053 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan, 1054 _bcmFieldSliceSelFpf1, 7, 1055 fp_global_mask_tcam_ofs + f1_offset, 16); 1056 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 1057 _bcmFieldSliceSelFpf1, 7, 1058 fp_global_mask_tcam_ofs + f1_offset, 12); 1059 } 1060 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi, 1061 _bcmFieldSliceSelFpf1, 7, 1062 fp_global_mask_tcam_ofs + f1_offset + 12, 1); 1063 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri, 1064 _bcmFieldSliceSelFpf1, 7, 1065 fp_global_mask_tcam_ofs + f1_offset + 13, 3); 1066 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL2, 1067 _bcmFieldSliceSelFpf1, 7, 1068 _bcmFieldSliceSrcClassSelect, 0, 1069 fp_global_mask_tcam_ofs + f1_offset + 16, 1070 10); 1071 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL3, 1072 _bcmFieldSliceSelFpf1, 7, 1073 _bcmFieldSliceSrcClassSelect, 1, 1074 fp_global_mask_tcam_ofs + f1_offset + 16, 1075 10); 1076 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1077 bcmFieldQualifyDstClassField, 1078 _bcmFieldSliceSelFpf1, 7, 1079 _bcmFieldSliceSrcClassSelect, 2, 1080 fp_global_mask_tcam_ofs + f1_offset + 16, 1081 10); 1082 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1083 bcmFieldQualifySrcClassField, 1084 _bcmFieldSliceSelFpf1, 7, 1085 _bcmFieldSliceSrcClassSelect, 3, 1086 fp_global_mask_tcam_ofs + f1_offset + 16, 1087 10); 1088 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVrf, 1089 _bcmFieldSliceSelFpf1, 7, 1090 _bcmFieldSliceFwdFieldSelect, 1091 _bcmFieldFwdFieldVrf, 1092 fp_global_mask_tcam_ofs + f1_offset + 26, 1093 13); 1094 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVpn, 1095 _bcmFieldSliceSelFpf1, 7, 1096 _bcmFieldSliceFwdFieldSelect, 1097 _bcmFieldFwdFieldVpn, 1098 fp_global_mask_tcam_ofs + f1_offset + 26, 1099 13); 1100 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1101 bcmFieldQualifyForwardingVlanId, 1102 _bcmFieldSliceSelFpf1, 7, 1103 _bcmFieldSliceFwdFieldSelect, 1104 _bcmFieldFwdFieldVlan, 1105 fp_global_mask_tcam_ofs + f1_offset + 26, 1106 13); 1107 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyGenericAssociatedChannelLabelValid, 1108 _bcmFieldSliceSelFpf1, 7, 1109 fp_global_mask_tcam_ofs + f1_offset + 39, 1); 1110 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyRouterAlertLabelValid, 1111 _bcmFieldSliceSelFpf1, 7, 1112 fp_global_mask_tcam_ofs + f1_offset + 40, 1); 1113 1114 #if 0 1115 /* TBD.. NO MPLS HERE. But RAL,GAL */ 1116 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMplsOuterLabelPop, 1117 _bcmFieldSliceSelFpf1, 7, 1118 fp_global_mask_tcam_ofs + f1_offset + 39, 2); 1119 _FP_QUAL_ADD(unit, stage_fc, 1120 bcmFieldQualifyMplsStationHitTunnelUnterminated, 1121 _bcmFieldSliceSelFpf1, 7, 1122 fp_global_mask_tcam_ofs + f1_offset + 39, 2); 1123 #endif 1124 1125 1126 if (soc_feature(unit, soc_feature_td2p_fp_sw_war)) { 1127 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol, 1128 _bcmFieldSliceSelFpf1, 8, 1129 fp_global_mask_tcam_ofs + f1_offset, 8); 1130 } else { 1131 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol, 1132 _bcmFieldSliceSelFpf1, 8, 1133 fp_global_mask_tcam_ofs + f1_offset, 8); 1134 } 1135 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTos, 1136 _bcmFieldSliceSelFpf1, 8, 1137 _bcmFieldSliceTosClassSelect, 0, 1138 fp_global_mask_tcam_ofs + f1_offset + 8, 8); 1139 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTosClassZero, 1140 _bcmFieldSliceSelFpf1, 8, 1141 _bcmFieldSliceTosClassSelect, 0, 1142 fp_global_mask_tcam_ofs + f1_offset + 8, 8); 1143 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTosClassOne, 1144 _bcmFieldSliceSelFpf1, 8, 1145 _bcmFieldSliceTosClassSelect, 1, 1146 fp_global_mask_tcam_ofs + f1_offset + 8, 8); 1147 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL2, 1148 _bcmFieldSliceSelFpf1, 8, 1149 _bcmFieldSliceSrcClassSelect, 0, 1150 fp_global_mask_tcam_ofs + f1_offset + 16, 1151 10); 1152 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL3, 1153 _bcmFieldSliceSelFpf1, 8, 1154 _bcmFieldSliceSrcClassSelect, 1, 1155 fp_global_mask_tcam_ofs + f1_offset + 16, 1156 10); 1157 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1158 bcmFieldQualifyDstClassField, 1159 _bcmFieldSliceSelFpf1, 8, 1160 _bcmFieldSliceSrcClassSelect, 2, 1161 fp_global_mask_tcam_ofs + f1_offset + 16, 1162 10); 1163 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1164 bcmFieldQualifySrcClassField, 1165 _bcmFieldSliceSelFpf1, 8, 1166 _bcmFieldSliceSrcClassSelect, 3, 1167 fp_global_mask_tcam_ofs + f1_offset + 16, 1168 10); 1169 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVrf, 1170 _bcmFieldSliceSelFpf1, 8, 1171 _bcmFieldSliceFwdFieldSelect, 1172 _bcmFieldFwdFieldVrf, 1173 fp_global_mask_tcam_ofs + f1_offset + 26, 1174 13); 1175 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVpn, 1176 _bcmFieldSliceSelFpf1, 8, 1177 _bcmFieldSliceFwdFieldSelect, 1178 _bcmFieldFwdFieldVpn, 1179 fp_global_mask_tcam_ofs + f1_offset + 26, 1180 13); 1181 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1182 bcmFieldQualifyForwardingVlanId, 1183 _bcmFieldSliceSelFpf1, 8, 1184 _bcmFieldSliceFwdFieldSelect, 1185 _bcmFieldFwdFieldVlan, 1186 fp_global_mask_tcam_ofs + f1_offset + 26, 1187 13); 1188 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpAddrsNormalized, 1189 _bcmFieldSliceSelFpf1, 8, 1190 fp_global_mask_tcam_ofs + f1_offset + 39, 1 1191 ); 1192 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMacAddrsNormalized, 1193 _bcmFieldSliceSelFpf1, 8, 1194 fp_global_mask_tcam_ofs + f1_offset + 40, 1 1195 ); 1196 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyNatSrcRealmId, 1197 _bcmFieldSliceSelFpf1, 8, 1198 fp_global_mask_tcam_ofs + f1_offset + 41, 2); 1199 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyNatDstRealmId, 1200 _bcmFieldSliceSelFpf1, 8, 1201 fp_global_mask_tcam_ofs + f1_offset + 43, 2); 1202 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyNatNeeded, 1203 _bcmFieldSliceSelFpf1, 8, 1204 fp_global_mask_tcam_ofs + f1_offset + 45, 1); 1205 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIcmpError, 1206 _bcmFieldSliceSelFpf1, 8, 1207 fp_global_mask_tcam_ofs + f1_offset + 46, 1); 1208 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstIpLocal, 1209 _bcmFieldSliceSelFpf1, 8, 1210 fp_global_mask_tcam_ofs + f1_offset + 47, 1); 1211 1212 1213 if (soc_feature(unit, soc_feature_td2p_fp_sw_war)) { 1214 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, _bcmFieldQualifyData2, 1215 _bcmFieldSliceSelFpf1, 9, 1216 fp_global_mask_tcam_ofs + f1_offset, 32); 1217 } else { 1218 _FP_QUAL_ADD(unit, stage_fc, _bcmFieldQualifyData2, 1219 _bcmFieldSliceSelFpf1, 9, 1220 fp_global_mask_tcam_ofs + f1_offset, 32); 1221 } 1222 1223 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyGenericAssociatedChannelLabelValid, 1224 _bcmFieldSliceSelFpf1, 9, 1225 fp_global_mask_tcam_ofs + f1_offset + 32, 1); 1226 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyRouterAlertLabelValid, 1227 _bcmFieldSliceSelFpf1, 9, 1228 fp_global_mask_tcam_ofs + f1_offset + 33, 1); 1229 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3Ingress, 1230 _bcmFieldSliceSelFpf1, 9, 1231 fp_global_mask_tcam_ofs + f1_offset + 36 , 14); 1232 1233 if (soc_feature(unit, soc_feature_td2p_fp_sw_war)) { 1234 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstPort, 1235 _bcmFieldSliceSelFpf1, 10, 1236 _bcmFieldSliceDstFwdEntitySelect, 1237 _bcmFieldFwdEntityGlp, 1238 fp_global_mask_tcam_ofs + f1_offset, 21); 1239 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstTrunk, 1240 _bcmFieldSliceSelFpf1, 10, 1241 _bcmFieldSliceDstFwdEntitySelect, 1242 _bcmFieldFwdEntityGlp, 1243 fp_global_mask_tcam_ofs + f1_offset, 21); 1244 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, 1245 bcmFieldQualifyDstMplsGport, 1246 _bcmFieldSliceSelFpf1, 10, 1247 _bcmFieldSliceDstFwdEntitySelect, 1248 _bcmFieldFwdEntityMplsGport, 1249 fp_global_mask_tcam_ofs + f1_offset, 21); 1250 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, 1251 bcmFieldQualifyDstMplsGports, 1252 _bcmFieldSliceSelFpf1, 10, 1253 _bcmFieldSliceDstFwdEntitySelect, 1254 _bcmFieldFwdEntityMplsGport, 1255 fp_global_mask_tcam_ofs + f1_offset, 21); 1256 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, 1257 bcmFieldQualifyDstNivGport, 1258 _bcmFieldSliceSelFpf1, 10, 1259 _bcmFieldSliceDstFwdEntitySelect, 1260 _bcmFieldFwdEntityNivGport, 1261 fp_global_mask_tcam_ofs + f1_offset, 21); 1262 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, 1263 bcmFieldQualifyDstNivGports, 1264 _bcmFieldSliceSelFpf1, 10, 1265 _bcmFieldSliceDstFwdEntitySelect, 1266 _bcmFieldFwdEntityNivGport, 1267 fp_global_mask_tcam_ofs + f1_offset, 21); 1268 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, 1269 bcmFieldQualifyDstMimGport, 1270 _bcmFieldSliceSelFpf1, 10, 1271 _bcmFieldSliceDstFwdEntitySelect, 1272 _bcmFieldFwdEntityMimGport, 1273 fp_global_mask_tcam_ofs + f1_offset, 21); 1274 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, 1275 bcmFieldQualifyDstMimGports, 1276 _bcmFieldSliceSelFpf1, 10, 1277 _bcmFieldSliceDstFwdEntitySelect, 1278 _bcmFieldFwdEntityMimGport, 1279 fp_global_mask_tcam_ofs + f1_offset, 21); 1280 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, 1281 bcmFieldQualifyDstVxlanGport, 1282 _bcmFieldSliceSelFpf1, 10, 1283 _bcmFieldSliceDstFwdEntitySelect, 1284 _bcmFieldFwdEntityVxlanGport, 1285 fp_global_mask_tcam_ofs + f1_offset, 21); 1286 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, 1287 bcmFieldQualifyDstVxlanGports, 1288 _bcmFieldSliceSelFpf1, 10, 1289 _bcmFieldSliceDstFwdEntitySelect, 1290 _bcmFieldFwdEntityVxlanGport, 1291 fp_global_mask_tcam_ofs + f1_offset, 21); 1292 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, 1293 bcmFieldQualifyDstVlanGport, 1294 _bcmFieldSliceSelFpf1, 10, 1295 _bcmFieldSliceDstFwdEntitySelect, 1296 _bcmFieldFwdEntityVlanGport, 1297 fp_global_mask_tcam_ofs + f1_offset, 21); 1298 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, 1299 bcmFieldQualifyDstVlanGports, 1300 _bcmFieldSliceSelFpf1, 10, 1301 _bcmFieldSliceDstFwdEntitySelect, 1302 _bcmFieldFwdEntityVlanGport, 1303 fp_global_mask_tcam_ofs + f1_offset, 21); 1304 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstGport, 1305 _bcmFieldSliceSelFpf1, 10, 1306 _bcmFieldSliceDstFwdEntitySelect, 1307 _bcmFieldFwdEntityCommonGport, 1308 fp_global_mask_tcam_ofs + f1_offset, 21); 1309 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstGports, 1310 _bcmFieldSliceSelFpf1, 10, 1311 _bcmFieldSliceDstFwdEntitySelect, 1312 _bcmFieldFwdEntityCommonGport, 1313 fp_global_mask_tcam_ofs + f1_offset, 21); 1314 1315 1316 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstL3Egress, 1317 _bcmFieldSliceSelFpf1, 10, 1318 _bcmFieldSliceDstFwdEntitySelect, 1319 _bcmFieldFwdEntityL3Egress, 1320 fp_global_mask_tcam_ofs + f1_offset, 21); 1321 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, 1322 bcmFieldQualifyDstL3EgressNextHops, 1323 _bcmFieldSliceSelFpf1, 10, 1324 _bcmFieldSliceDstFwdEntitySelect, 1325 _bcmFieldFwdEntityL3Egress, 1326 fp_global_mask_tcam_ofs + f1_offset, 21); 1327 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, 1328 bcmFieldQualifyDstMulticastGroup, 1329 _bcmFieldSliceSelFpf1, 10, 1330 _bcmFieldSliceDstFwdEntitySelect, 1331 _bcmFieldFwdEntityMulticastGroup, 1332 fp_global_mask_tcam_ofs + f1_offset, 21); 1333 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, 1334 bcmFieldQualifyDstMulticastGroups, 1335 _bcmFieldSliceSelFpf1, 10, 1336 _bcmFieldSliceDstFwdEntitySelect, 1337 _bcmFieldFwdEntityMulticastGroup, 1338 fp_global_mask_tcam_ofs + f1_offset, 21); 1339 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, 1340 bcmFieldQualifyDstMultipath, 1341 _bcmFieldSliceSelFpf1, 10, 1342 _bcmFieldSliceDstFwdEntitySelect, 1343 _bcmFieldFwdEntityMultipath, 1344 fp_global_mask_tcam_ofs + f1_offset, 21); 1345 } else { 1346 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstPort, 1347 _bcmFieldSliceSelFpf1, 10, 1348 _bcmFieldSliceDstFwdEntitySelect, 1349 _bcmFieldFwdEntityGlp, 1350 fp_global_mask_tcam_ofs + f1_offset, 21); 1351 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstTrunk, 1352 _bcmFieldSliceSelFpf1, 10, 1353 _bcmFieldSliceDstFwdEntitySelect, 1354 _bcmFieldFwdEntityGlp, 1355 fp_global_mask_tcam_ofs + f1_offset, 21); 1356 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1357 bcmFieldQualifyDstMplsGport, 1358 _bcmFieldSliceSelFpf1, 10, 1359 _bcmFieldSliceDstFwdEntitySelect, 1360 _bcmFieldFwdEntityMplsGport, 1361 fp_global_mask_tcam_ofs + f1_offset, 21); 1362 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1363 bcmFieldQualifyDstMplsGports, 1364 _bcmFieldSliceSelFpf1, 10, 1365 _bcmFieldSliceDstFwdEntitySelect, 1366 _bcmFieldFwdEntityMplsGport, 1367 fp_global_mask_tcam_ofs + f1_offset, 21); 1368 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1369 bcmFieldQualifyDstNivGport, 1370 _bcmFieldSliceSelFpf1, 10, 1371 _bcmFieldSliceDstFwdEntitySelect, 1372 _bcmFieldFwdEntityNivGport, 1373 fp_global_mask_tcam_ofs + f1_offset, 21); 1374 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1375 bcmFieldQualifyDstNivGports, 1376 _bcmFieldSliceSelFpf1, 10, 1377 _bcmFieldSliceDstFwdEntitySelect, 1378 _bcmFieldFwdEntityNivGport, 1379 fp_global_mask_tcam_ofs + f1_offset, 21); 1380 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1381 bcmFieldQualifyDstMimGport, 1382 _bcmFieldSliceSelFpf1, 10, 1383 _bcmFieldSliceDstFwdEntitySelect, 1384 _bcmFieldFwdEntityMimGport, 1385 fp_global_mask_tcam_ofs + f1_offset, 21); 1386 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1387 bcmFieldQualifyDstMimGports, 1388 _bcmFieldSliceSelFpf1, 10, 1389 _bcmFieldSliceDstFwdEntitySelect, 1390 _bcmFieldFwdEntityMimGport, 1391 fp_global_mask_tcam_ofs + f1_offset, 21); 1392 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1393 bcmFieldQualifyDstVxlanGport, 1394 _bcmFieldSliceSelFpf1, 10, 1395 _bcmFieldSliceDstFwdEntitySelect, 1396 _bcmFieldFwdEntityVxlanGport, 1397 fp_global_mask_tcam_ofs + f1_offset, 21); 1398 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1399 bcmFieldQualifyDstVxlanGports, 1400 _bcmFieldSliceSelFpf1, 10, 1401 _bcmFieldSliceDstFwdEntitySelect, 1402 _bcmFieldFwdEntityVxlanGport, 1403 fp_global_mask_tcam_ofs + f1_offset, 21); 1404 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1405 bcmFieldQualifyDstVlanGport, 1406 _bcmFieldSliceSelFpf1, 10, 1407 _bcmFieldSliceDstFwdEntitySelect, 1408 _bcmFieldFwdEntityVlanGport, 1409 fp_global_mask_tcam_ofs + f1_offset, 21); 1410 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1411 bcmFieldQualifyDstVlanGports, 1412 _bcmFieldSliceSelFpf1, 10, 1413 _bcmFieldSliceDstFwdEntitySelect, 1414 _bcmFieldFwdEntityVlanGport, 1415 fp_global_mask_tcam_ofs + f1_offset, 21); 1416 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstGport, 1417 _bcmFieldSliceSelFpf1, 10, 1418 _bcmFieldSliceDstFwdEntitySelect, 1419 _bcmFieldFwdEntityCommonGport, 1420 fp_global_mask_tcam_ofs + f1_offset, 21); 1421 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstGports, 1422 _bcmFieldSliceSelFpf1, 10, 1423 _bcmFieldSliceDstFwdEntitySelect, 1424 _bcmFieldFwdEntityCommonGport, 1425 fp_global_mask_tcam_ofs + f1_offset, 21); 1426 1427 1428 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstL3Egress, 1429 _bcmFieldSliceSelFpf1, 10, 1430 _bcmFieldSliceDstFwdEntitySelect, 1431 _bcmFieldFwdEntityL3Egress, 1432 fp_global_mask_tcam_ofs + f1_offset, 21); 1433 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1434 bcmFieldQualifyDstL3EgressNextHops, 1435 _bcmFieldSliceSelFpf1, 10, 1436 _bcmFieldSliceDstFwdEntitySelect, 1437 _bcmFieldFwdEntityL3Egress, 1438 fp_global_mask_tcam_ofs + f1_offset, 21); 1439 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1440 bcmFieldQualifyDstMulticastGroup, 1441 _bcmFieldSliceSelFpf1, 10, 1442 _bcmFieldSliceDstFwdEntitySelect, 1443 _bcmFieldFwdEntityMulticastGroup, 1444 fp_global_mask_tcam_ofs + f1_offset, 21); 1445 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1446 bcmFieldQualifyDstMulticastGroups, 1447 _bcmFieldSliceSelFpf1, 10, 1448 _bcmFieldSliceDstFwdEntitySelect, 1449 _bcmFieldFwdEntityMulticastGroup, 1450 fp_global_mask_tcam_ofs + f1_offset, 21); 1451 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1452 bcmFieldQualifyDstMultipath, 1453 _bcmFieldSliceSelFpf1, 10, 1454 _bcmFieldSliceDstFwdEntitySelect, 1455 _bcmFieldFwdEntityMultipath, 1456 fp_global_mask_tcam_ofs + f1_offset, 21); 1457 } 1458 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstPort, 1459 _bcmFieldSliceSelFpf1, 10, 1460 fp_global_mask_tcam_ofs + f1_offset + 21, 16); 1461 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstTrunk, 1462 _bcmFieldSliceSelFpf1, 10, 1463 fp_global_mask_tcam_ofs + f1_offset + 21, 16); 1464 1465 1466 1467 if (soc_feature(unit, soc_feature_td2p_fp_sw_war)) { 1468 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifySrcPort, 1469 _bcmFieldSliceSelFpf1, 11, 1470 fp_global_mask_tcam_ofs + f1_offset, 16); 1471 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifySrcTrunk, 1472 _bcmFieldSliceSelFpf1, 11, 1473 fp_global_mask_tcam_ofs + f1_offset, 16); 1474 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifySrcModPortGport, 1475 _bcmFieldSliceSelFpf1, 11, 1476 fp_global_mask_tcam_ofs + f1_offset, 15); 1477 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifySrcModPortGports, 1478 _bcmFieldSliceSelFpf1, 11, 1479 fp_global_mask_tcam_ofs + f1_offset, 15); 1480 } else { 1481 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcPort, 1482 _bcmFieldSliceSelFpf1, 11, 1483 fp_global_mask_tcam_ofs + f1_offset, 16); 1484 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcTrunk, 1485 _bcmFieldSliceSelFpf1, 11, 1486 fp_global_mask_tcam_ofs + f1_offset, 16); 1487 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcModPortGport, 1488 _bcmFieldSliceSelFpf1, 11, 1489 fp_global_mask_tcam_ofs + f1_offset, 15); 1490 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcModPortGports, 1491 _bcmFieldSliceSelFpf1, 11, 1492 fp_global_mask_tcam_ofs + f1_offset, 15); 1493 } 1494 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcModuleGport, 1495 _bcmFieldSliceSelFpf1, 11, 1496 fp_global_mask_tcam_ofs + f1_offset + 7, 8); 1497 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1498 bcmFieldQualifySrcMplsGport, 1499 _bcmFieldSliceSelFpf1, 11, 1500 _bcmFieldSliceIngressEntitySelect, 1501 _bcmFieldFwdEntityMplsGport, 1502 fp_global_mask_tcam_ofs + f1_offset + 16, 1503 16); 1504 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1505 bcmFieldQualifySrcMplsGports, 1506 _bcmFieldSliceSelFpf1, 11, 1507 _bcmFieldSliceIngressEntitySelect, 1508 _bcmFieldFwdEntityMplsGport, 1509 fp_global_mask_tcam_ofs + f1_offset + 16, 1510 16); 1511 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1512 bcmFieldQualifySrcNivGport, 1513 _bcmFieldSliceSelFpf1, 11, 1514 _bcmFieldSliceIngressEntitySelect, 1515 _bcmFieldFwdEntityNivGport, 1516 fp_global_mask_tcam_ofs + f1_offset + 16, 1517 16); 1518 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1519 bcmFieldQualifySrcNivGports, 1520 _bcmFieldSliceSelFpf1, 11, 1521 _bcmFieldSliceIngressEntitySelect, 1522 _bcmFieldFwdEntityNivGport, 1523 fp_global_mask_tcam_ofs + f1_offset + 16, 1524 16); 1525 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMimGport, 1526 _bcmFieldSliceSelFpf1, 11, 1527 _bcmFieldSliceIngressEntitySelect, 1528 _bcmFieldFwdEntityMimGport, 1529 fp_global_mask_tcam_ofs + f1_offset + 16, 1530 16); 1531 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMimGports, 1532 _bcmFieldSliceSelFpf1, 11, 1533 _bcmFieldSliceIngressEntitySelect, 1534 _bcmFieldFwdEntityMimGport, 1535 fp_global_mask_tcam_ofs + f1_offset + 16, 1536 16); 1537 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVxlanGport, 1538 _bcmFieldSliceSelFpf1, 11, 1539 _bcmFieldSliceIngressEntitySelect, 1540 _bcmFieldFwdEntityVxlanGport, 1541 fp_global_mask_tcam_ofs + f1_offset + 16, 1542 16); 1543 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVxlanGports, 1544 _bcmFieldSliceSelFpf1, 11, 1545 _bcmFieldSliceIngressEntitySelect, 1546 _bcmFieldFwdEntityVxlanGport, 1547 fp_global_mask_tcam_ofs + f1_offset + 16, 1548 16); 1549 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVlanGport, 1550 _bcmFieldSliceSelFpf1, 11, 1551 _bcmFieldSliceIngressEntitySelect, 1552 _bcmFieldFwdEntityVlanGport, 1553 fp_global_mask_tcam_ofs + f1_offset + 16, 1554 16); 1555 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVlanGports, 1556 _bcmFieldSliceSelFpf1, 11, 1557 _bcmFieldSliceIngressEntitySelect, 1558 _bcmFieldFwdEntityVlanGport, 1559 fp_global_mask_tcam_ofs + f1_offset + 16, 1560 16); 1561 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIntPriority, 1562 _bcmFieldSliceSelFpf1, 11, 1563 fp_global_mask_tcam_ofs + f1_offset + 32, 4); 1564 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyColor, 1565 _bcmFieldSliceSelFpf1, 11, 1566 fp_global_mask_tcam_ofs + f1_offset + 36, 2); 1567 1568 1569 if (soc_feature(unit, soc_feature_td2p_fp_sw_war)) { 1570 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 1571 _bcmFieldSliceSelFpf1, 12, 1572 fp_global_mask_tcam_ofs + f1_offset, 12); 1573 } else { 1574 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 1575 _bcmFieldSliceSelFpf1, 12, 1576 fp_global_mask_tcam_ofs + f1_offset, 12); 1577 } 1578 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL2, 1579 _bcmFieldSliceSelFpf1, 12, 1580 _bcmFieldSliceSrcClassSelect, 0, 1581 fp_global_mask_tcam_ofs + f1_offset + 12, 1582 10); 1583 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL3, 1584 _bcmFieldSliceSelFpf1, 12, 1585 _bcmFieldSliceSrcClassSelect, 1, 1586 fp_global_mask_tcam_ofs + f1_offset + 12, 1587 10); 1588 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1589 bcmFieldQualifyDstClassField, 1590 _bcmFieldSliceSelFpf1, 12, 1591 _bcmFieldSliceSrcClassSelect, 2, 1592 fp_global_mask_tcam_ofs + f1_offset + 12, 1593 10); 1594 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1595 bcmFieldQualifySrcClassField, 1596 _bcmFieldSliceSelFpf1, 12, 1597 _bcmFieldSliceSrcClassSelect, 3, 1598 fp_global_mask_tcam_ofs + f1_offset + 12, 1599 10); 1600 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1601 bcmFieldQualifySrcMplsGport, 1602 _bcmFieldSliceSelFpf1, 12, 1603 _bcmFieldSliceIngressEntitySelect, 1604 _bcmFieldFwdEntityMplsGport, 1605 fp_global_mask_tcam_ofs + f1_offset + 22, 1606 16); 1607 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1608 bcmFieldQualifySrcMplsGports, 1609 _bcmFieldSliceSelFpf1, 12, 1610 _bcmFieldSliceIngressEntitySelect, 1611 _bcmFieldFwdEntityMplsGport, 1612 fp_global_mask_tcam_ofs + f1_offset + 22, 1613 16); 1614 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1615 bcmFieldQualifySrcNivGport, 1616 _bcmFieldSliceSelFpf1, 12, 1617 _bcmFieldSliceIngressEntitySelect, 1618 _bcmFieldFwdEntityNivGport, 1619 fp_global_mask_tcam_ofs + f1_offset + 22, 1620 16); 1621 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1622 bcmFieldQualifySrcNivGports, 1623 _bcmFieldSliceSelFpf1, 12, 1624 _bcmFieldSliceIngressEntitySelect, 1625 _bcmFieldFwdEntityNivGport, 1626 fp_global_mask_tcam_ofs + f1_offset + 22, 1627 16); 1628 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMimGport, 1629 _bcmFieldSliceSelFpf1, 12, 1630 _bcmFieldSliceIngressEntitySelect, 1631 _bcmFieldFwdEntityMimGport, 1632 fp_global_mask_tcam_ofs + f1_offset + 22, 1633 16); 1634 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMimGports, 1635 _bcmFieldSliceSelFpf1, 12, 1636 _bcmFieldSliceIngressEntitySelect, 1637 _bcmFieldFwdEntityMimGport, 1638 fp_global_mask_tcam_ofs + f1_offset + 22, 1639 16); 1640 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVxlanGport, 1641 _bcmFieldSliceSelFpf1, 12, 1642 _bcmFieldSliceIngressEntitySelect, 1643 _bcmFieldFwdEntityVxlanGport, 1644 fp_global_mask_tcam_ofs + f1_offset + 22, 1645 16); 1646 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVxlanGports, 1647 _bcmFieldSliceSelFpf1, 12, 1648 _bcmFieldSliceIngressEntitySelect, 1649 _bcmFieldFwdEntityVxlanGport, 1650 fp_global_mask_tcam_ofs + f1_offset + 22, 1651 16); 1652 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVlanGport, 1653 _bcmFieldSliceSelFpf1, 12, 1654 _bcmFieldSliceIngressEntitySelect, 1655 _bcmFieldFwdEntityVlanGport, 1656 fp_global_mask_tcam_ofs + f1_offset + 22, 1657 16); 1658 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVlanGports, 1659 _bcmFieldSliceSelFpf1, 12, 1660 _bcmFieldSliceIngressEntitySelect, 1661 _bcmFieldFwdEntityVlanGport, 1662 fp_global_mask_tcam_ofs + f1_offset + 22, 1663 16); 1664 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL2, 1665 _bcmFieldSliceSelFpf1, 12, 1666 _bcmFieldSliceDstClassSelect, 0, 1667 fp_global_mask_tcam_ofs + f1_offset + 38, 1668 10); 1669 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL3, 1670 _bcmFieldSliceSelFpf1, 12, 1671 _bcmFieldSliceDstClassSelect, 1, 1672 fp_global_mask_tcam_ofs + f1_offset + 38, 1673 10); 1674 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1675 bcmFieldQualifyDstClassField, 1676 _bcmFieldSliceSelFpf1, 12, 1677 _bcmFieldSliceDstClassSelect, 2, 1678 fp_global_mask_tcam_ofs + f1_offset + 38, 1679 10); 1680 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1681 bcmFieldQualifySrcClassField, 1682 _bcmFieldSliceSelFpf1, 12, 1683 _bcmFieldSliceDstClassSelect, 3, 1684 fp_global_mask_tcam_ofs + f1_offset + 38, 1685 10); 1686 1687 1688 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIntPriority, 1689 _bcmFieldSliceSelFpf1, 13, 1690 fp_global_mask_tcam_ofs + f1_offset + 37, 4); 1691 1692 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyColor, 1693 _bcmFieldSliceSelFpf1, 13, 1694 fp_global_mask_tcam_ofs + f1_offset + 41, 2); 1695 1696 if (soc_feature(unit, soc_feature_fp_based_oam)) { 1697 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOamType, 1698 _bcmFieldSliceSelFpf1, 13, 1699 fp_global_mask_tcam_ofs + f1_offset + 43, 1); 1700 } 1701 if (soc_feature(unit, soc_feature_td2p_fp_sw_war)) { 1702 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVnTag, 1703 _bcmFieldSliceSelFpf1, 13, 1704 _bcmFieldSliceAuxTag1Select, 1705 _bcmFieldAuxTagVn, 1706 fp_global_mask_tcam_ofs + f1_offset, 33); 1707 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyCnTag, 1708 _bcmFieldSliceSelFpf1, 13, 1709 _bcmFieldSliceAuxTag1Select, 1710 _bcmFieldAuxTagCn, 1711 fp_global_mask_tcam_ofs + f1_offset, 33); 1712 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, 1713 bcmFieldQualifyFabricQueueTag, 1714 _bcmFieldSliceSelFpf1, 13, 1715 _bcmFieldSliceAuxTag1Select, 1716 _bcmFieldAuxTagFabricQueue, 1717 fp_global_mask_tcam_ofs + f1_offset, 1718 33); 1719 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, 1720 bcmFieldQualifyMplsForwardingLabel, 1721 _bcmFieldSliceSelFpf1, 13, 1722 _bcmFieldSliceAuxTag1Select, _bcmFieldAuxTagMplsFwdingLabel, 1723 fp_global_mask_tcam_ofs + f1_offset, 33 1724 ); 1725 _FP_QUAL_PRIMARY_EXT_ADD(unit, stage_fc, 1726 bcmFieldQualifyMplsForwardingLabelTtl, 1727 _bcmFieldDevSelDisable, 0, 1728 _bcmFieldSliceSelFpf1, 13, 1729 _bcmFieldSliceAuxTag1Select, _bcmFieldAuxTagMplsFwdingLabel, 1730 0, 1731 fp_global_mask_tcam_ofs + f1_offset, 8, 1732 fp_global_mask_tcam_ofs + f1_offset + 32, 1, 1733 0, 0, 1734 0, 1 1735 ); 1736 _FP_QUAL_PRIMARY_EXT_ADD(unit, stage_fc, 1737 bcmFieldQualifyMplsForwardingLabelBos, 1738 _bcmFieldDevSelDisable, 0, 1739 _bcmFieldSliceSelFpf1, 13, 1740 _bcmFieldSliceAuxTag1Select, _bcmFieldAuxTagMplsFwdingLabel, 1741 0, 1742 fp_global_mask_tcam_ofs + f1_offset + 8, 1, 1743 fp_global_mask_tcam_ofs + f1_offset + 32, 1, 1744 0, 0, 1745 0, 1 1746 ); 1747 _FP_QUAL_PRIMARY_EXT_ADD(unit, stage_fc, 1748 bcmFieldQualifyMplsForwardingLabelExp, 1749 _bcmFieldDevSelDisable, 0, 1750 _bcmFieldSliceSelFpf1, 13, 1751 _bcmFieldSliceAuxTag1Select, _bcmFieldAuxTagMplsFwdingLabel, 1752 0, 1753 fp_global_mask_tcam_ofs + f1_offset + 9, 3, 1754 fp_global_mask_tcam_ofs + f1_offset + 32, 1, 1755 0, 0, 1756 0, 1 1757 ); 1758 } else { 1759 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVnTag, 1760 _bcmFieldSliceSelFpf1, 13, 1761 _bcmFieldSliceAuxTag1Select, 1762 _bcmFieldAuxTagVn, 1763 fp_global_mask_tcam_ofs + f1_offset, 33); 1764 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyCnTag, 1765 _bcmFieldSliceSelFpf1, 13, 1766 _bcmFieldSliceAuxTag1Select, 1767 _bcmFieldAuxTagCn, 1768 fp_global_mask_tcam_ofs + f1_offset, 33); 1769 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1770 bcmFieldQualifyFabricQueueTag, 1771 _bcmFieldSliceSelFpf1, 13, 1772 _bcmFieldSliceAuxTag1Select, 1773 _bcmFieldAuxTagFabricQueue, 1774 fp_global_mask_tcam_ofs + f1_offset, 1775 33); 1776 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 1777 bcmFieldQualifyMplsForwardingLabel, 1778 _bcmFieldSliceSelFpf1, 13, 1779 _bcmFieldSliceAuxTag1Select, _bcmFieldAuxTagMplsFwdingLabel, 1780 fp_global_mask_tcam_ofs + f1_offset, 33 1781 ); 1782 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyMplsForwardingLabelTtl, 1783 _bcmFieldDevSelDisable, 0, 1784 _bcmFieldSliceSelFpf1, 13, 1785 _bcmFieldSliceAuxTag1Select, _bcmFieldAuxTagMplsFwdingLabel, 1786 0, 1787 fp_global_mask_tcam_ofs + f1_offset, 8, 1788 fp_global_mask_tcam_ofs + f1_offset + 32, 1, 1789 0, 0, 1790 0 1791 ); 1792 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyMplsForwardingLabelBos, 1793 _bcmFieldDevSelDisable, 0, 1794 _bcmFieldSliceSelFpf1, 13, 1795 _bcmFieldSliceAuxTag1Select, _bcmFieldAuxTagMplsFwdingLabel, 1796 0, 1797 fp_global_mask_tcam_ofs + f1_offset + 8, 1, 1798 fp_global_mask_tcam_ofs + f1_offset + 32, 1, 1799 0, 0, 1800 0 1801 ); 1802 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyMplsForwardingLabelExp, 1803 _bcmFieldDevSelDisable, 0, 1804 _bcmFieldSliceSelFpf1, 13, 1805 _bcmFieldSliceAuxTag1Select, _bcmFieldAuxTagMplsFwdingLabel, 1806 0, 1807 fp_global_mask_tcam_ofs + f1_offset + 9, 3, 1808 fp_global_mask_tcam_ofs + f1_offset + 32, 1, 1809 0, 0, 1810 0 1811 ); 1812 } 1813 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyMplsForwardingLabelId, 1814 _bcmFieldSliceSelFpf1, 13, 1815 _bcmFieldSliceAuxTag1Select, _bcmFieldAuxTagMplsFwdingLabel, 1816 fp_global_mask_tcam_ofs + f1_offset + 12, 21 1817 ); 1818 if (soc_feature(unit, soc_feature_td2p_fp_sw_war)) { 1819 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyMplsControlWord, 1820 _bcmFieldSliceSelFpf1, 13, 1821 _bcmFieldSliceAuxTag1Select, _bcmFieldAuxTagMplsCntlWord, 1822 fp_global_mask_tcam_ofs + f1_offset, 33 1823 ); 1824 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVxlanHeaderBits8_31, 1825 _bcmFieldSliceSelFpf1, 13, 1826 _bcmFieldSliceAuxTag1Select, 1827 _bcmFieldAuxTagVxlanReserved, 1828 fp_global_mask_tcam_ofs + f1_offset, 24); 1829 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVxlanNetworkId, 1830 _bcmFieldSliceSelFpf1, 13, 1831 _bcmFieldSliceAuxTag1Select, 1832 _bcmFieldAuxTagVxlanOrLLTag, 1833 fp_global_mask_tcam_ofs + f1_offset, 24); 1834 _FP_QUAL_PRIMARY_EXT_ADD(unit, stage_fc, bcmFieldQualifyRtag7AHashLower, 1835 _bcmFieldDevSelDisable, 0, 1836 _bcmFieldSliceSelFpf1, 13, 1837 _bcmFieldSliceAuxTag1Select, _bcmFieldAuxTagRtag7A, 1838 0, 1839 fp_global_mask_tcam_ofs + f1_offset, 16, 1840 fp_global_mask_tcam_ofs + f1_offset + 32, 1, 1841 0, 0, 1842 0, 1); 1843 _FP_QUAL_PRIMARY_EXT_ADD(unit, stage_fc, bcmFieldQualifyRtag7BHashLower, 1844 _bcmFieldDevSelDisable, 0, 1845 _bcmFieldSliceSelFpf1, 13, 1846 _bcmFieldSliceAuxTag1Select, _bcmFieldAuxTagRtag7B, 1847 0, 1848 fp_global_mask_tcam_ofs + f1_offset, 16, 1849 fp_global_mask_tcam_ofs + f1_offset + 32, 1, 1850 0, 0, 1851 0, 1); 1852 1853 } else { 1854 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyMplsControlWord, 1855 _bcmFieldSliceSelFpf1, 13, 1856 _bcmFieldSliceAuxTag1Select, _bcmFieldAuxTagMplsCntlWord, 1857 fp_global_mask_tcam_ofs + f1_offset, 33 1858 ); 1859 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVxlanHeaderBits8_31, 1860 _bcmFieldSliceSelFpf1, 13, 1861 _bcmFieldSliceAuxTag1Select, 1862 _bcmFieldAuxTagVxlanReserved, 1863 fp_global_mask_tcam_ofs + f1_offset, 24); 1864 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVxlanNetworkId, 1865 _bcmFieldSliceSelFpf1, 13, 1866 _bcmFieldSliceAuxTag1Select, 1867 _bcmFieldAuxTagVxlanOrLLTag, 1868 fp_global_mask_tcam_ofs + f1_offset, 24); 1869 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyRtag7AHashLower, 1870 _bcmFieldDevSelDisable, 0, 1871 _bcmFieldSliceSelFpf1, 13, 1872 _bcmFieldSliceAuxTag1Select, _bcmFieldAuxTagRtag7A, 1873 0, 1874 fp_global_mask_tcam_ofs + f1_offset, 16, 1875 fp_global_mask_tcam_ofs + f1_offset + 32, 1, 1876 0, 0, 1877 0); 1878 1879 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyRtag7BHashLower, 1880 _bcmFieldDevSelDisable, 0, 1881 _bcmFieldSliceSelFpf1, 13, 1882 _bcmFieldSliceAuxTag1Select, _bcmFieldAuxTagRtag7B, 1883 0, 1884 fp_global_mask_tcam_ofs + f1_offset, 16, 1885 fp_global_mask_tcam_ofs + f1_offset + 32, 1, 1886 0, 0, 1887 0); 1888 } 1889 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVxlanHeaderBits56_63, 1890 _bcmFieldSliceSelFpf1, 13, 1891 _bcmFieldSliceAuxTag1Select, 1892 _bcmFieldAuxTagVxlanReserved, 1893 fp_global_mask_tcam_ofs + f1_offset + 24, 8); 1894 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVxlanFlags, 1895 _bcmFieldSliceSelFpf1, 13, 1896 _bcmFieldSliceAuxTag1Select, 1897 _bcmFieldAuxTagVxlanOrLLTag, 1898 fp_global_mask_tcam_ofs + f1_offset + 24, 8); 1899 1900 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyRtag7AHashUpper, 1901 _bcmFieldSliceSelFpf1, 13, 1902 _bcmFieldSliceAuxTag1Select, 1903 _bcmFieldAuxTagRtag7A, 1904 fp_global_mask_tcam_ofs + f1_offset + 16, 17); 1905 1906 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyRtag7BHashUpper, 1907 _bcmFieldSliceSelFpf1, 13, 1908 _bcmFieldSliceAuxTag1Select, 1909 _bcmFieldAuxTagRtag7B, 1910 fp_global_mask_tcam_ofs + f1_offset + 16, 17); 1911 1912 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMplsForwardingLabelAction, 1913 _bcmFieldSliceSelFpf1, 13, 1914 fp_global_mask_tcam_ofs + f1_offset + 33, 3 1915 ); 1916 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMacAddrsNormalized, 1917 _bcmFieldSliceSelFpf1, 14, 1918 fp_global_mask_tcam_ofs + f1_offset + 48, 1 1919 ); 1920 1921 if (soc_feature(unit, soc_feature_td2p_fp_sw_war)) { 1922 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifySrcMac, 1923 _bcmFieldSliceSelFpf1, 14, 1924 fp_global_mask_tcam_ofs + f1_offset, 48 1925 ); 1926 } else { 1927 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcMac, 1928 _bcmFieldSliceSelFpf1, 14, 1929 fp_global_mask_tcam_ofs + f1_offset, 48 1930 ); 1931 } 1932 1933 if (soc_feature(unit, soc_feature_td2p_fp_sw_war)) { 1934 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol, 1935 _bcmFieldSliceSelFpf1, 15, 1936 fp_global_mask_tcam_ofs + f1_offset, 8); 1937 } else { 1938 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol, 1939 _bcmFieldSliceSelFpf1, 15, 1940 fp_global_mask_tcam_ofs + f1_offset, 8); 1941 } 1942 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4DstPort, 1943 _bcmFieldSliceSelFpf1, 15, 1944 fp_global_mask_tcam_ofs + f1_offset + 8, 16); 1945 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4SrcPort, 1946 _bcmFieldSliceSelFpf1, 15, 1947 fp_global_mask_tcam_ofs + f1_offset + 24, 16); 1948 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIcmpTypeCode, 1949 _bcmFieldSliceSelFpf1, 15, 1950 fp_global_mask_tcam_ofs + f1_offset + 24, 16); 1951 /* L4_NORMALIZED */ 1952 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTcpControl, 1953 _bcmFieldSliceSelFpf1, 15, 1954 _bcmFieldSliceTcpClassSelect, 0, 1955 fp_global_mask_tcam_ofs + f1_offset + 41, 6); 1956 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTcpClassZero, 1957 _bcmFieldSliceSelFpf1, 15, 1958 _bcmFieldSliceTcpClassSelect, 0, 1959 fp_global_mask_tcam_ofs + f1_offset + 41, 6); 1960 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTcpClassOne, 1961 _bcmFieldSliceSelFpf1, 15, 1962 _bcmFieldSliceTcpClassSelect, 1, 1963 fp_global_mask_tcam_ofs + f1_offset + 41, 6); 1964 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpFrag, 1965 _bcmFieldSliceSelFpf1, 15, 1966 fp_global_mask_tcam_ofs + f1_offset + 47, 2); 1967 1968 1969 if (soc_feature(unit, soc_feature_td2p_fp_sw_war)) { 1970 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyFcoeVersionIsZero, 1971 _bcmFieldSliceSelFpf1, 16, 1972 fp_global_mask_tcam_ofs + f1_offset, 1); 1973 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyFcoeSOF, 1974 _bcmFieldSliceSelFpf1, 16, 1975 fp_global_mask_tcam_ofs + f1_offset + 1, 8); 1976 } else { 1977 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFcoeVersionIsZero, 1978 _bcmFieldSliceSelFpf1, 16, 1979 fp_global_mask_tcam_ofs + f1_offset, 1); 1980 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFcoeSOF, 1981 _bcmFieldSliceSelFpf1, 16, 1982 fp_global_mask_tcam_ofs + f1_offset + 1, 8); 1983 } 1984 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanRCtl, 1985 _bcmFieldSliceSelFpf1, 16, 1986 fp_global_mask_tcam_ofs + f1_offset + 15, 8); 1987 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanVFTVersion, 1988 _bcmFieldSliceSelFpf1, 16, 1989 fp_global_mask_tcam_ofs + f1_offset + 23, 2); 1990 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanVFTHopCount, 1991 _bcmFieldSliceSelFpf1, 16, 1992 fp_global_mask_tcam_ofs + f1_offset + 25, 5); 1993 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanVFTVsanId, 1994 _bcmFieldSliceSelFpf1, 16, 1995 fp_global_mask_tcam_ofs + f1_offset + 30, 12); 1996 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanVFTVsanPri, 1997 _bcmFieldSliceSelFpf1, 16, 1998 fp_global_mask_tcam_ofs + f1_offset + 42, 3); 1999 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanSrcFpmaCheck, 2000 _bcmFieldSliceSelFpf1, 16, 2001 fp_global_mask_tcam_ofs + f1_offset + 45, 1); 2002 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanSrcBindCheck, 2003 _bcmFieldSliceSelFpf1, 16, 2004 fp_global_mask_tcam_ofs + f1_offset + 46, 1); 2005 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanZoneCheck, 2006 _bcmFieldSliceSelFpf1, 16, 2007 fp_global_mask_tcam_ofs + f1_offset + 47, 2); 2008 /* FPF2 single wide */ 2009 2010 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTtl, 2011 _bcmFieldSliceSelFpf2, 0, 2012 _bcmFieldSliceTtlClassSelect, 0, 2013 f2_offset, 8); 2014 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTtlClassZero, 2015 _bcmFieldSliceSelFpf2, 0, 2016 _bcmFieldSliceTtlClassSelect, 0, 2017 f2_offset, 8); 2018 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTtlClassOne, 2019 _bcmFieldSliceSelFpf2, 0, 2020 _bcmFieldSliceTtlClassSelect, 1, 2021 f2_offset, 8); 2022 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTcpControl, 2023 _bcmFieldSliceSelFpf2, 0, 2024 _bcmFieldSliceTcpClassSelect, 0, 2025 f2_offset + 8, 6); 2026 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTcpClassZero, 2027 _bcmFieldSliceSelFpf2, 0, 2028 _bcmFieldSliceTcpClassSelect, 0, 2029 f2_offset + 8, 6); 2030 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTcpClassOne, 2031 _bcmFieldSliceSelFpf2, 0, 2032 _bcmFieldSliceTcpClassSelect, 1, 2033 f2_offset + 8, 6); 2034 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpFlags, 2035 _bcmFieldSliceSelFpf2, 0, f2_offset + 14, 2); 2036 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTos, 2037 _bcmFieldSliceSelFpf2, 0, 2038 _bcmFieldSliceTosClassSelect, 0, 2039 f2_offset + 16, 8); 2040 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTosClassZero, 2041 _bcmFieldSliceSelFpf2, 0, 2042 _bcmFieldSliceTosClassSelect, 0, 2043 f2_offset + 16, 8); 2044 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTosClassOne, 2045 _bcmFieldSliceSelFpf2, 0, 2046 _bcmFieldSliceTosClassSelect, 1, 2047 f2_offset + 16, 8); 2048 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4DstPort, 2049 _bcmFieldSliceSelFpf2, 0, f2_offset + 24, 16); 2050 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4SrcPort, 2051 _bcmFieldSliceSelFpf2, 0, f2_offset + 40, 16); 2052 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIcmpTypeCode, 2053 _bcmFieldSliceSelFpf2, 0, f2_offset + 40, 16); 2054 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol, 2055 _bcmFieldSliceSelFpf2, 0, f2_offset + 56, 8); 2056 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstIp, 2057 _bcmFieldSliceSelFpf2, 0, f2_offset + 64, 32); 2058 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcIp, 2059 _bcmFieldSliceSelFpf2, 0, f2_offset + 96, 32); 2060 2061 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTtl, 2062 _bcmFieldSliceSelFpf2, 1, 2063 _bcmFieldSliceTtlClassSelect, 0, 2064 f2_offset, 8); 2065 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTtlClassZero, 2066 _bcmFieldSliceSelFpf2, 1, 2067 _bcmFieldSliceTtlClassSelect, 0, 2068 f2_offset, 8); 2069 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTtlClassOne, 2070 _bcmFieldSliceSelFpf2, 1, 2071 _bcmFieldSliceTtlClassSelect, 1, 2072 f2_offset, 8); 2073 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTcpControl, 2074 _bcmFieldSliceSelFpf2, 1, 2075 _bcmFieldSliceTcpClassSelect, 0, 2076 f2_offset + 8, 6); 2077 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTcpClassZero, 2078 _bcmFieldSliceSelFpf2, 1, 2079 _bcmFieldSliceTcpClassSelect, 0, 2080 f2_offset + 8, 6); 2081 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTcpClassOne, 2082 _bcmFieldSliceSelFpf2, 1, 2083 _bcmFieldSliceTcpClassSelect, 1, 2084 f2_offset + 8, 6); 2085 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpFrag, 2086 _bcmFieldSliceSelFpf2, 1, f2_offset + 14, 2); 2087 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTos, 2088 _bcmFieldSliceSelFpf2, 1, 2089 _bcmFieldSliceTosClassSelect, 0, 2090 f2_offset + 16, 8); 2091 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTosClassZero, 2092 _bcmFieldSliceSelFpf2, 1, 2093 _bcmFieldSliceTosClassSelect, 0, 2094 f2_offset + 16, 8); 2095 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTosClassOne, 2096 _bcmFieldSliceSelFpf2, 1, 2097 _bcmFieldSliceTosClassSelect, 1, 2098 f2_offset + 16, 8); 2099 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4DstPort, 2100 _bcmFieldSliceSelFpf2, 1, f2_offset + 24, 16); 2101 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4SrcPort, 2102 _bcmFieldSliceSelFpf2, 1, f2_offset + 40, 16); 2103 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIcmpTypeCode, 2104 _bcmFieldSliceSelFpf2, 1, f2_offset + 40, 16); 2105 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol, 2106 _bcmFieldSliceSelFpf2, 1, f2_offset + 56, 8); 2107 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstIp, 2108 _bcmFieldSliceSelFpf2, 1, f2_offset + 64, 32); 2109 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcIp, 2110 _bcmFieldSliceSelFpf2, 1, f2_offset + 96, 32); 2111 2112 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcIp6, 2113 _bcmFieldSliceSelFpf2, 2, f2_offset, 128); 2114 2115 if (!soc_feature(unit, soc_feature_fp_based_oam)) { 2116 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstIp6, 2117 _bcmFieldSliceSelFpf2, 3, f2_offset, 128); 2118 } else { 2119 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstIp6, 2120 _bcmFieldSliceSelFpf2, 3, 2121 _bcmFieldSliceOamOverLayEnable, 2122 _bcmFieldOamOverlayDisable, 2123 f2_offset, 128); 2124 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 2125 bcmFieldQualifyEthernetOamHeaderBits0_31, 2126 _bcmFieldSliceSelFpf2, 3, 2127 _bcmFieldSliceOamOverLayEnable, 2128 _bcmFieldOamOverlayEnable, 2129 f2_offset + 96, 32); 2130 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 2131 bcmFieldQualifyEthernetOamHeaderBits32_63, 2132 _bcmFieldSliceSelFpf2, 3, 2133 _bcmFieldSliceOamOverLayEnable, 2134 _bcmFieldOamOverlayEnable, 2135 f2_offset + 64, 32); 2136 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 2137 bcmFieldQualifyEthernetOamDstClassL2, 2138 _bcmFieldSliceSelFpf2, 3, 2139 _bcmFieldSliceOamOverLayEnable, 2140 _bcmFieldOamOverlayEnable, 2141 f2_offset + 57, 6); 2142 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 2143 bcmFieldQualifyEthernetOamTxPktUPMEP, 2144 _bcmFieldSliceSelFpf2, 3, 2145 _bcmFieldSliceOamOverLayEnable, 2146 _bcmFieldOamOverlayEnable, 2147 f2_offset + 56, 1); 2148 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 2149 bcmFieldQualifyEthernetOamInterfaceClassPort, 2150 _bcmFieldSliceSelFpf2, 3, 2151 _bcmFieldSliceOamOverLayEnable, 2152 _bcmFieldOamOverlayEnable, 2153 f2_offset + 32, 8); 2154 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 2155 bcmFieldQualifyEthernetOamClassVlanTranslateKeyFirst, 2156 _bcmFieldSliceSelFpf2, 3, 2157 _bcmFieldSliceOamOverLayEnable, 2158 _bcmFieldOamOverlayEnable, 2159 f2_offset + 24, 8); 2160 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 2161 bcmFieldQualifyEthernetOamClassVlanTranslateKeySecond, 2162 _bcmFieldSliceSelFpf2, 3, 2163 _bcmFieldSliceOamOverLayEnable, 2164 _bcmFieldOamOverlayEnable, 2165 f2_offset + 16, 8); 2166 _FP_QUAL_THREE_SLICE_SEL_ADD(unit, stage_fc, 2167 bcmFieldQualifyEthernetOamInterfaceClassNiv, 2168 _bcmFieldSliceSelFpf2, 3, 2169 _bcmFieldSliceOamOverLayEnable, _bcmFieldOamOverlayEnable, 2170 _bcmFieldSliceOamInterfaceClassSelect, 2171 _bcmFieldOamInterfaceClassSelectNiv, 2172 f2_offset + 8, 8); 2173 _FP_QUAL_THREE_SLICE_SEL_ADD(unit, stage_fc, 2174 bcmFieldQualifyEthernetOamInterfaceClassMim, 2175 _bcmFieldSliceSelFpf2, 3, 2176 _bcmFieldSliceOamOverLayEnable, _bcmFieldOamOverlayEnable, 2177 _bcmFieldSliceOamInterfaceClassSelect, 2178 _bcmFieldOamInterfaceClassSelectMim, 2179 f2_offset + 8, 8); 2180 _FP_QUAL_THREE_SLICE_SEL_ADD(unit, stage_fc, 2181 bcmFieldQualifyEthernetOamInterfaceClassVxlan, 2182 _bcmFieldSliceSelFpf2, 3, 2183 _bcmFieldSliceOamOverLayEnable, _bcmFieldOamOverlayEnable, 2184 _bcmFieldSliceOamInterfaceClassSelect, 2185 _bcmFieldOamInterfaceClassSelectVxlan, 2186 f2_offset + 8, 8); 2187 _FP_QUAL_THREE_SLICE_SEL_ADD(unit, stage_fc, 2188 bcmFieldQualifyEthernetOamInterfaceClassVlan, 2189 _bcmFieldSliceSelFpf2, 3, 2190 _bcmFieldSliceOamOverLayEnable, _bcmFieldOamOverlayEnable, 2191 _bcmFieldSliceOamInterfaceClassSelect, 2192 _bcmFieldOamInterfaceClassSelectVlan, 2193 f2_offset + 8, 8); 2194 _FP_QUAL_THREE_SLICE_SEL_ADD(unit, stage_fc, 2195 bcmFieldQualifyEthernetOamInterfaceClassMpls, 2196 _bcmFieldSliceSelFpf2, 3, 2197 _bcmFieldSliceOamOverLayEnable, _bcmFieldOamOverlayEnable, 2198 _bcmFieldSliceOamInterfaceClassSelect, 2199 _bcmFieldOamInterfaceClassSelectMpls, 2200 f2_offset + 8, 8); 2201 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 2202 bcmFieldQualifyEthernetOamClassVpn, 2203 _bcmFieldSliceSelFpf2, 3, 2204 _bcmFieldSliceOamOverLayEnable, 2205 _bcmFieldOamOverlayEnable, 2206 f2_offset + 0, 8); 2207 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 2208 bcmFieldQualifyMplsOamHeaderBits0_31, 2209 _bcmFieldSliceSelFpf2, 3, 2210 _bcmFieldSliceOamOverLayEnable, 2211 _bcmFieldOamOverlayEnable, 2212 f2_offset + 96, 32); 2213 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 2214 bcmFieldQualifyMplsOamHeaderBits32_63, 2215 _bcmFieldSliceSelFpf2, 3, 2216 _bcmFieldSliceOamOverLayEnable, 2217 _bcmFieldOamOverlayEnable, 2218 f2_offset + 64, 32); 2219 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 2220 bcmFieldQualifyMplsOamUpperLabelDataDrop, 2221 _bcmFieldSliceSelFpf2, 3, 2222 _bcmFieldSliceOamOverLayEnable, 2223 _bcmFieldOamOverlayEnable, 2224 f2_offset + 53, 1); 2225 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 2226 bcmFieldQualifyMplsOamGALLabelOnly, 2227 _bcmFieldSliceSelFpf2, 3, 2228 _bcmFieldSliceOamOverLayEnable, 2229 _bcmFieldOamOverlayEnable, 2230 f2_offset + 52, 1); 2231 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 2232 bcmFieldQualifyMplsOamGALExposed, 2233 _bcmFieldSliceSelFpf2, 3, 2234 _bcmFieldSliceOamOverLayEnable, 2235 _bcmFieldOamOverlayEnable, 2236 f2_offset + 47, 1); 2237 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 2238 bcmFieldQualifyMplsOamACH, 2239 _bcmFieldSliceSelFpf2, 3, 2240 _bcmFieldSliceOamOverLayEnable, 2241 _bcmFieldOamOverlayEnable, 2242 f2_offset + 15, 32); 2243 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 2244 bcmFieldQualifyMplsOamControlPktType, 2245 _bcmFieldSliceSelFpf2, 3, 2246 _bcmFieldSliceOamOverLayEnable, 2247 _bcmFieldOamOverlayEnable, 2248 f2_offset + 12, 3); 2249 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 2250 bcmFieldQualifyMplsOamClassMplsSwitchLabel, 2251 _bcmFieldSliceSelFpf2, 3, 2252 _bcmFieldSliceOamOverLayEnable, 2253 _bcmFieldOamOverlayEnable, 2254 f2_offset + 0, 12); 2255 } 2256 2257 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTtl, 2258 _bcmFieldSliceSelFpf2, 4, 2259 _bcmFieldSliceTtlClassSelect, 0, 2260 f2_offset, 8); 2261 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTtlClassZero, 2262 _bcmFieldSliceSelFpf2, 4, 2263 _bcmFieldSliceTtlClassSelect, 0, 2264 f2_offset, 8); 2265 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTtlClassOne, 2266 _bcmFieldSliceSelFpf2, 4, 2267 _bcmFieldSliceTtlClassSelect, 1, 2268 f2_offset, 8); 2269 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTcpControl, 2270 _bcmFieldSliceSelFpf2, 4, 2271 _bcmFieldSliceTcpClassSelect, 0, 2272 f2_offset + 8, 6); 2273 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTcpClassZero, 2274 _bcmFieldSliceSelFpf2, 4, 2275 _bcmFieldSliceTcpClassSelect, 0, 2276 f2_offset + 8, 6); 2277 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTcpClassOne, 2278 _bcmFieldSliceSelFpf2, 4, 2279 _bcmFieldSliceTcpClassSelect, 1, 2280 f2_offset + 8, 6); 2281 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIp6FlowLabel, 2282 _bcmFieldSliceSelFpf2, 4, f2_offset + 14, 20); 2283 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTos, 2284 _bcmFieldSliceSelFpf2, 4, 2285 _bcmFieldSliceTosClassSelect, 0, 2286 f2_offset + 34, 8); 2287 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTosClassZero, 2288 _bcmFieldSliceSelFpf2, 4, 2289 _bcmFieldSliceTosClassSelect, 0, 2290 f2_offset + 34, 8); 2291 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTosClassOne, 2292 _bcmFieldSliceSelFpf2, 4, 2293 _bcmFieldSliceTosClassSelect, 1, 2294 f2_offset + 34, 8); 2295 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol, 2296 _bcmFieldSliceSelFpf2, 4, f2_offset + 42, 8); 2297 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3Ingress, 2298 _bcmFieldSliceSelFpf2, 4, f2_offset + 50, 14); 2299 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstIp6High, 2300 _bcmFieldSliceSelFpf2, 4, f2_offset + 64, 64); 2301 2302 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan, 2303 _bcmFieldSliceSelFpf2, 5, f2_offset, 16); 2304 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 2305 _bcmFieldSliceSelFpf2, 5, f2_offset, 12); 2306 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi, 2307 _bcmFieldSliceSelFpf2, 5, f2_offset + 12, 1); 2308 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri, 2309 _bcmFieldSliceSelFpf2, 5, f2_offset + 13, 3); 2310 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyEtherType, 2311 _bcmFieldSliceSelFpf2, 5, f2_offset + 16, 16); 2312 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcMac, 2313 _bcmFieldSliceSelFpf2, 5, f2_offset + 32, 48); 2314 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstMac, 2315 _bcmFieldSliceSelFpf2, 5, f2_offset + 80, 48); 2316 2317 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan, 2318 _bcmFieldSliceSelFpf2, 6, f2_offset, 16); 2319 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 2320 _bcmFieldSliceSelFpf2, 6, f2_offset, 12); 2321 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi, 2322 _bcmFieldSliceSelFpf2, 6, f2_offset + 12, 1); 2323 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri, 2324 _bcmFieldSliceSelFpf2, 6, f2_offset + 13, 3); 2325 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyEtherType, 2326 _bcmFieldSliceSelFpf2, 6, f2_offset + 16, 16); 2327 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcMac, 2328 _bcmFieldSliceSelFpf2, 6, f2_offset + 32, 48); 2329 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcIp, 2330 _bcmFieldSliceSelFpf2, 6, f2_offset + 80, 32); 2331 2332 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan, 2333 _bcmFieldSliceSelFpf2, 7, f2_offset, 16); 2334 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 2335 _bcmFieldSliceSelFpf2, 7, f2_offset, 12); 2336 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi, 2337 _bcmFieldSliceSelFpf2, 7, f2_offset + 12, 1); 2338 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri, 2339 _bcmFieldSliceSelFpf2, 7, f2_offset + 13, 3); 2340 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyEtherType, 2341 _bcmFieldSliceSelFpf2, 7, f2_offset + 16, 16); 2342 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTtl, 2343 _bcmFieldSliceSelFpf2, 7, 2344 _bcmFieldSliceTtlClassSelect, 0, 2345 f2_offset + 32, 8); 2346 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTtlClassZero, 2347 _bcmFieldSliceSelFpf2, 7, 2348 _bcmFieldSliceTtlClassSelect, 0, 2349 f2_offset + 32, 8); 2350 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTtlClassOne, 2351 _bcmFieldSliceSelFpf2, 7, 2352 _bcmFieldSliceTtlClassSelect, 1, 2353 f2_offset + 32, 8); 2354 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol, 2355 _bcmFieldSliceSelFpf2, 7, f2_offset + 40, 8); 2356 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstIp, 2357 _bcmFieldSliceSelFpf2, 7, f2_offset + 48, 32); 2358 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstMac, 2359 _bcmFieldSliceSelFpf2, 7, f2_offset + 80, 48); 2360 2361 _FP_QUAL_ADD(unit, stage_fc, _bcmFieldQualifyData0, 2362 _bcmFieldSliceSelFpf2, 8, f2_offset, 128); 2363 2364 _FP_QUAL_ADD(unit, stage_fc, _bcmFieldQualifyData1, 2365 _bcmFieldSliceSelFpf2, 9, f2_offset, 128); 2366 2367 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcIp6High, 2368 _bcmFieldSliceSelFpf2, 10, f2_offset, 64); 2369 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstIp6High, 2370 _bcmFieldSliceSelFpf2, 10, f2_offset + 64, 64); 2371 2372 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcMac, 2373 _bcmFieldSliceSelFpf2, 11, f2_offset + 32, 48); 2374 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstMac, 2375 _bcmFieldSliceSelFpf2, 11, f2_offset + 80, 48); 2376 2377 2378 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanDFCtl, 2379 _bcmFieldSliceSelFpf2, 12, f2_offset + 32, 8); 2380 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanCSCtl, 2381 _bcmFieldSliceSelFpf2, 12, f2_offset + 40, 8); 2382 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanFCtl, 2383 _bcmFieldSliceSelFpf2, 12, f2_offset + 48, 24); 2384 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanType, 2385 _bcmFieldSliceSelFpf2, 12, f2_offset + 72, 8); 2386 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanDstId, 2387 _bcmFieldSliceSelFpf2, 12, f2_offset + 80, 24); 2388 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanSrcId, 2389 _bcmFieldSliceSelFpf2, 12, f2_offset + 104, 24); 2390 /* FPF 3 */ 2391 /* Present in Global Mask Field */ 2392 if (soc_feature(unit, soc_feature_td2p_fp_sw_war)) { 2393 /* SW WAR for Td2+ A0 to ignore F3 for second part of double wide mode */ 2394 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL2, 2395 _bcmFieldSliceSelFpf3, 0, 2396 _bcmFieldSliceDstClassSelect, 0, 2397 fp_global_mask_tcam_ofs + f3_offset, 10); 2398 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL3, 2399 _bcmFieldSliceSelFpf3, 0, 2400 _bcmFieldSliceDstClassSelect, 1, 2401 fp_global_mask_tcam_ofs + f3_offset, 10); 2402 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, 2403 bcmFieldQualifyDstClassField, 2404 _bcmFieldSliceSelFpf3, 0, 2405 _bcmFieldSliceDstClassSelect, 2, 2406 fp_global_mask_tcam_ofs + f3_offset, 10); 2407 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, 2408 bcmFieldQualifySrcClassField, 2409 _bcmFieldSliceSelFpf3, 0, 2410 _bcmFieldSliceDstClassSelect, 3, 2411 fp_global_mask_tcam_ofs + f3_offset, 10); 2412 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL2, 2413 _bcmFieldSliceSelFpf3, 0, 2414 _bcmFieldSliceSrcClassSelect, 0, 2415 fp_global_mask_tcam_ofs + f3_offset + 10, 10); 2416 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL3, 2417 _bcmFieldSliceSelFpf3, 0, 2418 _bcmFieldSliceSrcClassSelect, 1, 2419 fp_global_mask_tcam_ofs + f3_offset + 10, 10); 2420 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, 2421 bcmFieldQualifyDstClassField, 2422 _bcmFieldSliceSelFpf3, 0, 2423 _bcmFieldSliceSrcClassSelect, 2, 2424 fp_global_mask_tcam_ofs + f3_offset + 10, 10); 2425 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, 2426 bcmFieldQualifySrcClassField, 2427 _bcmFieldSliceSelFpf3, 0, 2428 _bcmFieldSliceSrcClassSelect, 3, 2429 fp_global_mask_tcam_ofs + f3_offset + 10, 10); 2430 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVrf, 2431 _bcmFieldSliceSelFpf3, 0, 2432 _bcmFieldSliceFwdFieldSelect, 2433 _bcmFieldFwdFieldVrf, 2434 fp_global_mask_tcam_ofs + f3_offset + 20, 13); 2435 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVpn, 2436 _bcmFieldSliceSelFpf3, 0, 2437 _bcmFieldSliceFwdFieldSelect, 2438 _bcmFieldFwdFieldVpn, 2439 fp_global_mask_tcam_ofs + f3_offset + 20, 13); 2440 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, 2441 bcmFieldQualifyForwardingVlanId, 2442 _bcmFieldSliceSelFpf3, 0, 2443 _bcmFieldSliceFwdFieldSelect, 2444 _bcmFieldFwdFieldVlan, 2445 fp_global_mask_tcam_ofs + f3_offset + 20, 13); 2446 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, 2447 bcmFieldQualifySrcMplsGport, 2448 _bcmFieldSliceSelFpf3, 0, 2449 _bcmFieldSliceIngressEntitySelect, 2450 _bcmFieldFwdEntityMplsGport, 2451 fp_global_mask_tcam_ofs + f3_offset + 33, 16); 2452 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, 2453 bcmFieldQualifySrcMplsGports, 2454 _bcmFieldSliceSelFpf3, 0, 2455 _bcmFieldSliceIngressEntitySelect, 2456 _bcmFieldFwdEntityMplsGport, 2457 fp_global_mask_tcam_ofs + f3_offset + 33, 16); 2458 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, 2459 bcmFieldQualifySrcNivGport, 2460 _bcmFieldSliceSelFpf3, 0, 2461 _bcmFieldSliceIngressEntitySelect, 2462 _bcmFieldFwdEntityNivGport, 2463 fp_global_mask_tcam_ofs + f3_offset + 33, 16); 2464 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, 2465 bcmFieldQualifySrcNivGports, 2466 _bcmFieldSliceSelFpf3, 0, 2467 _bcmFieldSliceIngressEntitySelect, 2468 _bcmFieldFwdEntityNivGport, 2469 fp_global_mask_tcam_ofs + f3_offset + 33, 16); 2470 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMimGport, 2471 _bcmFieldSliceSelFpf3, 0, 2472 _bcmFieldSliceIngressEntitySelect, 2473 _bcmFieldFwdEntityMimGport, 2474 fp_global_mask_tcam_ofs + f3_offset + 33, 16); 2475 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMimGports, 2476 _bcmFieldSliceSelFpf3, 0, 2477 _bcmFieldSliceIngressEntitySelect, 2478 _bcmFieldFwdEntityMimGport, 2479 fp_global_mask_tcam_ofs + f3_offset + 33, 16); 2480 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVxlanGport, 2481 _bcmFieldSliceSelFpf3, 0, 2482 _bcmFieldSliceIngressEntitySelect, 2483 _bcmFieldFwdEntityVxlanGport, 2484 fp_global_mask_tcam_ofs + f3_offset + 33, 16); 2485 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVxlanGports, 2486 _bcmFieldSliceSelFpf3, 0, 2487 _bcmFieldSliceIngressEntitySelect, 2488 _bcmFieldFwdEntityVxlanGport, 2489 fp_global_mask_tcam_ofs + f3_offset + 33, 16); 2490 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVlanGport, 2491 _bcmFieldSliceSelFpf3, 0, 2492 _bcmFieldSliceIngressEntitySelect, 2493 _bcmFieldFwdEntityVlanGport, 2494 fp_global_mask_tcam_ofs + f3_offset + 33, 16); 2495 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVlanGports, 2496 _bcmFieldSliceSelFpf3, 0, 2497 _bcmFieldSliceIngressEntitySelect, 2498 _bcmFieldFwdEntityVlanGport, 2499 fp_global_mask_tcam_ofs + f3_offset + 33, 16); 2500 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL2, 2501 _bcmFieldSliceSelFpf3, 1, 2502 _bcmFieldSliceSrcClassSelect, 0, 2503 fp_global_mask_tcam_ofs + f3_offset, 10); 2504 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL3, 2505 _bcmFieldSliceSelFpf3, 1, 2506 _bcmFieldSliceSrcClassSelect, 1, 2507 fp_global_mask_tcam_ofs + f3_offset, 10); 2508 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, 2509 bcmFieldQualifyDstClassField, 2510 _bcmFieldSliceSelFpf3, 1, 2511 _bcmFieldSliceSrcClassSelect, 2, 2512 fp_global_mask_tcam_ofs + f3_offset, 10); 2513 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, 2514 bcmFieldQualifySrcClassField, 2515 _bcmFieldSliceSelFpf3, 1, 2516 _bcmFieldSliceSrcClassSelect, 3, 2517 fp_global_mask_tcam_ofs + f3_offset, 10); 2518 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVrf, 2519 _bcmFieldSliceSelFpf3, 1, 2520 _bcmFieldSliceFwdFieldSelect, 2521 _bcmFieldFwdFieldVrf, 2522 fp_global_mask_tcam_ofs + f3_offset + 10, 13); 2523 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVpn, 2524 _bcmFieldSliceSelFpf3, 1, 2525 _bcmFieldSliceFwdFieldSelect, 2526 _bcmFieldFwdFieldVpn, 2527 fp_global_mask_tcam_ofs + f3_offset + 10, 13); 2528 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, 2529 bcmFieldQualifyForwardingVlanId, 2530 _bcmFieldSliceSelFpf3, 1, 2531 _bcmFieldSliceFwdFieldSelect, 2532 _bcmFieldFwdFieldVlan, 2533 fp_global_mask_tcam_ofs + f3_offset + 10, 13); 2534 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 2535 _bcmFieldSliceSelFpf3, 1, 2536 fp_global_mask_tcam_ofs + f3_offset + 23, 12); 2537 2538 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL2, 2539 _bcmFieldSliceSelFpf3, 1, 2540 _bcmFieldSliceDstClassSelect, 0, 2541 fp_global_mask_tcam_ofs + f3_offset + 35, 10); 2542 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL3, 2543 _bcmFieldSliceSelFpf3, 1, 2544 _bcmFieldSliceDstClassSelect, 1, 2545 fp_global_mask_tcam_ofs + f3_offset + 35, 10); 2546 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, 2547 bcmFieldQualifyDstClassField, 2548 _bcmFieldSliceSelFpf3, 1, 2549 _bcmFieldSliceDstClassSelect, 2, 2550 fp_global_mask_tcam_ofs + f3_offset + 35, 10); 2551 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, 2552 bcmFieldQualifySrcClassField, 2553 _bcmFieldSliceSelFpf3, 1, 2554 _bcmFieldSliceDstClassSelect, 3, 2555 fp_global_mask_tcam_ofs + f3_offset + 35, 10); 2556 #if 0 2557 /* TOS_FN_LOW */ 2558 #endif 2559 2560 2561 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstPort, 2562 _bcmFieldSliceSelFpf3, 2, 2563 _bcmFieldSliceDstFwdEntitySelect, 2564 _bcmFieldFwdEntityGlp, 2565 fp_global_mask_tcam_ofs + f3_offset, 21); 2566 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstTrunk, 2567 _bcmFieldSliceSelFpf3, 2, 2568 _bcmFieldSliceDstFwdEntitySelect, 2569 _bcmFieldFwdEntityGlp, 2570 fp_global_mask_tcam_ofs + f3_offset, 21); 2571 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, 2572 bcmFieldQualifyDstMplsGport, 2573 _bcmFieldSliceSelFpf3, 2, 2574 _bcmFieldSliceDstFwdEntitySelect, 2575 _bcmFieldFwdEntityMplsGport, 2576 fp_global_mask_tcam_ofs + f3_offset, 21); 2577 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, 2578 bcmFieldQualifyDstMplsGports, 2579 _bcmFieldSliceSelFpf3, 2, 2580 _bcmFieldSliceDstFwdEntitySelect, 2581 _bcmFieldFwdEntityMplsGport, 2582 fp_global_mask_tcam_ofs + f3_offset, 21); 2583 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, 2584 bcmFieldQualifyDstNivGport, 2585 _bcmFieldSliceSelFpf3, 2, 2586 _bcmFieldSliceDstFwdEntitySelect, 2587 _bcmFieldFwdEntityNivGport, 2588 fp_global_mask_tcam_ofs + f3_offset, 21); 2589 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, 2590 bcmFieldQualifyDstNivGports, 2591 _bcmFieldSliceSelFpf3, 2, 2592 _bcmFieldSliceDstFwdEntitySelect, 2593 _bcmFieldFwdEntityNivGport, 2594 fp_global_mask_tcam_ofs + f3_offset, 21); 2595 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, 2596 bcmFieldQualifyDstMimGport, 2597 _bcmFieldSliceSelFpf3, 2, 2598 _bcmFieldSliceDstFwdEntitySelect, 2599 _bcmFieldFwdEntityMimGport, 2600 fp_global_mask_tcam_ofs + f3_offset, 21); 2601 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, 2602 bcmFieldQualifyDstMimGports, 2603 _bcmFieldSliceSelFpf3, 2, 2604 _bcmFieldSliceDstFwdEntitySelect, 2605 _bcmFieldFwdEntityMimGport, 2606 fp_global_mask_tcam_ofs + f3_offset, 21); 2607 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, 2608 bcmFieldQualifyDstVxlanGport, 2609 _bcmFieldSliceSelFpf3, 2, 2610 _bcmFieldSliceDstFwdEntitySelect, 2611 _bcmFieldFwdEntityVxlanGport, 2612 fp_global_mask_tcam_ofs + f3_offset, 21); 2613 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, 2614 bcmFieldQualifyDstVxlanGports, 2615 _bcmFieldSliceSelFpf3, 2, 2616 _bcmFieldSliceDstFwdEntitySelect, 2617 _bcmFieldFwdEntityVxlanGport, 2618 fp_global_mask_tcam_ofs + f3_offset, 21); 2619 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, 2620 bcmFieldQualifyDstVlanGport, 2621 _bcmFieldSliceSelFpf3, 2, 2622 _bcmFieldSliceDstFwdEntitySelect, 2623 _bcmFieldFwdEntityVlanGport, 2624 fp_global_mask_tcam_ofs + f3_offset, 21); 2625 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, 2626 bcmFieldQualifyDstVlanGports, 2627 _bcmFieldSliceSelFpf3, 2, 2628 _bcmFieldSliceDstFwdEntitySelect, 2629 _bcmFieldFwdEntityVlanGport, 2630 fp_global_mask_tcam_ofs + f3_offset, 21); 2631 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstGport, 2632 _bcmFieldSliceSelFpf3, 2, 2633 _bcmFieldSliceDstFwdEntitySelect, 2634 _bcmFieldFwdEntityCommonGport, 2635 fp_global_mask_tcam_ofs + f3_offset, 21); 2636 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstGports, 2637 _bcmFieldSliceSelFpf3, 2, 2638 _bcmFieldSliceDstFwdEntitySelect, 2639 _bcmFieldFwdEntityCommonGport, 2640 fp_global_mask_tcam_ofs + f3_offset, 21); 2641 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, 2642 bcmFieldQualifyDstL3Egress, 2643 _bcmFieldSliceSelFpf3, 2, 2644 _bcmFieldSliceDstFwdEntitySelect, 2645 _bcmFieldFwdEntityL3Egress, 2646 fp_global_mask_tcam_ofs + f3_offset, 21); 2647 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, 2648 bcmFieldQualifyDstL3EgressNextHops, 2649 _bcmFieldSliceSelFpf3, 2, 2650 _bcmFieldSliceDstFwdEntitySelect, 2651 _bcmFieldFwdEntityL3Egress, 2652 fp_global_mask_tcam_ofs + f3_offset, 21); 2653 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, 2654 bcmFieldQualifyDstMulticastGroup, 2655 _bcmFieldSliceSelFpf3, 2, 2656 _bcmFieldSliceDstFwdEntitySelect, 2657 _bcmFieldFwdEntityMulticastGroup, 2658 fp_global_mask_tcam_ofs + f3_offset, 21); 2659 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, 2660 bcmFieldQualifyDstMulticastGroups, 2661 _bcmFieldSliceSelFpf3, 2, 2662 _bcmFieldSliceDstFwdEntitySelect, 2663 _bcmFieldFwdEntityMulticastGroup, 2664 fp_global_mask_tcam_ofs + f3_offset, 21); 2665 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, 2666 bcmFieldQualifyDstMultipath, 2667 _bcmFieldSliceSelFpf3, 2, 2668 _bcmFieldSliceDstFwdEntitySelect, 2669 _bcmFieldFwdEntityMultipath, 2670 fp_global_mask_tcam_ofs + f3_offset, 21); 2671 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcPort, 2672 _bcmFieldSliceSelFpf3, 2, 2673 _bcmFieldSliceIngressEntitySelect, 2674 _bcmFieldFwdEntityGlp, 2675 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 2676 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcTrunk, 2677 _bcmFieldSliceSelFpf3, 2, 2678 _bcmFieldSliceIngressEntitySelect, 2679 _bcmFieldFwdEntityGlp, 2680 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 2681 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, 2682 bcmFieldQualifySrcMplsGport, 2683 _bcmFieldSliceSelFpf3, 2, 2684 _bcmFieldSliceIngressEntitySelect, 2685 _bcmFieldFwdEntityMplsGport, 2686 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 2687 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, 2688 bcmFieldQualifySrcMplsGports, 2689 _bcmFieldSliceSelFpf3, 2, 2690 _bcmFieldSliceIngressEntitySelect, 2691 _bcmFieldFwdEntityMplsGport, 2692 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 2693 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, 2694 bcmFieldQualifySrcNivGport, 2695 _bcmFieldSliceSelFpf3, 2, 2696 _bcmFieldSliceIngressEntitySelect, 2697 _bcmFieldFwdEntityNivGport, 2698 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 2699 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, 2700 bcmFieldQualifySrcNivGports, 2701 _bcmFieldSliceSelFpf3, 2, 2702 _bcmFieldSliceIngressEntitySelect, 2703 _bcmFieldFwdEntityNivGport, 2704 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 2705 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMimGport, 2706 _bcmFieldSliceSelFpf3, 2, 2707 _bcmFieldSliceIngressEntitySelect, 2708 _bcmFieldFwdEntityMimGport, 2709 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 2710 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMimGports, 2711 _bcmFieldSliceSelFpf3, 2, 2712 _bcmFieldSliceIngressEntitySelect, 2713 _bcmFieldFwdEntityMimGport, 2714 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 2715 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVxlanGport, 2716 _bcmFieldSliceSelFpf3, 2, 2717 _bcmFieldSliceIngressEntitySelect, 2718 _bcmFieldFwdEntityVxlanGport, 2719 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 2720 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVxlanGports, 2721 _bcmFieldSliceSelFpf3, 2, 2722 _bcmFieldSliceIngressEntitySelect, 2723 _bcmFieldFwdEntityVxlanGport, 2724 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 2725 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVlanGport, 2726 _bcmFieldSliceSelFpf3, 2, 2727 _bcmFieldSliceIngressEntitySelect, 2728 _bcmFieldFwdEntityVlanGport, 2729 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 2730 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVlanGports, 2731 _bcmFieldSliceSelFpf3, 2, 2732 _bcmFieldSliceIngressEntitySelect, 2733 _bcmFieldFwdEntityVlanGport, 2734 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 2735 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcModPortGport, 2736 _bcmFieldSliceSelFpf3, 2, 2737 _bcmFieldSliceIngressEntitySelect, 2738 _bcmFieldFwdEntityModPortGport, 2739 fp_global_mask_tcam_ofs + f3_offset + 21, 15); 2740 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcModPortGports, 2741 _bcmFieldSliceSelFpf3, 2, 2742 _bcmFieldSliceIngressEntitySelect, 2743 _bcmFieldFwdEntityModPortGport, 2744 fp_global_mask_tcam_ofs + f3_offset + 21, 15); 2745 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcTrunkMemberGport, 2746 _bcmFieldSliceSelFpf3, 2, 2747 _bcmFieldSliceIngressEntitySelect, 2748 _bcmFieldFwdEntityModPortGport, 2749 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 2750 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcModuleGport, 2751 _bcmFieldSliceSelFpf3, 2, 2752 _bcmFieldSliceIngressEntitySelect, 2753 _bcmFieldFwdEntityModPortGport, 2754 fp_global_mask_tcam_ofs + f3_offset + 28, 8); 2755 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcGport, 2756 _bcmFieldSliceSelFpf3, 2, 2757 _bcmFieldSliceIngressEntitySelect, 2758 _bcmFieldFwdEntityCommonGport, 2759 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 2760 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcGports, 2761 _bcmFieldSliceSelFpf3, 2, 2762 _bcmFieldSliceIngressEntitySelect, 2763 _bcmFieldFwdEntityCommonGport, 2764 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 2765 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTrunkMemberSourceModuleId, 2766 _bcmFieldSliceSelFpf3, 2, 2767 _bcmFieldSliceIngressEntitySelect, 2768 _bcmFieldFwdEntityModPortGport, 2769 fp_global_mask_tcam_ofs + f3_offset + 28, 8); 2770 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyMHOpcode, 2771 _bcmFieldSliceSelFpf3, 2, 2772 fp_global_mask_tcam_ofs + f3_offset + 37, 3); 2773 2774 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan, 2775 _bcmFieldSliceSelFpf3, 3, 2776 fp_global_mask_tcam_ofs + f3_offset, 16); 2777 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 2778 _bcmFieldSliceSelFpf3, 3, 2779 fp_global_mask_tcam_ofs + f3_offset, 12); 2780 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi, 2781 _bcmFieldSliceSelFpf3, 3, 2782 fp_global_mask_tcam_ofs + f3_offset + 12, 1); 2783 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri, 2784 _bcmFieldSliceSelFpf3, 3, 2785 fp_global_mask_tcam_ofs + f3_offset + 13, 3); 2786 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyVlanFormat, 2787 _bcmFieldSliceSelFpf3, 3, 2788 fp_global_mask_tcam_ofs + f3_offset + 16, 2); 2789 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyL2Format, 2790 _bcmFieldSliceSelFpf3, 3, 2791 fp_global_mask_tcam_ofs + f3_offset + 18, 2); 2792 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyTranslatedVlanFormat, 2793 _bcmFieldSliceSelFpf3, 3, 2794 fp_global_mask_tcam_ofs + f3_offset + 20, 2); 2795 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyMHOpcode, 2796 _bcmFieldSliceSelFpf3, 3, 2797 fp_global_mask_tcam_ofs + f3_offset + 22, 3); 2798 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyPacketRes, 2799 _bcmFieldSliceSelFpf3, 3, 2800 fp_global_mask_tcam_ofs + f3_offset + 25, 6); 2801 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyIpFrag, 2802 _bcmFieldSliceSelFpf3, 3, 2803 fp_global_mask_tcam_ofs + f3_offset + 31, 2); 2804 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyEtherType, 2805 _bcmFieldSliceSelFpf3, 3, 2806 fp_global_mask_tcam_ofs + f3_offset + 33, 16); 2807 2808 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan, 2809 _bcmFieldSliceSelFpf3, 4, 2810 fp_global_mask_tcam_ofs + f3_offset, 16); 2811 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 2812 _bcmFieldSliceSelFpf3, 4, 2813 fp_global_mask_tcam_ofs + f3_offset, 12); 2814 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi, 2815 _bcmFieldSliceSelFpf3, 4, 2816 fp_global_mask_tcam_ofs + f3_offset + 12, 1); 2817 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri, 2818 _bcmFieldSliceSelFpf3, 4, 2819 fp_global_mask_tcam_ofs + f3_offset + 13, 3); 2820 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyInnerVlan, 2821 _bcmFieldSliceSelFpf3, 4, 2822 fp_global_mask_tcam_ofs + f3_offset + 16, 16); 2823 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanId, 2824 _bcmFieldSliceSelFpf3, 4, 2825 fp_global_mask_tcam_ofs + f3_offset + 16, 12); 2826 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanCfi, 2827 _bcmFieldSliceSelFpf3, 4, 2828 fp_global_mask_tcam_ofs + f3_offset + 28, 1); 2829 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanPri, 2830 _bcmFieldSliceSelFpf3, 4, 2831 fp_global_mask_tcam_ofs + f3_offset + 29, 3); 2832 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyIntPriority, 2833 _bcmFieldSliceSelFpf3, 4, 2834 fp_global_mask_tcam_ofs + f3_offset + 32, 4); 2835 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyColor, 2836 _bcmFieldSliceSelFpf3, 4, 2837 fp_global_mask_tcam_ofs + f3_offset + 36, 2); 2838 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyDstIpLocal, 2839 _bcmFieldSliceSelFpf3, 4, 2840 fp_global_mask_tcam_ofs + f3_offset + 38, 1); 2841 2842 2843 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan, 2844 _bcmFieldSliceSelFpf3, 5, 2845 fp_global_mask_tcam_ofs + f3_offset, 16); 2846 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 2847 _bcmFieldSliceSelFpf3, 5, 2848 fp_global_mask_tcam_ofs + f3_offset, 12); 2849 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi, 2850 _bcmFieldSliceSelFpf3, 5, 2851 fp_global_mask_tcam_ofs + f3_offset + 12, 1); 2852 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri, 2853 _bcmFieldSliceSelFpf3, 5, 2854 fp_global_mask_tcam_ofs + f3_offset + 13, 3); 2855 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyEtherType, 2856 _bcmFieldSliceSelFpf3, 5, 2857 fp_global_mask_tcam_ofs + f3_offset + 16, 16); 2858 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyFibreChanOuter, 2859 _bcmFieldSliceSelFpf3, 5, 2860 fp_global_mask_tcam_ofs + f3_offset + 32, 3); 2861 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyFibreChanInner, 2862 _bcmFieldSliceSelFpf3, 5, 2863 fp_global_mask_tcam_ofs + f3_offset + 35, 3); 2864 2865 2866 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyVlanTranslationHit, 2867 _bcmFieldSliceSelFpf3, 6, 2868 fp_global_mask_tcam_ofs + f3_offset + 0, 3); 2869 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyForwardingVlanValid, 2870 _bcmFieldSliceSelFpf3, 6, 2871 fp_global_mask_tcam_ofs + f3_offset + 3, 1); 2872 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyIngressStpState, 2873 _bcmFieldSliceSelFpf3, 6, 2874 fp_global_mask_tcam_ofs + f3_offset + 4, 2); 2875 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyL2SrcHit, 2876 _bcmFieldSliceSelFpf3, 6, 2877 fp_global_mask_tcam_ofs + f3_offset + 6, 1); 2878 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyL2SrcStatic, 2879 _bcmFieldSliceSelFpf3, 6, 2880 fp_global_mask_tcam_ofs + f3_offset + 7, 1); 2881 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyL2DestHit, 2882 _bcmFieldSliceSelFpf3, 6, 2883 fp_global_mask_tcam_ofs + f3_offset + 8, 1); 2884 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyL2CacheHit, 2885 _bcmFieldSliceSelFpf3, 6, 2886 fp_global_mask_tcam_ofs + f3_offset + 9, 1); 2887 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyL3SrcHostHit, 2888 _bcmFieldSliceSelFpf3, 6, 2889 fp_global_mask_tcam_ofs + f3_offset + 10, 1); 2890 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyIpmcStarGroupHit, 2891 _bcmFieldSliceSelFpf3, 6, 2892 fp_global_mask_tcam_ofs + f3_offset + 10, 1); 2893 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyL3DestHostHit, 2894 _bcmFieldSliceSelFpf3, 6, 2895 fp_global_mask_tcam_ofs + f3_offset + 11, 1); 2896 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyL3DestRouteHit, 2897 _bcmFieldSliceSelFpf3, 6, 2898 fp_global_mask_tcam_ofs + f3_offset + 12, 1); 2899 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyL2StationMove, 2900 _bcmFieldSliceSelFpf3, 6, 2901 fp_global_mask_tcam_ofs + f3_offset + 13, 1); 2902 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyDosAttack, 2903 _bcmFieldSliceSelFpf3, 6, 2904 fp_global_mask_tcam_ofs + f3_offset + 14, 1); 2905 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyIpTunnelHit, 2906 _bcmFieldSliceSelFpf3, 6, 2907 fp_global_mask_tcam_ofs + f3_offset + 15, 1); 2908 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyMplsLabel1Hit, 2909 _bcmFieldSliceSelFpf3, 6, 2910 fp_global_mask_tcam_ofs + f3_offset + 16, 1); 2911 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyTrillEgressRbridgeHit, 2912 _bcmFieldSliceSelFpf3, 6, 2913 fp_global_mask_tcam_ofs + f3_offset + 16, 1); 2914 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyL2GreSrcIpHit, 2915 _bcmFieldSliceSelFpf3, 6, 2916 fp_global_mask_tcam_ofs + f3_offset + 16, 1); 2917 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyMimSrcGportHit, 2918 _bcmFieldSliceSelFpf3, 6, 2919 fp_global_mask_tcam_ofs + f3_offset + 16, 1); 2920 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyMplsLabel2Hit, 2921 _bcmFieldSliceSelFpf3, 6, 2922 fp_global_mask_tcam_ofs + f3_offset + 17, 1); 2923 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyTrillIngressRbridgeHit, 2924 _bcmFieldSliceSelFpf3, 6, 2925 fp_global_mask_tcam_ofs + f3_offset + 17, 1); 2926 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyL2GreVfiHit, 2927 _bcmFieldSliceSelFpf3, 6, 2928 fp_global_mask_tcam_ofs + f3_offset + 17, 1); 2929 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyMimVfiHit, 2930 _bcmFieldSliceSelFpf3, 6, 2931 fp_global_mask_tcam_ofs + f3_offset + 17, 1); 2932 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyMplsTerminated, 2933 _bcmFieldSliceSelFpf3, 6, 2934 fp_global_mask_tcam_ofs + f3_offset + 18, 1); 2935 2936 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyPacketRes, 2937 _bcmFieldSliceSelFpf3, 6, 2938 fp_global_mask_tcam_ofs + f3_offset + 20, 6); 2939 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyInnerVlan, 2940 _bcmFieldSliceSelFpf3, 6, 2941 fp_global_mask_tcam_ofs + f3_offset + 26, 16); 2942 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanId, 2943 _bcmFieldSliceSelFpf3, 6, 2944 fp_global_mask_tcam_ofs + f3_offset + 26, 12); 2945 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanCfi, 2946 _bcmFieldSliceSelFpf3, 6, 2947 fp_global_mask_tcam_ofs + f3_offset + 38, 1); 2948 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanPri, 2949 _bcmFieldSliceSelFpf3, 6, 2950 fp_global_mask_tcam_ofs + f3_offset + 39, 3); 2951 2952 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyRangeCheck, 2953 _bcmFieldSliceSelFpf3, 7, 2954 fp_global_mask_tcam_ofs + f3_offset, 24); 2955 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, _bcmFieldQualifyRangeCheckBits24_31, 2956 _bcmFieldSliceSelFpf3, 7, 2957 _bcmFieldSliceIntfClassSelect, 3, 2958 fp_global_mask_tcam_ofs + f3_offset + 24, 8); 2959 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassPort, 2960 _bcmFieldSliceSelFpf3, 7, 2961 _bcmFieldSliceIntfClassSelect, 0, 2962 fp_global_mask_tcam_ofs + f3_offset + 24, 12); 2963 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassVPort, 2964 _bcmFieldSliceSelFpf3, 7, 2965 _bcmFieldSliceIntfClassSelect, 1, 2966 fp_global_mask_tcam_ofs + f3_offset + 24, 12); 2967 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassL2, 2968 _bcmFieldSliceSelFpf3, 7, 2969 _bcmFieldSliceIntfClassSelect, 2, 2970 fp_global_mask_tcam_ofs + f3_offset + 24, 12); 2971 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassL3, 2972 _bcmFieldSliceSelFpf3, 7, 2973 _bcmFieldSliceIntfClassSelect, 4, 2974 fp_global_mask_tcam_ofs + f3_offset + 24, 12); 2975 2976 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyIp6FlowLabel, 2977 _bcmFieldSliceSelFpf3, 8, 2978 fp_global_mask_tcam_ofs + f3_offset, 20); 2979 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyVlanFormat, 2980 _bcmFieldSliceSelFpf3, 8, 2981 fp_global_mask_tcam_ofs + f3_offset + 20, 2); 2982 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyL2Format, 2983 _bcmFieldSliceSelFpf3, 8, 2984 fp_global_mask_tcam_ofs + f3_offset + 22, 2); 2985 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyTranslatedVlanFormat, 2986 _bcmFieldSliceSelFpf3, 8, 2987 fp_global_mask_tcam_ofs + f3_offset + 24, 2); 2988 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyInnerTpid, 2989 _bcmFieldSliceSelFpf3, 8, 2990 fp_global_mask_tcam_ofs + f3_offset + 26, 2); 2991 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyOuterTpid, 2992 _bcmFieldSliceSelFpf3, 8, 2993 fp_global_mask_tcam_ofs + f3_offset + 28, 2); 2994 2995 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, _bcmFieldQualifyData3, 2996 _bcmFieldSliceSelFpf3, 9, 2997 fp_global_mask_tcam_ofs + f3_offset, 32); 2998 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyGenericAssociatedChannelLabelValid, 2999 _bcmFieldSliceSelFpf3, 9, 3000 fp_global_mask_tcam_ofs + f3_offset + 32, 1); 3001 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyRouterAlertLabelValid, 3002 _bcmFieldSliceSelFpf3, 9, 3003 fp_global_mask_tcam_ofs + f3_offset + 33, 1); 3004 3005 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstPort, 3006 _bcmFieldSliceSelFpf3, 10, 3007 _bcmFieldSliceDstFwdEntitySelect, 3008 _bcmFieldFwdEntityGlp, 3009 fp_global_mask_tcam_ofs + f3_offset, 21); 3010 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstTrunk, 3011 _bcmFieldSliceSelFpf3, 10, 3012 _bcmFieldSliceDstFwdEntitySelect, 3013 _bcmFieldFwdEntityGlp, 3014 fp_global_mask_tcam_ofs + f3_offset, 21); 3015 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMplsGport, 3016 _bcmFieldSliceSelFpf3, 10, 3017 _bcmFieldSliceDstFwdEntitySelect, 3018 _bcmFieldFwdEntityMplsGport, 3019 fp_global_mask_tcam_ofs + f3_offset, 21); 3020 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMplsGports, 3021 _bcmFieldSliceSelFpf3, 10, 3022 _bcmFieldSliceDstFwdEntitySelect, 3023 _bcmFieldFwdEntityMplsGport, 3024 fp_global_mask_tcam_ofs + f3_offset, 21); 3025 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstNivGport, 3026 _bcmFieldSliceSelFpf3, 10, 3027 _bcmFieldSliceDstFwdEntitySelect, 3028 _bcmFieldFwdEntityNivGport, 3029 fp_global_mask_tcam_ofs + f3_offset, 21); 3030 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstNivGports, 3031 _bcmFieldSliceSelFpf3, 10, 3032 _bcmFieldSliceDstFwdEntitySelect, 3033 _bcmFieldFwdEntityNivGport, 3034 fp_global_mask_tcam_ofs + f3_offset, 21); 3035 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMimGport, 3036 _bcmFieldSliceSelFpf3, 10, 3037 _bcmFieldSliceDstFwdEntitySelect, 3038 _bcmFieldFwdEntityMimGport, 3039 fp_global_mask_tcam_ofs + f3_offset, 21); 3040 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMimGports, 3041 _bcmFieldSliceSelFpf3, 10, 3042 _bcmFieldSliceDstFwdEntitySelect, 3043 _bcmFieldFwdEntityMimGport, 3044 fp_global_mask_tcam_ofs + f3_offset, 21); 3045 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstVxlanGport, 3046 _bcmFieldSliceSelFpf3, 10, 3047 _bcmFieldSliceDstFwdEntitySelect, 3048 _bcmFieldFwdEntityVxlanGport, 3049 fp_global_mask_tcam_ofs + f3_offset, 21); 3050 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstVxlanGports, 3051 _bcmFieldSliceSelFpf3, 10, 3052 _bcmFieldSliceDstFwdEntitySelect, 3053 _bcmFieldFwdEntityVxlanGport, 3054 fp_global_mask_tcam_ofs + f3_offset, 21); 3055 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstVlanGport, 3056 _bcmFieldSliceSelFpf3, 10, 3057 _bcmFieldSliceDstFwdEntitySelect, 3058 _bcmFieldFwdEntityVlanGport, 3059 fp_global_mask_tcam_ofs + f3_offset, 21); 3060 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstVlanGports, 3061 _bcmFieldSliceSelFpf3, 10, 3062 _bcmFieldSliceDstFwdEntitySelect, 3063 _bcmFieldFwdEntityVlanGport, 3064 fp_global_mask_tcam_ofs + f3_offset, 21); 3065 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstGport, 3066 _bcmFieldSliceSelFpf3, 10, 3067 _bcmFieldSliceDstFwdEntitySelect, 3068 _bcmFieldFwdEntityCommonGport, 3069 fp_global_mask_tcam_ofs + f3_offset, 21); 3070 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstGports, 3071 _bcmFieldSliceSelFpf3, 10, 3072 _bcmFieldSliceDstFwdEntitySelect, 3073 _bcmFieldFwdEntityCommonGport, 3074 fp_global_mask_tcam_ofs + f3_offset, 21); 3075 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstL3Egress, 3076 _bcmFieldSliceSelFpf3, 10, 3077 _bcmFieldSliceDstFwdEntitySelect, 3078 _bcmFieldFwdEntityL3Egress, 3079 fp_global_mask_tcam_ofs + f3_offset, 21); 3080 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, 3081 bcmFieldQualifyDstL3EgressNextHops, 3082 _bcmFieldSliceSelFpf3, 10, 3083 _bcmFieldSliceDstFwdEntitySelect, 3084 _bcmFieldFwdEntityL3Egress, 3085 fp_global_mask_tcam_ofs + f3_offset, 21); 3086 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMulticastGroup, 3087 _bcmFieldSliceSelFpf3, 10, 3088 _bcmFieldSliceDstFwdEntitySelect, 3089 _bcmFieldFwdEntityMulticastGroup, 3090 fp_global_mask_tcam_ofs + f3_offset, 21); 3091 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMulticastGroups, 3092 _bcmFieldSliceSelFpf3, 10, 3093 _bcmFieldSliceDstFwdEntitySelect, 3094 _bcmFieldFwdEntityMulticastGroup, 3095 fp_global_mask_tcam_ofs + f3_offset, 21); 3096 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMultipath, 3097 _bcmFieldSliceSelFpf3, 10, 3098 _bcmFieldSliceDstFwdEntitySelect, 3099 _bcmFieldFwdEntityMultipath, 3100 fp_global_mask_tcam_ofs + f3_offset, 21); 3101 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyDstPort, 3102 _bcmFieldSliceSelFpf3, 10, 3103 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 3104 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyDstTrunk, 3105 _bcmFieldSliceSelFpf3, 10, 3106 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 3107 3108 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifySrcPort, 3109 _bcmFieldSliceSelFpf3, 11, 3110 fp_global_mask_tcam_ofs + f3_offset, 16); 3111 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifySrcTrunk, 3112 _bcmFieldSliceSelFpf3, 11, 3113 fp_global_mask_tcam_ofs + f3_offset, 16); 3114 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifySrcModPortGport, 3115 _bcmFieldSliceSelFpf3, 11, 3116 fp_global_mask_tcam_ofs + f3_offset, 15); 3117 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifySrcModPortGports, 3118 _bcmFieldSliceSelFpf3, 11, 3119 fp_global_mask_tcam_ofs + f3_offset, 15); 3120 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifySrcModuleGport, 3121 _bcmFieldSliceSelFpf3, 11, 3122 fp_global_mask_tcam_ofs + f3_offset + 7, 8); 3123 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMplsGport, 3124 _bcmFieldSliceSelFpf3, 11, 3125 _bcmFieldSliceIngressEntitySelect, 3126 _bcmFieldFwdEntityMplsGport, 3127 fp_global_mask_tcam_ofs + f3_offset + 16, 16); 3128 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMplsGports, 3129 _bcmFieldSliceSelFpf3, 11, 3130 _bcmFieldSliceIngressEntitySelect, 3131 _bcmFieldFwdEntityMplsGport, 3132 fp_global_mask_tcam_ofs + f3_offset + 16, 16); 3133 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcNivGport, 3134 _bcmFieldSliceSelFpf3, 11, 3135 _bcmFieldSliceIngressEntitySelect, 3136 _bcmFieldFwdEntityNivGport, 3137 fp_global_mask_tcam_ofs + f3_offset + 16, 16); 3138 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcNivGports, 3139 _bcmFieldSliceSelFpf3, 11, 3140 _bcmFieldSliceIngressEntitySelect, 3141 _bcmFieldFwdEntityNivGport, 3142 fp_global_mask_tcam_ofs + f3_offset + 16, 16); 3143 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMimGport, 3144 _bcmFieldSliceSelFpf3, 11, 3145 _bcmFieldSliceIngressEntitySelect, 3146 _bcmFieldFwdEntityMimGport, 3147 fp_global_mask_tcam_ofs + f3_offset + 16, 16); 3148 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMimGports, 3149 _bcmFieldSliceSelFpf3, 11, 3150 _bcmFieldSliceIngressEntitySelect, 3151 _bcmFieldFwdEntityMimGport, 3152 fp_global_mask_tcam_ofs + f3_offset + 16, 16); 3153 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVxlanGport, 3154 _bcmFieldSliceSelFpf3, 11, 3155 _bcmFieldSliceIngressEntitySelect, 3156 _bcmFieldFwdEntityVxlanGport, 3157 fp_global_mask_tcam_ofs + f3_offset + 16, 16); 3158 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVxlanGports, 3159 _bcmFieldSliceSelFpf3, 11, 3160 _bcmFieldSliceIngressEntitySelect, 3161 _bcmFieldFwdEntityVxlanGport, 3162 fp_global_mask_tcam_ofs + f3_offset + 16, 16); 3163 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVlanGport, 3164 _bcmFieldSliceSelFpf3, 11, 3165 _bcmFieldSliceIngressEntitySelect, 3166 _bcmFieldFwdEntityVlanGport, 3167 fp_global_mask_tcam_ofs + f3_offset + 16, 16); 3168 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVlanGports, 3169 _bcmFieldSliceSelFpf3, 11, 3170 _bcmFieldSliceIngressEntitySelect, 3171 _bcmFieldFwdEntityVlanGport, 3172 fp_global_mask_tcam_ofs + f3_offset + 16, 16); 3173 3174 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyColor, 3175 _bcmFieldSliceSelFpf3, 12, 3176 fp_global_mask_tcam_ofs + f3_offset + 41, 2); 3177 if (soc_feature(unit, soc_feature_fp_based_oam)) { 3178 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyOamType, 3179 _bcmFieldSliceSelFpf3, 12, 3180 fp_global_mask_tcam_ofs + f3_offset + 43, 1); 3181 } 3182 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyIntPriority, 3183 _bcmFieldSliceSelFpf3, 12, 3184 fp_global_mask_tcam_ofs + f3_offset + 37, 4); 3185 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVnTag, 3186 _bcmFieldSliceSelFpf3, 12, 3187 _bcmFieldSliceAuxTag2Select, 3188 _bcmFieldAuxTagVn, 3189 fp_global_mask_tcam_ofs + f3_offset, 33); 3190 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyCnTag, 3191 _bcmFieldSliceSelFpf3, 12, 3192 _bcmFieldSliceAuxTag2Select, 3193 _bcmFieldAuxTagCn, 3194 fp_global_mask_tcam_ofs + f3_offset, 33); 3195 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyFabricQueueTag, 3196 _bcmFieldSliceSelFpf3, 12, 3197 _bcmFieldSliceAuxTag2Select, 3198 _bcmFieldAuxTagFabricQueue, 3199 fp_global_mask_tcam_ofs + f3_offset, 33); 3200 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyMplsForwardingLabel, 3201 _bcmFieldSliceSelFpf3, 12, 3202 _bcmFieldSliceAuxTag2Select, _bcmFieldAuxTagMplsFwdingLabel, 3203 fp_global_mask_tcam_ofs + f3_offset, 33 3204 ); 3205 _FP_QUAL_PRIMARY_EXT_ADD(unit, stage_fc, bcmFieldQualifyMplsForwardingLabelTtl, 3206 _bcmFieldDevSelDisable, 0, 3207 _bcmFieldSliceSelFpf3, 12, 3208 _bcmFieldSliceAuxTag2Select, _bcmFieldAuxTagMplsFwdingLabel, 3209 0, 3210 fp_global_mask_tcam_ofs + f3_offset, 8, 3211 fp_global_mask_tcam_ofs + f3_offset + 32, 1, 3212 0, 0, 3213 0, 1 3214 ); 3215 _FP_QUAL_PRIMARY_EXT_ADD(unit, stage_fc, bcmFieldQualifyMplsForwardingLabelBos, 3216 _bcmFieldDevSelDisable, 0, 3217 _bcmFieldSliceSelFpf3, 12, 3218 _bcmFieldSliceAuxTag2Select, _bcmFieldAuxTagMplsFwdingLabel, 3219 0, 3220 fp_global_mask_tcam_ofs + f3_offset + 8, 1, 3221 fp_global_mask_tcam_ofs + f3_offset + 32, 1, 3222 0, 0, 3223 0, 1 3224 ); 3225 _FP_QUAL_PRIMARY_EXT_ADD(unit, stage_fc, bcmFieldQualifyMplsForwardingLabelExp, 3226 _bcmFieldDevSelDisable, 0, 3227 _bcmFieldSliceSelFpf3, 12, 3228 _bcmFieldSliceAuxTag2Select, _bcmFieldAuxTagMplsFwdingLabel, 3229 0, 3230 fp_global_mask_tcam_ofs + f3_offset + 9, 3, 3231 fp_global_mask_tcam_ofs + f3_offset + 32, 1, 3232 0, 0, 3233 0, 1 3234 ); 3235 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyMplsForwardingLabelId, 3236 _bcmFieldSliceSelFpf3, 12, 3237 _bcmFieldSliceAuxTag2Select, _bcmFieldAuxTagMplsFwdingLabel, 3238 fp_global_mask_tcam_ofs + f3_offset + 12, 21 3239 ); 3240 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyMplsControlWord, 3241 _bcmFieldSliceSelFpf3, 12, 3242 _bcmFieldSliceAuxTag2Select, _bcmFieldAuxTagMplsCntlWord, 3243 fp_global_mask_tcam_ofs + f3_offset, 33 3244 ); 3245 3246 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyRtag7AHashUpper, 3247 _bcmFieldSliceSelFpf3, 12, 3248 _bcmFieldSliceAuxTag2Select, 3249 _bcmFieldAuxTagRtag7A, 3250 fp_global_mask_tcam_ofs + f3_offset + 16, 17); 3251 3252 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyRtag7BHashUpper, 3253 _bcmFieldSliceSelFpf3, 12, 3254 _bcmFieldSliceAuxTag2Select, 3255 _bcmFieldAuxTagRtag7B, 3256 fp_global_mask_tcam_ofs + f3_offset + 16, 17); 3257 3258 _FP_QUAL_PRIMARY_EXT_ADD(unit, stage_fc, bcmFieldQualifyRtag7AHashLower, 3259 _bcmFieldDevSelDisable, 0, 3260 _bcmFieldSliceSelFpf3, 12, 3261 _bcmFieldSliceAuxTag2Select, _bcmFieldAuxTagRtag7A, 3262 0, 3263 fp_global_mask_tcam_ofs + f3_offset, 16, 3264 fp_global_mask_tcam_ofs + f3_offset + 32, 1, 3265 0, 0, 3266 0, 1); 3267 3268 _FP_QUAL_PRIMARY_EXT_ADD(unit, stage_fc, bcmFieldQualifyRtag7BHashLower, 3269 _bcmFieldDevSelDisable, 0, 3270 _bcmFieldSliceSelFpf3, 12, 3271 _bcmFieldSliceAuxTag2Select, _bcmFieldAuxTagRtag7B, 3272 0, 3273 fp_global_mask_tcam_ofs + f3_offset, 16, 3274 fp_global_mask_tcam_ofs + f3_offset + 32, 1, 3275 0, 0, 3276 0, 1); 3277 3278 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVxlanNetworkId, 3279 _bcmFieldSliceSelFpf3, 12, 3280 _bcmFieldSliceAuxTag2Select, 3281 _bcmFieldAuxTagVxlanOrLLTag, 3282 fp_global_mask_tcam_ofs + f3_offset, 24); 3283 3284 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVxlanFlags, 3285 _bcmFieldSliceSelFpf3, 12, 3286 _bcmFieldSliceAuxTag2Select, 3287 _bcmFieldAuxTagVxlanOrLLTag, 3288 fp_global_mask_tcam_ofs + f3_offset + 24, 8); 3289 3290 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVxlanHeaderBits8_31, 3291 _bcmFieldSliceSelFpf3, 12, 3292 _bcmFieldSliceAuxTag2Select, 3293 _bcmFieldAuxTagVxlanReserved, 3294 fp_global_mask_tcam_ofs + f3_offset, 24); 3295 3296 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVxlanHeaderBits56_63, 3297 _bcmFieldSliceSelFpf3, 12, 3298 _bcmFieldSliceAuxTag2Select, 3299 _bcmFieldAuxTagVxlanReserved, 3300 fp_global_mask_tcam_ofs + f3_offset + 24, 8); 3301 3302 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyMplsForwardingLabelAction, 3303 _bcmFieldSliceSelFpf3, 12, 3304 fp_global_mask_tcam_ofs + f3_offset + 33, 3 3305 ); 3306 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTos, 3307 _bcmFieldSliceSelFpf3, 13, 3308 _bcmFieldSliceTosClassSelect, 0, 3309 fp_global_mask_tcam_ofs + f3_offset, 8); 3310 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTosClassZero, 3311 _bcmFieldSliceSelFpf3, 13, 3312 _bcmFieldSliceTosClassSelect, 0, 3313 fp_global_mask_tcam_ofs + f3_offset, 8); 3314 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTosClassOne, 3315 _bcmFieldSliceSelFpf3, 13, 3316 _bcmFieldSliceTosClassSelect, 1, 3317 fp_global_mask_tcam_ofs + f3_offset, 8); 3318 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyExtensionHeader2Type, 3319 _bcmFieldSliceSelFpf3, 13, 3320 fp_global_mask_tcam_ofs + f3_offset + 8, 8); 3321 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyExtensionHeaderSubCode, 3322 _bcmFieldSliceSelFpf3, 13, 3323 fp_global_mask_tcam_ofs + f3_offset + 16, 8); 3324 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyExtensionHeaderType, 3325 _bcmFieldSliceSelFpf3, 13, 3326 fp_global_mask_tcam_ofs + f3_offset + 24, 8); 3327 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyDstIpLocal, 3328 _bcmFieldSliceSelFpf3, 13, 3329 fp_global_mask_tcam_ofs + f3_offset + 32, 1 3330 ); 3331 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyIpAddrsNormalized, 3332 _bcmFieldSliceSelFpf3, 13, 3333 fp_global_mask_tcam_ofs + f3_offset + 33, 1 3334 ); 3335 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyMacAddrsNormalized, 3336 _bcmFieldSliceSelFpf3, 13, 3337 fp_global_mask_tcam_ofs + f3_offset + 34, 1 3338 ); 3339 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyL3Ingress, 3340 _bcmFieldSliceSelFpf3, 13, 3341 fp_global_mask_tcam_ofs + f3_offset + 35, 14 3342 ); 3343 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyMacAddrsNormalized, 3344 _bcmFieldSliceSelFpf3, 14, 3345 fp_global_mask_tcam_ofs + f3_offset + 48, 1 3346 ); 3347 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyDstMac, 3348 _bcmFieldSliceSelFpf3, 14, 3349 fp_global_mask_tcam_ofs + f3_offset, 48 3350 ); 3351 3352 3353 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstPort, 3354 _bcmFieldSliceSelFpf3, 15, 3355 _bcmFieldSliceDstFwdEntitySelect, 3356 _bcmFieldFwdEntityGlp, 3357 fp_global_mask_tcam_ofs + f3_offset, 21); 3358 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstTrunk, 3359 _bcmFieldSliceSelFpf3, 15, 3360 _bcmFieldSliceDstFwdEntitySelect, 3361 _bcmFieldFwdEntityGlp, 3362 fp_global_mask_tcam_ofs + f3_offset, 21); 3363 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMplsGport, 3364 _bcmFieldSliceSelFpf3, 15, 3365 _bcmFieldSliceDstFwdEntitySelect, 3366 _bcmFieldFwdEntityMplsGport, 3367 fp_global_mask_tcam_ofs + f3_offset, 21); 3368 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMplsGports, 3369 _bcmFieldSliceSelFpf3, 15, 3370 _bcmFieldSliceDstFwdEntitySelect, 3371 _bcmFieldFwdEntityMplsGport, 3372 fp_global_mask_tcam_ofs + f3_offset, 21); 3373 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstNivGport, 3374 _bcmFieldSliceSelFpf3, 15, 3375 _bcmFieldSliceDstFwdEntitySelect, 3376 _bcmFieldFwdEntityNivGport, 3377 fp_global_mask_tcam_ofs + f3_offset, 21); 3378 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstNivGports, 3379 _bcmFieldSliceSelFpf3, 15, 3380 _bcmFieldSliceDstFwdEntitySelect, 3381 _bcmFieldFwdEntityNivGport, 3382 fp_global_mask_tcam_ofs + f3_offset, 21); 3383 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMimGport, 3384 _bcmFieldSliceSelFpf3, 15, 3385 _bcmFieldSliceDstFwdEntitySelect, 3386 _bcmFieldFwdEntityMimGport, 3387 fp_global_mask_tcam_ofs + f3_offset, 21); 3388 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMimGports, 3389 _bcmFieldSliceSelFpf3, 15, 3390 _bcmFieldSliceDstFwdEntitySelect, 3391 _bcmFieldFwdEntityMimGport, 3392 fp_global_mask_tcam_ofs + f3_offset, 21); 3393 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstVxlanGport, 3394 _bcmFieldSliceSelFpf3, 15, 3395 _bcmFieldSliceDstFwdEntitySelect, 3396 _bcmFieldFwdEntityVxlanGport, 3397 fp_global_mask_tcam_ofs + f3_offset, 21); 3398 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstVxlanGports, 3399 _bcmFieldSliceSelFpf3, 15, 3400 _bcmFieldSliceDstFwdEntitySelect, 3401 _bcmFieldFwdEntityVxlanGport, 3402 fp_global_mask_tcam_ofs + f3_offset, 21); 3403 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstVlanGport, 3404 _bcmFieldSliceSelFpf3, 15, 3405 _bcmFieldSliceDstFwdEntitySelect, 3406 _bcmFieldFwdEntityVlanGport, 3407 fp_global_mask_tcam_ofs + f3_offset, 21); 3408 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstVlanGports, 3409 _bcmFieldSliceSelFpf3, 15, 3410 _bcmFieldSliceDstFwdEntitySelect, 3411 _bcmFieldFwdEntityVlanGport, 3412 fp_global_mask_tcam_ofs + f3_offset, 21); 3413 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstGport, 3414 _bcmFieldSliceSelFpf3, 15, 3415 _bcmFieldSliceDstFwdEntitySelect, 3416 _bcmFieldFwdEntityCommonGport, 3417 fp_global_mask_tcam_ofs + f3_offset, 21); 3418 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstGports, 3419 _bcmFieldSliceSelFpf3, 15, 3420 _bcmFieldSliceDstFwdEntitySelect, 3421 _bcmFieldFwdEntityCommonGport, 3422 fp_global_mask_tcam_ofs + f3_offset, 21); 3423 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstL3Egress, 3424 _bcmFieldSliceSelFpf3, 15, 3425 _bcmFieldSliceDstFwdEntitySelect, 3426 _bcmFieldFwdEntityL3Egress, 3427 fp_global_mask_tcam_ofs + f3_offset, 21); 3428 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstL3EgressNextHops, 3429 _bcmFieldSliceSelFpf3, 15, 3430 _bcmFieldSliceDstFwdEntitySelect, 3431 _bcmFieldFwdEntityL3Egress, 3432 fp_global_mask_tcam_ofs + f3_offset, 21); 3433 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMulticastGroup, 3434 _bcmFieldSliceSelFpf3, 15, 3435 _bcmFieldSliceDstFwdEntitySelect, 3436 _bcmFieldFwdEntityMulticastGroup, 3437 fp_global_mask_tcam_ofs + f3_offset, 21); 3438 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMulticastGroups, 3439 _bcmFieldSliceSelFpf3, 15, 3440 _bcmFieldSliceDstFwdEntitySelect, 3441 _bcmFieldFwdEntityMulticastGroup, 3442 fp_global_mask_tcam_ofs + f3_offset, 21); 3443 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMultipath, 3444 _bcmFieldSliceSelFpf3, 15, 3445 _bcmFieldSliceDstFwdEntitySelect, 3446 _bcmFieldFwdEntityMultipath, 3447 fp_global_mask_tcam_ofs + f3_offset, 21); 3448 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcPort, 3449 _bcmFieldSliceSelFpf3, 15, 3450 _bcmFieldSliceIngressEntitySelect, 3451 _bcmFieldFwdEntityGlp, 3452 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 3453 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcTrunk, 3454 _bcmFieldSliceSelFpf3, 15, 3455 _bcmFieldSliceIngressEntitySelect, 3456 _bcmFieldFwdEntityGlp, 3457 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 3458 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMplsGport, 3459 _bcmFieldSliceSelFpf3, 15, 3460 _bcmFieldSliceIngressEntitySelect, 3461 _bcmFieldFwdEntityMplsGport, 3462 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 3463 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMplsGports, 3464 _bcmFieldSliceSelFpf3, 15, 3465 _bcmFieldSliceIngressEntitySelect, 3466 _bcmFieldFwdEntityMplsGport, 3467 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 3468 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcNivGport, 3469 _bcmFieldSliceSelFpf3, 15, 3470 _bcmFieldSliceIngressEntitySelect, 3471 _bcmFieldFwdEntityNivGport, 3472 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 3473 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcNivGports, 3474 _bcmFieldSliceSelFpf3, 15, 3475 _bcmFieldSliceIngressEntitySelect, 3476 _bcmFieldFwdEntityNivGport, 3477 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 3478 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMimGport, 3479 _bcmFieldSliceSelFpf3, 15, 3480 _bcmFieldSliceIngressEntitySelect, 3481 _bcmFieldFwdEntityMimGport, 3482 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 3483 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMimGports, 3484 _bcmFieldSliceSelFpf3, 15, 3485 _bcmFieldSliceIngressEntitySelect, 3486 _bcmFieldFwdEntityMimGport, 3487 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 3488 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVxlanGport, 3489 _bcmFieldSliceSelFpf3, 15, 3490 _bcmFieldSliceIngressEntitySelect, 3491 _bcmFieldFwdEntityVxlanGport, 3492 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 3493 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVxlanGports, 3494 _bcmFieldSliceSelFpf3, 15, 3495 _bcmFieldSliceIngressEntitySelect, 3496 _bcmFieldFwdEntityVxlanGport, 3497 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 3498 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVlanGport, 3499 _bcmFieldSliceSelFpf3, 15, 3500 _bcmFieldSliceIngressEntitySelect, 3501 _bcmFieldFwdEntityVlanGport, 3502 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 3503 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVlanGports, 3504 _bcmFieldSliceSelFpf3, 15, 3505 _bcmFieldSliceIngressEntitySelect, 3506 _bcmFieldFwdEntityVlanGport, 3507 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 3508 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcModPortGport, 3509 _bcmFieldSliceSelFpf3, 15, 3510 _bcmFieldSliceIngressEntitySelect, 3511 _bcmFieldFwdEntityModPortGport, 3512 fp_global_mask_tcam_ofs + f3_offset + 21, 15); 3513 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcModPortGports, 3514 _bcmFieldSliceSelFpf3, 15, 3515 _bcmFieldSliceIngressEntitySelect, 3516 _bcmFieldFwdEntityModPortGport, 3517 fp_global_mask_tcam_ofs + f3_offset + 21, 15); 3518 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcGport, 3519 _bcmFieldSliceSelFpf3, 15, 3520 _bcmFieldSliceIngressEntitySelect, 3521 _bcmFieldFwdEntityCommonGport, 3522 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 3523 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcGports, 3524 _bcmFieldSliceSelFpf3, 15, 3525 _bcmFieldSliceIngressEntitySelect, 3526 _bcmFieldFwdEntityCommonGport, 3527 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 3528 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcModuleGport, 3529 _bcmFieldSliceSelFpf3, 15, 3530 _bcmFieldSliceIngressEntitySelect, 3531 _bcmFieldFwdEntityModPortGport, 3532 fp_global_mask_tcam_ofs + f3_offset + 28, 8); 3533 _FP_QUAL_PRIMARY_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTrunkMemberSourceModuleId, 3534 _bcmFieldSliceSelFpf3, 15, 3535 _bcmFieldSliceIngressEntitySelect, 3536 _bcmFieldFwdEntityModPortGport, 3537 fp_global_mask_tcam_ofs + f3_offset + 28, 8); 3538 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 3539 _bcmFieldSliceSelFpf3, 15, 3540 fp_global_mask_tcam_ofs + f3_offset + 37, 12); 3541 3542 3543 3544 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyFcoeVersionIsZero, 3545 _bcmFieldSliceSelFpf3, 16, 3546 fp_global_mask_tcam_ofs + f3_offset, 1); 3547 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyFcoeSOF, 3548 _bcmFieldSliceSelFpf3, 16, 3549 fp_global_mask_tcam_ofs + f3_offset + 1, 8); 3550 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyFibreChanRCtl, 3551 _bcmFieldSliceSelFpf3, 16, 3552 fp_global_mask_tcam_ofs + f3_offset + 15, 8); 3553 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyFibreChanVFTVersion, 3554 _bcmFieldSliceSelFpf3, 16, 3555 fp_global_mask_tcam_ofs + f3_offset + 23, 2); 3556 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyFibreChanVFTHopCount, 3557 _bcmFieldSliceSelFpf3, 16, 3558 fp_global_mask_tcam_ofs + f3_offset + 25, 5); 3559 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyFibreChanVFTVsanId, 3560 _bcmFieldSliceSelFpf3, 16, 3561 fp_global_mask_tcam_ofs + f3_offset + 30, 12); 3562 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyFibreChanVFTVsanPri, 3563 _bcmFieldSliceSelFpf3, 16, 3564 fp_global_mask_tcam_ofs + f3_offset + 42, 3); 3565 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyFibreChanSrcFpmaCheck, 3566 _bcmFieldSliceSelFpf3, 16, 3567 fp_global_mask_tcam_ofs + f3_offset + 45, 1); 3568 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyFibreChanSrcBindCheck, 3569 _bcmFieldSliceSelFpf3, 16, 3570 fp_global_mask_tcam_ofs + f3_offset + 46, 1); 3571 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyFibreChanZoneCheck, 3572 _bcmFieldSliceSelFpf3, 16, 3573 fp_global_mask_tcam_ofs + f3_offset + 47, 2); 3574 } else { 3575 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL2, 3576 _bcmFieldSliceSelFpf3, 0, 3577 _bcmFieldSliceDstClassSelect, 0, 3578 fp_global_mask_tcam_ofs + f3_offset, 10); 3579 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL3, 3580 _bcmFieldSliceSelFpf3, 0, 3581 _bcmFieldSliceDstClassSelect, 1, 3582 fp_global_mask_tcam_ofs + f3_offset, 10); 3583 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 3584 bcmFieldQualifyDstClassField, 3585 _bcmFieldSliceSelFpf3, 0, 3586 _bcmFieldSliceDstClassSelect, 2, 3587 fp_global_mask_tcam_ofs + f3_offset, 10); 3588 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 3589 bcmFieldQualifySrcClassField, 3590 _bcmFieldSliceSelFpf3, 0, 3591 _bcmFieldSliceDstClassSelect, 3, 3592 fp_global_mask_tcam_ofs + f3_offset, 10); 3593 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL2, 3594 _bcmFieldSliceSelFpf3, 0, 3595 _bcmFieldSliceSrcClassSelect, 0, 3596 fp_global_mask_tcam_ofs + f3_offset + 10, 10); 3597 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL3, 3598 _bcmFieldSliceSelFpf3, 0, 3599 _bcmFieldSliceSrcClassSelect, 1, 3600 fp_global_mask_tcam_ofs + f3_offset + 10, 10); 3601 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 3602 bcmFieldQualifyDstClassField, 3603 _bcmFieldSliceSelFpf3, 0, 3604 _bcmFieldSliceSrcClassSelect, 2, 3605 fp_global_mask_tcam_ofs + f3_offset + 10, 10); 3606 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 3607 bcmFieldQualifySrcClassField, 3608 _bcmFieldSliceSelFpf3, 0, 3609 _bcmFieldSliceSrcClassSelect, 3, 3610 fp_global_mask_tcam_ofs + f3_offset + 10, 10); 3611 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVrf, 3612 _bcmFieldSliceSelFpf3, 0, 3613 _bcmFieldSliceFwdFieldSelect, 3614 _bcmFieldFwdFieldVrf, 3615 fp_global_mask_tcam_ofs + f3_offset + 20, 13); 3616 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVpn, 3617 _bcmFieldSliceSelFpf3, 0, 3618 _bcmFieldSliceFwdFieldSelect, 3619 _bcmFieldFwdFieldVpn, 3620 fp_global_mask_tcam_ofs + f3_offset + 20, 13); 3621 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 3622 bcmFieldQualifyForwardingVlanId, 3623 _bcmFieldSliceSelFpf3, 0, 3624 _bcmFieldSliceFwdFieldSelect, 3625 _bcmFieldFwdFieldVlan, 3626 fp_global_mask_tcam_ofs + f3_offset + 20, 13); 3627 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 3628 bcmFieldQualifySrcMplsGport, 3629 _bcmFieldSliceSelFpf3, 0, 3630 _bcmFieldSliceIngressEntitySelect, 3631 _bcmFieldFwdEntityMplsGport, 3632 fp_global_mask_tcam_ofs + f3_offset + 33, 16); 3633 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 3634 bcmFieldQualifySrcMplsGports, 3635 _bcmFieldSliceSelFpf3, 0, 3636 _bcmFieldSliceIngressEntitySelect, 3637 _bcmFieldFwdEntityMplsGport, 3638 fp_global_mask_tcam_ofs + f3_offset + 33, 16); 3639 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 3640 bcmFieldQualifySrcNivGport, 3641 _bcmFieldSliceSelFpf3, 0, 3642 _bcmFieldSliceIngressEntitySelect, 3643 _bcmFieldFwdEntityNivGport, 3644 fp_global_mask_tcam_ofs + f3_offset + 33, 16); 3645 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 3646 bcmFieldQualifySrcNivGports, 3647 _bcmFieldSliceSelFpf3, 0, 3648 _bcmFieldSliceIngressEntitySelect, 3649 _bcmFieldFwdEntityNivGport, 3650 fp_global_mask_tcam_ofs + f3_offset + 33, 16); 3651 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMimGport, 3652 _bcmFieldSliceSelFpf3, 0, 3653 _bcmFieldSliceIngressEntitySelect, 3654 _bcmFieldFwdEntityMimGport, 3655 fp_global_mask_tcam_ofs + f3_offset + 33, 16); 3656 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMimGports, 3657 _bcmFieldSliceSelFpf3, 0, 3658 _bcmFieldSliceIngressEntitySelect, 3659 _bcmFieldFwdEntityMimGport, 3660 fp_global_mask_tcam_ofs + f3_offset + 33, 16); 3661 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVxlanGport, 3662 _bcmFieldSliceSelFpf3, 0, 3663 _bcmFieldSliceIngressEntitySelect, 3664 _bcmFieldFwdEntityVxlanGport, 3665 fp_global_mask_tcam_ofs + f3_offset + 33, 16); 3666 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVxlanGports, 3667 _bcmFieldSliceSelFpf3, 0, 3668 _bcmFieldSliceIngressEntitySelect, 3669 _bcmFieldFwdEntityVxlanGport, 3670 fp_global_mask_tcam_ofs + f3_offset + 33, 16); 3671 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVlanGport, 3672 _bcmFieldSliceSelFpf3, 0, 3673 _bcmFieldSliceIngressEntitySelect, 3674 _bcmFieldFwdEntityVlanGport, 3675 fp_global_mask_tcam_ofs + f3_offset + 33, 16); 3676 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVlanGports, 3677 _bcmFieldSliceSelFpf3, 0, 3678 _bcmFieldSliceIngressEntitySelect, 3679 _bcmFieldFwdEntityVlanGport, 3680 fp_global_mask_tcam_ofs + f3_offset + 33, 16); 3681 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL2, 3682 _bcmFieldSliceSelFpf3, 1, 3683 _bcmFieldSliceSrcClassSelect, 0, 3684 fp_global_mask_tcam_ofs + f3_offset, 10); 3685 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL3, 3686 _bcmFieldSliceSelFpf3, 1, 3687 _bcmFieldSliceSrcClassSelect, 1, 3688 fp_global_mask_tcam_ofs + f3_offset, 10); 3689 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 3690 bcmFieldQualifyDstClassField, 3691 _bcmFieldSliceSelFpf3, 1, 3692 _bcmFieldSliceSrcClassSelect, 2, 3693 fp_global_mask_tcam_ofs + f3_offset, 10); 3694 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 3695 bcmFieldQualifySrcClassField, 3696 _bcmFieldSliceSelFpf3, 1, 3697 _bcmFieldSliceSrcClassSelect, 3, 3698 fp_global_mask_tcam_ofs + f3_offset, 10); 3699 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVrf, 3700 _bcmFieldSliceSelFpf3, 1, 3701 _bcmFieldSliceFwdFieldSelect, 3702 _bcmFieldFwdFieldVrf, 3703 fp_global_mask_tcam_ofs + f3_offset + 10, 13); 3704 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVpn, 3705 _bcmFieldSliceSelFpf3, 1, 3706 _bcmFieldSliceFwdFieldSelect, 3707 _bcmFieldFwdFieldVpn, 3708 fp_global_mask_tcam_ofs + f3_offset + 10, 13); 3709 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 3710 bcmFieldQualifyForwardingVlanId, 3711 _bcmFieldSliceSelFpf3, 1, 3712 _bcmFieldSliceFwdFieldSelect, 3713 _bcmFieldFwdFieldVlan, 3714 fp_global_mask_tcam_ofs + f3_offset + 10, 13); 3715 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 3716 _bcmFieldSliceSelFpf3, 1, 3717 fp_global_mask_tcam_ofs + f3_offset + 23, 12); 3718 3719 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL2, 3720 _bcmFieldSliceSelFpf3, 1, 3721 _bcmFieldSliceDstClassSelect, 0, 3722 fp_global_mask_tcam_ofs + f3_offset + 35, 10); 3723 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL3, 3724 _bcmFieldSliceSelFpf3, 1, 3725 _bcmFieldSliceDstClassSelect, 1, 3726 fp_global_mask_tcam_ofs + f3_offset + 35, 10); 3727 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 3728 bcmFieldQualifyDstClassField, 3729 _bcmFieldSliceSelFpf3, 1, 3730 _bcmFieldSliceDstClassSelect, 2, 3731 fp_global_mask_tcam_ofs + f3_offset + 35, 10); 3732 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 3733 bcmFieldQualifySrcClassField, 3734 _bcmFieldSliceSelFpf3, 1, 3735 _bcmFieldSliceDstClassSelect, 3, 3736 fp_global_mask_tcam_ofs + f3_offset + 35, 10); 3737 #if 0 3738 /* TOS_FN_LOW */ 3739 #endif 3740 3741 3742 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstPort, 3743 _bcmFieldSliceSelFpf3, 2, 3744 _bcmFieldSliceDstFwdEntitySelect, 3745 _bcmFieldFwdEntityGlp, 3746 fp_global_mask_tcam_ofs + f3_offset, 21); 3747 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstTrunk, 3748 _bcmFieldSliceSelFpf3, 2, 3749 _bcmFieldSliceDstFwdEntitySelect, 3750 _bcmFieldFwdEntityGlp, 3751 fp_global_mask_tcam_ofs + f3_offset, 21); 3752 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 3753 bcmFieldQualifyDstMplsGport, 3754 _bcmFieldSliceSelFpf3, 2, 3755 _bcmFieldSliceDstFwdEntitySelect, 3756 _bcmFieldFwdEntityMplsGport, 3757 fp_global_mask_tcam_ofs + f3_offset, 21); 3758 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 3759 bcmFieldQualifyDstMplsGports, 3760 _bcmFieldSliceSelFpf3, 2, 3761 _bcmFieldSliceDstFwdEntitySelect, 3762 _bcmFieldFwdEntityMplsGport, 3763 fp_global_mask_tcam_ofs + f3_offset, 21); 3764 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 3765 bcmFieldQualifyDstNivGport, 3766 _bcmFieldSliceSelFpf3, 2, 3767 _bcmFieldSliceDstFwdEntitySelect, 3768 _bcmFieldFwdEntityNivGport, 3769 fp_global_mask_tcam_ofs + f3_offset, 21); 3770 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 3771 bcmFieldQualifyDstNivGports, 3772 _bcmFieldSliceSelFpf3, 2, 3773 _bcmFieldSliceDstFwdEntitySelect, 3774 _bcmFieldFwdEntityNivGport, 3775 fp_global_mask_tcam_ofs + f3_offset, 21); 3776 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 3777 bcmFieldQualifyDstMimGport, 3778 _bcmFieldSliceSelFpf3, 2, 3779 _bcmFieldSliceDstFwdEntitySelect, 3780 _bcmFieldFwdEntityMimGport, 3781 fp_global_mask_tcam_ofs + f3_offset, 21); 3782 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 3783 bcmFieldQualifyDstMimGports, 3784 _bcmFieldSliceSelFpf3, 2, 3785 _bcmFieldSliceDstFwdEntitySelect, 3786 _bcmFieldFwdEntityMimGport, 3787 fp_global_mask_tcam_ofs + f3_offset, 21); 3788 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 3789 bcmFieldQualifyDstVxlanGport, 3790 _bcmFieldSliceSelFpf3, 2, 3791 _bcmFieldSliceDstFwdEntitySelect, 3792 _bcmFieldFwdEntityVxlanGport, 3793 fp_global_mask_tcam_ofs + f3_offset, 21); 3794 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 3795 bcmFieldQualifyDstVxlanGports, 3796 _bcmFieldSliceSelFpf3, 2, 3797 _bcmFieldSliceDstFwdEntitySelect, 3798 _bcmFieldFwdEntityVxlanGport, 3799 fp_global_mask_tcam_ofs + f3_offset, 21); 3800 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 3801 bcmFieldQualifyDstVlanGport, 3802 _bcmFieldSliceSelFpf3, 2, 3803 _bcmFieldSliceDstFwdEntitySelect, 3804 _bcmFieldFwdEntityVlanGport, 3805 fp_global_mask_tcam_ofs + f3_offset, 21); 3806 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 3807 bcmFieldQualifyDstVlanGports, 3808 _bcmFieldSliceSelFpf3, 2, 3809 _bcmFieldSliceDstFwdEntitySelect, 3810 _bcmFieldFwdEntityVlanGport, 3811 fp_global_mask_tcam_ofs + f3_offset, 21); 3812 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstGport, 3813 _bcmFieldSliceSelFpf3, 2, 3814 _bcmFieldSliceDstFwdEntitySelect, 3815 _bcmFieldFwdEntityCommonGport, 3816 fp_global_mask_tcam_ofs + f3_offset, 21); 3817 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstGports, 3818 _bcmFieldSliceSelFpf3, 2, 3819 _bcmFieldSliceDstFwdEntitySelect, 3820 _bcmFieldFwdEntityCommonGport, 3821 fp_global_mask_tcam_ofs + f3_offset, 21); 3822 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 3823 bcmFieldQualifyDstL3Egress, 3824 _bcmFieldSliceSelFpf3, 2, 3825 _bcmFieldSliceDstFwdEntitySelect, 3826 _bcmFieldFwdEntityL3Egress, 3827 fp_global_mask_tcam_ofs + f3_offset, 21); 3828 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 3829 bcmFieldQualifyDstL3EgressNextHops, 3830 _bcmFieldSliceSelFpf3, 2, 3831 _bcmFieldSliceDstFwdEntitySelect, 3832 _bcmFieldFwdEntityL3Egress, 3833 fp_global_mask_tcam_ofs + f3_offset, 21); 3834 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 3835 bcmFieldQualifyDstMulticastGroup, 3836 _bcmFieldSliceSelFpf3, 2, 3837 _bcmFieldSliceDstFwdEntitySelect, 3838 _bcmFieldFwdEntityMulticastGroup, 3839 fp_global_mask_tcam_ofs + f3_offset, 21); 3840 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 3841 bcmFieldQualifyDstMulticastGroups, 3842 _bcmFieldSliceSelFpf3, 2, 3843 _bcmFieldSliceDstFwdEntitySelect, 3844 _bcmFieldFwdEntityMulticastGroup, 3845 fp_global_mask_tcam_ofs + f3_offset, 21); 3846 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 3847 bcmFieldQualifyDstMultipath, 3848 _bcmFieldSliceSelFpf3, 2, 3849 _bcmFieldSliceDstFwdEntitySelect, 3850 _bcmFieldFwdEntityMultipath, 3851 fp_global_mask_tcam_ofs + f3_offset, 21); 3852 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcPort, 3853 _bcmFieldSliceSelFpf3, 2, 3854 _bcmFieldSliceIngressEntitySelect, 3855 _bcmFieldFwdEntityGlp, 3856 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 3857 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcTrunk, 3858 _bcmFieldSliceSelFpf3, 2, 3859 _bcmFieldSliceIngressEntitySelect, 3860 _bcmFieldFwdEntityGlp, 3861 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 3862 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 3863 bcmFieldQualifySrcMplsGport, 3864 _bcmFieldSliceSelFpf3, 2, 3865 _bcmFieldSliceIngressEntitySelect, 3866 _bcmFieldFwdEntityMplsGport, 3867 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 3868 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 3869 bcmFieldQualifySrcMplsGports, 3870 _bcmFieldSliceSelFpf3, 2, 3871 _bcmFieldSliceIngressEntitySelect, 3872 _bcmFieldFwdEntityMplsGport, 3873 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 3874 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 3875 bcmFieldQualifySrcNivGport, 3876 _bcmFieldSliceSelFpf3, 2, 3877 _bcmFieldSliceIngressEntitySelect, 3878 _bcmFieldFwdEntityNivGport, 3879 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 3880 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 3881 bcmFieldQualifySrcNivGports, 3882 _bcmFieldSliceSelFpf3, 2, 3883 _bcmFieldSliceIngressEntitySelect, 3884 _bcmFieldFwdEntityNivGport, 3885 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 3886 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMimGport, 3887 _bcmFieldSliceSelFpf3, 2, 3888 _bcmFieldSliceIngressEntitySelect, 3889 _bcmFieldFwdEntityMimGport, 3890 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 3891 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMimGports, 3892 _bcmFieldSliceSelFpf3, 2, 3893 _bcmFieldSliceIngressEntitySelect, 3894 _bcmFieldFwdEntityMimGport, 3895 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 3896 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVxlanGport, 3897 _bcmFieldSliceSelFpf3, 2, 3898 _bcmFieldSliceIngressEntitySelect, 3899 _bcmFieldFwdEntityVxlanGport, 3900 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 3901 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVxlanGports, 3902 _bcmFieldSliceSelFpf3, 2, 3903 _bcmFieldSliceIngressEntitySelect, 3904 _bcmFieldFwdEntityVxlanGport, 3905 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 3906 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVlanGport, 3907 _bcmFieldSliceSelFpf3, 2, 3908 _bcmFieldSliceIngressEntitySelect, 3909 _bcmFieldFwdEntityVlanGport, 3910 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 3911 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVlanGports, 3912 _bcmFieldSliceSelFpf3, 2, 3913 _bcmFieldSliceIngressEntitySelect, 3914 _bcmFieldFwdEntityVlanGport, 3915 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 3916 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcModPortGport, 3917 _bcmFieldSliceSelFpf3, 2, 3918 _bcmFieldSliceIngressEntitySelect, 3919 _bcmFieldFwdEntityModPortGport, 3920 fp_global_mask_tcam_ofs + f3_offset + 21, 15); 3921 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcModPortGports, 3922 _bcmFieldSliceSelFpf3, 2, 3923 _bcmFieldSliceIngressEntitySelect, 3924 _bcmFieldFwdEntityModPortGport, 3925 fp_global_mask_tcam_ofs + f3_offset + 21, 15); 3926 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcTrunkMemberGport, 3927 _bcmFieldSliceSelFpf3, 2, 3928 _bcmFieldSliceIngressEntitySelect, 3929 _bcmFieldFwdEntityModPortGport, 3930 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 3931 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcModuleGport, 3932 _bcmFieldSliceSelFpf3, 2, 3933 _bcmFieldSliceIngressEntitySelect, 3934 _bcmFieldFwdEntityModPortGport, 3935 fp_global_mask_tcam_ofs + f3_offset + 28, 8); 3936 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcGport, 3937 _bcmFieldSliceSelFpf3, 2, 3938 _bcmFieldSliceIngressEntitySelect, 3939 _bcmFieldFwdEntityCommonGport, 3940 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 3941 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcGports, 3942 _bcmFieldSliceSelFpf3, 2, 3943 _bcmFieldSliceIngressEntitySelect, 3944 _bcmFieldFwdEntityCommonGport, 3945 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 3946 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTrunkMemberSourceModuleId, 3947 _bcmFieldSliceSelFpf3, 2, 3948 _bcmFieldSliceIngressEntitySelect, 3949 _bcmFieldFwdEntityModPortGport, 3950 fp_global_mask_tcam_ofs + f3_offset + 28, 8); 3951 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMHOpcode, 3952 _bcmFieldSliceSelFpf3, 2, 3953 fp_global_mask_tcam_ofs + f3_offset + 37, 3); 3954 3955 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan, 3956 _bcmFieldSliceSelFpf3, 3, 3957 fp_global_mask_tcam_ofs + f3_offset, 16); 3958 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 3959 _bcmFieldSliceSelFpf3, 3, 3960 fp_global_mask_tcam_ofs + f3_offset, 12); 3961 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi, 3962 _bcmFieldSliceSelFpf3, 3, 3963 fp_global_mask_tcam_ofs + f3_offset + 12, 1); 3964 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri, 3965 _bcmFieldSliceSelFpf3, 3, 3966 fp_global_mask_tcam_ofs + f3_offset + 13, 3); 3967 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVlanFormat, 3968 _bcmFieldSliceSelFpf3, 3, 3969 fp_global_mask_tcam_ofs + f3_offset + 16, 2); 3970 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2Format, 3971 _bcmFieldSliceSelFpf3, 3, 3972 fp_global_mask_tcam_ofs + f3_offset + 18, 2); 3973 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTranslatedVlanFormat, 3974 _bcmFieldSliceSelFpf3, 3, 3975 fp_global_mask_tcam_ofs + f3_offset + 20, 2); 3976 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMHOpcode, 3977 _bcmFieldSliceSelFpf3, 3, 3978 fp_global_mask_tcam_ofs + f3_offset + 22, 3); 3979 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyPacketRes, 3980 _bcmFieldSliceSelFpf3, 3, 3981 fp_global_mask_tcam_ofs + f3_offset + 25, 6); 3982 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpFrag, 3983 _bcmFieldSliceSelFpf3, 3, 3984 fp_global_mask_tcam_ofs + f3_offset + 31, 2); 3985 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyEtherType, 3986 _bcmFieldSliceSelFpf3, 3, 3987 fp_global_mask_tcam_ofs + f3_offset + 33, 16); 3988 3989 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan, 3990 _bcmFieldSliceSelFpf3, 4, 3991 fp_global_mask_tcam_ofs + f3_offset, 16); 3992 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 3993 _bcmFieldSliceSelFpf3, 4, 3994 fp_global_mask_tcam_ofs + f3_offset, 12); 3995 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi, 3996 _bcmFieldSliceSelFpf3, 4, 3997 fp_global_mask_tcam_ofs + f3_offset + 12, 1); 3998 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri, 3999 _bcmFieldSliceSelFpf3, 4, 4000 fp_global_mask_tcam_ofs + f3_offset + 13, 3); 4001 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlan, 4002 _bcmFieldSliceSelFpf3, 4, 4003 fp_global_mask_tcam_ofs + f3_offset + 16, 16); 4004 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanId, 4005 _bcmFieldSliceSelFpf3, 4, 4006 fp_global_mask_tcam_ofs + f3_offset + 16, 12); 4007 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanCfi, 4008 _bcmFieldSliceSelFpf3, 4, 4009 fp_global_mask_tcam_ofs + f3_offset + 28, 1); 4010 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanPri, 4011 _bcmFieldSliceSelFpf3, 4, 4012 fp_global_mask_tcam_ofs + f3_offset + 29, 3); 4013 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIntPriority, 4014 _bcmFieldSliceSelFpf3, 4, 4015 fp_global_mask_tcam_ofs + f3_offset + 32, 4); 4016 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyColor, 4017 _bcmFieldSliceSelFpf3, 4, 4018 fp_global_mask_tcam_ofs + f3_offset + 36, 2); 4019 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstIpLocal, 4020 _bcmFieldSliceSelFpf3, 4, 4021 fp_global_mask_tcam_ofs + f3_offset + 38, 1); 4022 4023 4024 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan, 4025 _bcmFieldSliceSelFpf3, 5, 4026 fp_global_mask_tcam_ofs + f3_offset, 16); 4027 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 4028 _bcmFieldSliceSelFpf3, 5, 4029 fp_global_mask_tcam_ofs + f3_offset, 12); 4030 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi, 4031 _bcmFieldSliceSelFpf3, 5, 4032 fp_global_mask_tcam_ofs + f3_offset + 12, 1); 4033 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri, 4034 _bcmFieldSliceSelFpf3, 5, 4035 fp_global_mask_tcam_ofs + f3_offset + 13, 3); 4036 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyEtherType, 4037 _bcmFieldSliceSelFpf3, 5, 4038 fp_global_mask_tcam_ofs + f3_offset + 16, 16); 4039 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanOuter, 4040 _bcmFieldSliceSelFpf3, 5, 4041 fp_global_mask_tcam_ofs + f3_offset + 32, 3); 4042 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanInner, 4043 _bcmFieldSliceSelFpf3, 5, 4044 fp_global_mask_tcam_ofs + f3_offset + 35, 3); 4045 4046 4047 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVlanTranslationHit, 4048 _bcmFieldSliceSelFpf3, 6, 4049 fp_global_mask_tcam_ofs + f3_offset + 0, 3); 4050 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyForwardingVlanValid, 4051 _bcmFieldSliceSelFpf3, 6, 4052 fp_global_mask_tcam_ofs + f3_offset + 3, 1); 4053 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIngressStpState, 4054 _bcmFieldSliceSelFpf3, 6, 4055 fp_global_mask_tcam_ofs + f3_offset + 4, 2); 4056 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2SrcHit, 4057 _bcmFieldSliceSelFpf3, 6, 4058 fp_global_mask_tcam_ofs + f3_offset + 6, 1); 4059 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2SrcStatic, 4060 _bcmFieldSliceSelFpf3, 6, 4061 fp_global_mask_tcam_ofs + f3_offset + 7, 1); 4062 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2DestHit, 4063 _bcmFieldSliceSelFpf3, 6, 4064 fp_global_mask_tcam_ofs + f3_offset + 8, 1); 4065 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2CacheHit, 4066 _bcmFieldSliceSelFpf3, 6, 4067 fp_global_mask_tcam_ofs + f3_offset + 9, 1); 4068 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3SrcHostHit, 4069 _bcmFieldSliceSelFpf3, 6, 4070 fp_global_mask_tcam_ofs + f3_offset + 10, 1); 4071 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpmcStarGroupHit, 4072 _bcmFieldSliceSelFpf3, 6, 4073 fp_global_mask_tcam_ofs + f3_offset + 10, 1); 4074 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3DestHostHit, 4075 _bcmFieldSliceSelFpf3, 6, 4076 fp_global_mask_tcam_ofs + f3_offset + 11, 1); 4077 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3DestRouteHit, 4078 _bcmFieldSliceSelFpf3, 6, 4079 fp_global_mask_tcam_ofs + f3_offset + 12, 1); 4080 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2StationMove, 4081 _bcmFieldSliceSelFpf3, 6, 4082 fp_global_mask_tcam_ofs + f3_offset + 13, 1); 4083 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDosAttack, 4084 _bcmFieldSliceSelFpf3, 6, 4085 fp_global_mask_tcam_ofs + f3_offset + 14, 1); 4086 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpTunnelHit, 4087 _bcmFieldSliceSelFpf3, 6, 4088 fp_global_mask_tcam_ofs + f3_offset + 15, 1); 4089 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMplsLabel1Hit, 4090 _bcmFieldSliceSelFpf3, 6, 4091 fp_global_mask_tcam_ofs + f3_offset + 16, 1); 4092 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTrillEgressRbridgeHit, 4093 _bcmFieldSliceSelFpf3, 6, 4094 fp_global_mask_tcam_ofs + f3_offset + 16, 1); 4095 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2GreSrcIpHit, 4096 _bcmFieldSliceSelFpf3, 6, 4097 fp_global_mask_tcam_ofs + f3_offset + 16, 1); 4098 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMimSrcGportHit, 4099 _bcmFieldSliceSelFpf3, 6, 4100 fp_global_mask_tcam_ofs + f3_offset + 16, 1); 4101 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMplsLabel2Hit, 4102 _bcmFieldSliceSelFpf3, 6, 4103 fp_global_mask_tcam_ofs + f3_offset + 17, 1); 4104 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTrillIngressRbridgeHit, 4105 _bcmFieldSliceSelFpf3, 6, 4106 fp_global_mask_tcam_ofs + f3_offset + 17, 1); 4107 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2GreVfiHit, 4108 _bcmFieldSliceSelFpf3, 6, 4109 fp_global_mask_tcam_ofs + f3_offset + 17, 1); 4110 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMimVfiHit, 4111 _bcmFieldSliceSelFpf3, 6, 4112 fp_global_mask_tcam_ofs + f3_offset + 17, 1); 4113 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMplsTerminated, 4114 _bcmFieldSliceSelFpf3, 6, 4115 fp_global_mask_tcam_ofs + f3_offset + 18, 1); 4116 4117 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyPacketRes, 4118 _bcmFieldSliceSelFpf3, 6, 4119 fp_global_mask_tcam_ofs + f3_offset + 20, 6); 4120 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlan, 4121 _bcmFieldSliceSelFpf3, 6, 4122 fp_global_mask_tcam_ofs + f3_offset + 26, 16); 4123 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanId, 4124 _bcmFieldSliceSelFpf3, 6, 4125 fp_global_mask_tcam_ofs + f3_offset + 26, 12); 4126 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanCfi, 4127 _bcmFieldSliceSelFpf3, 6, 4128 fp_global_mask_tcam_ofs + f3_offset + 38, 1); 4129 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanPri, 4130 _bcmFieldSliceSelFpf3, 6, 4131 fp_global_mask_tcam_ofs + f3_offset + 39, 3); 4132 4133 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyRangeCheck, 4134 _bcmFieldSliceSelFpf3, 7, 4135 fp_global_mask_tcam_ofs + f3_offset, 24); 4136 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, _bcmFieldQualifyRangeCheckBits24_31, 4137 _bcmFieldSliceSelFpf3, 7, 4138 _bcmFieldSliceIntfClassSelect, 3, 4139 fp_global_mask_tcam_ofs + f3_offset + 24, 8); 4140 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassPort, 4141 _bcmFieldSliceSelFpf3, 7, 4142 _bcmFieldSliceIntfClassSelect, 0, 4143 fp_global_mask_tcam_ofs + f3_offset + 24, 12); 4144 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassVPort, 4145 _bcmFieldSliceSelFpf3, 7, 4146 _bcmFieldSliceIntfClassSelect, 1, 4147 fp_global_mask_tcam_ofs + f3_offset + 24, 12); 4148 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassL2, 4149 _bcmFieldSliceSelFpf3, 7, 4150 _bcmFieldSliceIntfClassSelect, 2, 4151 fp_global_mask_tcam_ofs + f3_offset + 24, 12); 4152 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassL3, 4153 _bcmFieldSliceSelFpf3, 7, 4154 _bcmFieldSliceIntfClassSelect, 4, 4155 fp_global_mask_tcam_ofs + f3_offset + 24, 12); 4156 4157 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIp6FlowLabel, 4158 _bcmFieldSliceSelFpf3, 8, 4159 fp_global_mask_tcam_ofs + f3_offset, 20); 4160 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVlanFormat, 4161 _bcmFieldSliceSelFpf3, 8, 4162 fp_global_mask_tcam_ofs + f3_offset + 20, 2); 4163 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2Format, 4164 _bcmFieldSliceSelFpf3, 8, 4165 fp_global_mask_tcam_ofs + f3_offset + 22, 2); 4166 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTranslatedVlanFormat, 4167 _bcmFieldSliceSelFpf3, 8, 4168 fp_global_mask_tcam_ofs + f3_offset + 24, 2); 4169 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerTpid, 4170 _bcmFieldSliceSelFpf3, 8, 4171 fp_global_mask_tcam_ofs + f3_offset + 26, 2); 4172 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterTpid, 4173 _bcmFieldSliceSelFpf3, 8, 4174 fp_global_mask_tcam_ofs + f3_offset + 28, 2); 4175 4176 _FP_QUAL_ADD(unit, stage_fc, _bcmFieldQualifyData3, 4177 _bcmFieldSliceSelFpf3, 9, 4178 fp_global_mask_tcam_ofs + f3_offset, 32); 4179 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyGenericAssociatedChannelLabelValid, 4180 _bcmFieldSliceSelFpf3, 9, 4181 fp_global_mask_tcam_ofs + f3_offset + 32, 1); 4182 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyRouterAlertLabelValid, 4183 _bcmFieldSliceSelFpf3, 9, 4184 fp_global_mask_tcam_ofs + f3_offset + 33, 1); 4185 4186 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstPort, 4187 _bcmFieldSliceSelFpf3, 10, 4188 _bcmFieldSliceDstFwdEntitySelect, 4189 _bcmFieldFwdEntityGlp, 4190 fp_global_mask_tcam_ofs + f3_offset, 21); 4191 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstTrunk, 4192 _bcmFieldSliceSelFpf3, 10, 4193 _bcmFieldSliceDstFwdEntitySelect, 4194 _bcmFieldFwdEntityGlp, 4195 fp_global_mask_tcam_ofs + f3_offset, 21); 4196 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMplsGport, 4197 _bcmFieldSliceSelFpf3, 10, 4198 _bcmFieldSliceDstFwdEntitySelect, 4199 _bcmFieldFwdEntityMplsGport, 4200 fp_global_mask_tcam_ofs + f3_offset, 21); 4201 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMplsGports, 4202 _bcmFieldSliceSelFpf3, 10, 4203 _bcmFieldSliceDstFwdEntitySelect, 4204 _bcmFieldFwdEntityMplsGport, 4205 fp_global_mask_tcam_ofs + f3_offset, 21); 4206 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstNivGport, 4207 _bcmFieldSliceSelFpf3, 10, 4208 _bcmFieldSliceDstFwdEntitySelect, 4209 _bcmFieldFwdEntityNivGport, 4210 fp_global_mask_tcam_ofs + f3_offset, 21); 4211 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstNivGports, 4212 _bcmFieldSliceSelFpf3, 10, 4213 _bcmFieldSliceDstFwdEntitySelect, 4214 _bcmFieldFwdEntityNivGport, 4215 fp_global_mask_tcam_ofs + f3_offset, 21); 4216 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMimGport, 4217 _bcmFieldSliceSelFpf3, 10, 4218 _bcmFieldSliceDstFwdEntitySelect, 4219 _bcmFieldFwdEntityMimGport, 4220 fp_global_mask_tcam_ofs + f3_offset, 21); 4221 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMimGports, 4222 _bcmFieldSliceSelFpf3, 10, 4223 _bcmFieldSliceDstFwdEntitySelect, 4224 _bcmFieldFwdEntityMimGport, 4225 fp_global_mask_tcam_ofs + f3_offset, 21); 4226 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstVxlanGport, 4227 _bcmFieldSliceSelFpf3, 10, 4228 _bcmFieldSliceDstFwdEntitySelect, 4229 _bcmFieldFwdEntityVxlanGport, 4230 fp_global_mask_tcam_ofs + f3_offset, 21); 4231 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstVxlanGports, 4232 _bcmFieldSliceSelFpf3, 10, 4233 _bcmFieldSliceDstFwdEntitySelect, 4234 _bcmFieldFwdEntityVxlanGport, 4235 fp_global_mask_tcam_ofs + f3_offset, 21); 4236 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstVlanGport, 4237 _bcmFieldSliceSelFpf3, 10, 4238 _bcmFieldSliceDstFwdEntitySelect, 4239 _bcmFieldFwdEntityVlanGport, 4240 fp_global_mask_tcam_ofs + f3_offset, 21); 4241 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstVlanGports, 4242 _bcmFieldSliceSelFpf3, 10, 4243 _bcmFieldSliceDstFwdEntitySelect, 4244 _bcmFieldFwdEntityVlanGport, 4245 fp_global_mask_tcam_ofs + f3_offset, 21); 4246 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstGport, 4247 _bcmFieldSliceSelFpf3, 10, 4248 _bcmFieldSliceDstFwdEntitySelect, 4249 _bcmFieldFwdEntityCommonGport, 4250 fp_global_mask_tcam_ofs + f3_offset, 21); 4251 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstGports, 4252 _bcmFieldSliceSelFpf3, 10, 4253 _bcmFieldSliceDstFwdEntitySelect, 4254 _bcmFieldFwdEntityCommonGport, 4255 fp_global_mask_tcam_ofs + f3_offset, 21); 4256 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstL3Egress, 4257 _bcmFieldSliceSelFpf3, 10, 4258 _bcmFieldSliceDstFwdEntitySelect, 4259 _bcmFieldFwdEntityL3Egress, 4260 fp_global_mask_tcam_ofs + f3_offset, 21); 4261 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 4262 bcmFieldQualifyDstL3EgressNextHops, 4263 _bcmFieldSliceSelFpf3, 10, 4264 _bcmFieldSliceDstFwdEntitySelect, 4265 _bcmFieldFwdEntityL3Egress, 4266 fp_global_mask_tcam_ofs + f3_offset, 21); 4267 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMulticastGroup, 4268 _bcmFieldSliceSelFpf3, 10, 4269 _bcmFieldSliceDstFwdEntitySelect, 4270 _bcmFieldFwdEntityMulticastGroup, 4271 fp_global_mask_tcam_ofs + f3_offset, 21); 4272 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMulticastGroups, 4273 _bcmFieldSliceSelFpf3, 10, 4274 _bcmFieldSliceDstFwdEntitySelect, 4275 _bcmFieldFwdEntityMulticastGroup, 4276 fp_global_mask_tcam_ofs + f3_offset, 21); 4277 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMultipath, 4278 _bcmFieldSliceSelFpf3, 10, 4279 _bcmFieldSliceDstFwdEntitySelect, 4280 _bcmFieldFwdEntityMultipath, 4281 fp_global_mask_tcam_ofs + f3_offset, 21); 4282 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstPort, 4283 _bcmFieldSliceSelFpf3, 10, 4284 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 4285 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstTrunk, 4286 _bcmFieldSliceSelFpf3, 10, 4287 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 4288 4289 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcPort, 4290 _bcmFieldSliceSelFpf3, 11, 4291 fp_global_mask_tcam_ofs + f3_offset, 16); 4292 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcTrunk, 4293 _bcmFieldSliceSelFpf3, 11, 4294 fp_global_mask_tcam_ofs + f3_offset, 16); 4295 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcModPortGport, 4296 _bcmFieldSliceSelFpf3, 11, 4297 fp_global_mask_tcam_ofs + f3_offset, 15); 4298 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcModPortGports, 4299 _bcmFieldSliceSelFpf3, 11, 4300 fp_global_mask_tcam_ofs + f3_offset, 15); 4301 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcModuleGport, 4302 _bcmFieldSliceSelFpf3, 11, 4303 fp_global_mask_tcam_ofs + f3_offset + 7, 9); 4304 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMplsGport, 4305 _bcmFieldSliceSelFpf3, 11, 4306 _bcmFieldSliceIngressEntitySelect, 4307 _bcmFieldFwdEntityMplsGport, 4308 fp_global_mask_tcam_ofs + f3_offset + 16, 16); 4309 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMplsGports, 4310 _bcmFieldSliceSelFpf3, 11, 4311 _bcmFieldSliceIngressEntitySelect, 4312 _bcmFieldFwdEntityMplsGport, 4313 fp_global_mask_tcam_ofs + f3_offset + 16, 16); 4314 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcNivGport, 4315 _bcmFieldSliceSelFpf3, 11, 4316 _bcmFieldSliceIngressEntitySelect, 4317 _bcmFieldFwdEntityNivGport, 4318 fp_global_mask_tcam_ofs + f3_offset + 16, 16); 4319 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcNivGports, 4320 _bcmFieldSliceSelFpf3, 11, 4321 _bcmFieldSliceIngressEntitySelect, 4322 _bcmFieldFwdEntityNivGport, 4323 fp_global_mask_tcam_ofs + f3_offset + 16, 16); 4324 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMimGport, 4325 _bcmFieldSliceSelFpf3, 11, 4326 _bcmFieldSliceIngressEntitySelect, 4327 _bcmFieldFwdEntityMimGport, 4328 fp_global_mask_tcam_ofs + f3_offset + 16, 16); 4329 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMimGports, 4330 _bcmFieldSliceSelFpf3, 11, 4331 _bcmFieldSliceIngressEntitySelect, 4332 _bcmFieldFwdEntityMimGport, 4333 fp_global_mask_tcam_ofs + f3_offset + 16, 16); 4334 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVxlanGport, 4335 _bcmFieldSliceSelFpf3, 11, 4336 _bcmFieldSliceIngressEntitySelect, 4337 _bcmFieldFwdEntityVxlanGport, 4338 fp_global_mask_tcam_ofs + f3_offset + 16, 16); 4339 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVxlanGports, 4340 _bcmFieldSliceSelFpf3, 11, 4341 _bcmFieldSliceIngressEntitySelect, 4342 _bcmFieldFwdEntityVxlanGport, 4343 fp_global_mask_tcam_ofs + f3_offset + 16, 16); 4344 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVlanGport, 4345 _bcmFieldSliceSelFpf3, 11, 4346 _bcmFieldSliceIngressEntitySelect, 4347 _bcmFieldFwdEntityVlanGport, 4348 fp_global_mask_tcam_ofs + f3_offset + 16, 16); 4349 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVlanGports, 4350 _bcmFieldSliceSelFpf3, 11, 4351 _bcmFieldSliceIngressEntitySelect, 4352 _bcmFieldFwdEntityVlanGport, 4353 fp_global_mask_tcam_ofs + f3_offset + 16, 16); 4354 4355 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyColor, 4356 _bcmFieldSliceSelFpf3, 12, 4357 fp_global_mask_tcam_ofs + f3_offset + 41, 2); 4358 if (soc_feature(unit, soc_feature_fp_based_oam)) { 4359 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOamType, 4360 _bcmFieldSliceSelFpf3, 12, 4361 fp_global_mask_tcam_ofs + f3_offset + 43, 1); 4362 } 4363 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIntPriority, 4364 _bcmFieldSliceSelFpf3, 12, 4365 fp_global_mask_tcam_ofs + f3_offset + 37, 4); 4366 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVnTag, 4367 _bcmFieldSliceSelFpf3, 12, 4368 _bcmFieldSliceAuxTag2Select, 4369 _bcmFieldAuxTagVn, 4370 fp_global_mask_tcam_ofs + f3_offset, 33); 4371 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyCnTag, 4372 _bcmFieldSliceSelFpf3, 12, 4373 _bcmFieldSliceAuxTag2Select, 4374 _bcmFieldAuxTagCn, 4375 fp_global_mask_tcam_ofs + f3_offset, 33); 4376 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyFabricQueueTag, 4377 _bcmFieldSliceSelFpf3, 12, 4378 _bcmFieldSliceAuxTag2Select, 4379 _bcmFieldAuxTagFabricQueue, 4380 fp_global_mask_tcam_ofs + f3_offset, 33); 4381 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyMplsForwardingLabel, 4382 _bcmFieldSliceSelFpf3, 12, 4383 _bcmFieldSliceAuxTag2Select, _bcmFieldAuxTagMplsFwdingLabel, 4384 fp_global_mask_tcam_ofs + f3_offset, 33 4385 ); 4386 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyMplsForwardingLabelTtl, 4387 _bcmFieldDevSelDisable, 0, 4388 _bcmFieldSliceSelFpf3, 12, 4389 _bcmFieldSliceAuxTag2Select, _bcmFieldAuxTagMplsFwdingLabel, 4390 0, 4391 fp_global_mask_tcam_ofs + f3_offset, 8, 4392 fp_global_mask_tcam_ofs + f3_offset + 32, 1, 4393 0, 0, 4394 0 4395 ); 4396 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyMplsForwardingLabelBos, 4397 _bcmFieldDevSelDisable, 0, 4398 _bcmFieldSliceSelFpf3, 12, 4399 _bcmFieldSliceAuxTag2Select, _bcmFieldAuxTagMplsFwdingLabel, 4400 0, 4401 fp_global_mask_tcam_ofs + f3_offset + 8, 1, 4402 fp_global_mask_tcam_ofs + f3_offset + 32, 1, 4403 0, 0, 4404 0 4405 ); 4406 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyMplsForwardingLabelExp, 4407 _bcmFieldDevSelDisable, 0, 4408 _bcmFieldSliceSelFpf3, 12, 4409 _bcmFieldSliceAuxTag2Select, _bcmFieldAuxTagMplsFwdingLabel, 4410 0, 4411 fp_global_mask_tcam_ofs + f3_offset + 9, 3, 4412 fp_global_mask_tcam_ofs + f3_offset + 32, 1, 4413 0, 0, 4414 0 4415 ); 4416 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyMplsForwardingLabelId, 4417 _bcmFieldSliceSelFpf3, 12, 4418 _bcmFieldSliceAuxTag2Select, _bcmFieldAuxTagMplsFwdingLabel, 4419 fp_global_mask_tcam_ofs + f3_offset + 12, 21 4420 ); 4421 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyMplsControlWord, 4422 _bcmFieldSliceSelFpf3, 12, 4423 _bcmFieldSliceAuxTag2Select, _bcmFieldAuxTagMplsCntlWord, 4424 fp_global_mask_tcam_ofs + f3_offset, 33 4425 ); 4426 4427 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyRtag7AHashUpper, 4428 _bcmFieldSliceSelFpf3, 12, 4429 _bcmFieldSliceAuxTag2Select, 4430 _bcmFieldAuxTagRtag7A, 4431 fp_global_mask_tcam_ofs + f3_offset + 16, 17); 4432 4433 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyRtag7BHashUpper, 4434 _bcmFieldSliceSelFpf3, 12, 4435 _bcmFieldSliceAuxTag2Select, 4436 _bcmFieldAuxTagRtag7B, 4437 fp_global_mask_tcam_ofs + f3_offset + 16, 17); 4438 4439 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyRtag7AHashLower, 4440 _bcmFieldDevSelDisable, 0, 4441 _bcmFieldSliceSelFpf3, 12, 4442 _bcmFieldSliceAuxTag2Select, _bcmFieldAuxTagRtag7A, 4443 0, 4444 fp_global_mask_tcam_ofs + f3_offset, 16, 4445 fp_global_mask_tcam_ofs + f3_offset + 32, 1, 4446 0, 0, 4447 0); 4448 4449 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyRtag7BHashLower, 4450 _bcmFieldDevSelDisable, 0, 4451 _bcmFieldSliceSelFpf3, 12, 4452 _bcmFieldSliceAuxTag2Select, _bcmFieldAuxTagRtag7B, 4453 0, 4454 fp_global_mask_tcam_ofs + f3_offset, 16, 4455 fp_global_mask_tcam_ofs + f3_offset + 32, 1, 4456 0, 0, 4457 0); 4458 4459 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVxlanNetworkId, 4460 _bcmFieldSliceSelFpf3, 12, 4461 _bcmFieldSliceAuxTag2Select, 4462 _bcmFieldAuxTagVxlanOrLLTag, 4463 fp_global_mask_tcam_ofs + f3_offset, 24); 4464 4465 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVxlanFlags, 4466 _bcmFieldSliceSelFpf3, 12, 4467 _bcmFieldSliceAuxTag2Select, 4468 _bcmFieldAuxTagVxlanOrLLTag, 4469 fp_global_mask_tcam_ofs + f3_offset + 24, 8); 4470 4471 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVxlanHeaderBits8_31, 4472 _bcmFieldSliceSelFpf3, 12, 4473 _bcmFieldSliceAuxTag2Select, 4474 _bcmFieldAuxTagVxlanReserved, 4475 fp_global_mask_tcam_ofs + f3_offset, 24); 4476 4477 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyVxlanHeaderBits56_63, 4478 _bcmFieldSliceSelFpf3, 12, 4479 _bcmFieldSliceAuxTag2Select, 4480 _bcmFieldAuxTagVxlanReserved, 4481 fp_global_mask_tcam_ofs + f3_offset + 24, 8); 4482 4483 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMplsForwardingLabelAction, 4484 _bcmFieldSliceSelFpf3, 12, 4485 fp_global_mask_tcam_ofs + f3_offset + 33, 3 4486 ); 4487 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTos, 4488 _bcmFieldSliceSelFpf3, 13, 4489 _bcmFieldSliceTosClassSelect, 0, 4490 fp_global_mask_tcam_ofs + f3_offset, 8); 4491 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTosClassZero, 4492 _bcmFieldSliceSelFpf3, 13, 4493 _bcmFieldSliceTosClassSelect, 0, 4494 fp_global_mask_tcam_ofs + f3_offset, 8); 4495 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTosClassOne, 4496 _bcmFieldSliceSelFpf3, 13, 4497 _bcmFieldSliceTosClassSelect, 1, 4498 fp_global_mask_tcam_ofs + f3_offset, 8); 4499 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyExtensionHeader2Type, 4500 _bcmFieldSliceSelFpf3, 13, 4501 fp_global_mask_tcam_ofs + f3_offset + 8, 8); 4502 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyExtensionHeaderSubCode, 4503 _bcmFieldSliceSelFpf3, 13, 4504 fp_global_mask_tcam_ofs + f3_offset + 16, 8); 4505 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyExtensionHeaderType, 4506 _bcmFieldSliceSelFpf3, 13, 4507 fp_global_mask_tcam_ofs + f3_offset + 24, 8); 4508 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstIpLocal, 4509 _bcmFieldSliceSelFpf3, 13, 4510 fp_global_mask_tcam_ofs + f3_offset + 32, 1 4511 ); 4512 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpAddrsNormalized, 4513 _bcmFieldSliceSelFpf3, 13, 4514 fp_global_mask_tcam_ofs + f3_offset + 33, 1 4515 ); 4516 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMacAddrsNormalized, 4517 _bcmFieldSliceSelFpf3, 13, 4518 fp_global_mask_tcam_ofs + f3_offset + 34, 1 4519 ); 4520 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3Ingress, 4521 _bcmFieldSliceSelFpf3, 13, 4522 fp_global_mask_tcam_ofs + f3_offset + 35, 14 4523 ); 4524 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMacAddrsNormalized, 4525 _bcmFieldSliceSelFpf3, 14, 4526 fp_global_mask_tcam_ofs + f3_offset + 48, 1 4527 ); 4528 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstMac, 4529 _bcmFieldSliceSelFpf3, 14, 4530 fp_global_mask_tcam_ofs + f3_offset, 48 4531 ); 4532 4533 4534 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstPort, 4535 _bcmFieldSliceSelFpf3, 15, 4536 _bcmFieldSliceDstFwdEntitySelect, 4537 _bcmFieldFwdEntityGlp, 4538 fp_global_mask_tcam_ofs + f3_offset, 21); 4539 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstTrunk, 4540 _bcmFieldSliceSelFpf3, 15, 4541 _bcmFieldSliceDstFwdEntitySelect, 4542 _bcmFieldFwdEntityGlp, 4543 fp_global_mask_tcam_ofs + f3_offset, 21); 4544 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMplsGport, 4545 _bcmFieldSliceSelFpf3, 15, 4546 _bcmFieldSliceDstFwdEntitySelect, 4547 _bcmFieldFwdEntityMplsGport, 4548 fp_global_mask_tcam_ofs + f3_offset, 21); 4549 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMplsGports, 4550 _bcmFieldSliceSelFpf3, 15, 4551 _bcmFieldSliceDstFwdEntitySelect, 4552 _bcmFieldFwdEntityMplsGport, 4553 fp_global_mask_tcam_ofs + f3_offset, 21); 4554 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstNivGport, 4555 _bcmFieldSliceSelFpf3, 15, 4556 _bcmFieldSliceDstFwdEntitySelect, 4557 _bcmFieldFwdEntityNivGport, 4558 fp_global_mask_tcam_ofs + f3_offset, 21); 4559 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstNivGports, 4560 _bcmFieldSliceSelFpf3, 15, 4561 _bcmFieldSliceDstFwdEntitySelect, 4562 _bcmFieldFwdEntityNivGport, 4563 fp_global_mask_tcam_ofs + f3_offset, 21); 4564 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMimGport, 4565 _bcmFieldSliceSelFpf3, 15, 4566 _bcmFieldSliceDstFwdEntitySelect, 4567 _bcmFieldFwdEntityMimGport, 4568 fp_global_mask_tcam_ofs + f3_offset, 21); 4569 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMimGports, 4570 _bcmFieldSliceSelFpf3, 15, 4571 _bcmFieldSliceDstFwdEntitySelect, 4572 _bcmFieldFwdEntityMimGport, 4573 fp_global_mask_tcam_ofs + f3_offset, 21); 4574 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstVxlanGport, 4575 _bcmFieldSliceSelFpf3, 15, 4576 _bcmFieldSliceDstFwdEntitySelect, 4577 _bcmFieldFwdEntityVxlanGport, 4578 fp_global_mask_tcam_ofs + f3_offset, 21); 4579 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstVxlanGports, 4580 _bcmFieldSliceSelFpf3, 15, 4581 _bcmFieldSliceDstFwdEntitySelect, 4582 _bcmFieldFwdEntityVxlanGport, 4583 fp_global_mask_tcam_ofs + f3_offset, 21); 4584 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstVlanGport, 4585 _bcmFieldSliceSelFpf3, 15, 4586 _bcmFieldSliceDstFwdEntitySelect, 4587 _bcmFieldFwdEntityVlanGport, 4588 fp_global_mask_tcam_ofs + f3_offset, 21); 4589 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstVlanGports, 4590 _bcmFieldSliceSelFpf3, 15, 4591 _bcmFieldSliceDstFwdEntitySelect, 4592 _bcmFieldFwdEntityVlanGport, 4593 fp_global_mask_tcam_ofs + f3_offset, 21); 4594 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstGport, 4595 _bcmFieldSliceSelFpf3, 15, 4596 _bcmFieldSliceDstFwdEntitySelect, 4597 _bcmFieldFwdEntityCommonGport, 4598 fp_global_mask_tcam_ofs + f3_offset, 21); 4599 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstGports, 4600 _bcmFieldSliceSelFpf3, 15, 4601 _bcmFieldSliceDstFwdEntitySelect, 4602 _bcmFieldFwdEntityCommonGport, 4603 fp_global_mask_tcam_ofs + f3_offset, 21); 4604 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstL3Egress, 4605 _bcmFieldSliceSelFpf3, 15, 4606 _bcmFieldSliceDstFwdEntitySelect, 4607 _bcmFieldFwdEntityL3Egress, 4608 fp_global_mask_tcam_ofs + f3_offset, 21); 4609 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstL3EgressNextHops, 4610 _bcmFieldSliceSelFpf3, 15, 4611 _bcmFieldSliceDstFwdEntitySelect, 4612 _bcmFieldFwdEntityL3Egress, 4613 fp_global_mask_tcam_ofs + f3_offset, 21); 4614 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMulticastGroup, 4615 _bcmFieldSliceSelFpf3, 15, 4616 _bcmFieldSliceDstFwdEntitySelect, 4617 _bcmFieldFwdEntityMulticastGroup, 4618 fp_global_mask_tcam_ofs + f3_offset, 21); 4619 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMulticastGroups, 4620 _bcmFieldSliceSelFpf3, 15, 4621 _bcmFieldSliceDstFwdEntitySelect, 4622 _bcmFieldFwdEntityMulticastGroup, 4623 fp_global_mask_tcam_ofs + f3_offset, 21); 4624 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMultipath, 4625 _bcmFieldSliceSelFpf3, 15, 4626 _bcmFieldSliceDstFwdEntitySelect, 4627 _bcmFieldFwdEntityMultipath, 4628 fp_global_mask_tcam_ofs + f3_offset, 21); 4629 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcPort, 4630 _bcmFieldSliceSelFpf3, 15, 4631 _bcmFieldSliceIngressEntitySelect, 4632 _bcmFieldFwdEntityGlp, 4633 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 4634 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcTrunk, 4635 _bcmFieldSliceSelFpf3, 15, 4636 _bcmFieldSliceIngressEntitySelect, 4637 _bcmFieldFwdEntityGlp, 4638 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 4639 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMplsGport, 4640 _bcmFieldSliceSelFpf3, 15, 4641 _bcmFieldSliceIngressEntitySelect, 4642 _bcmFieldFwdEntityMplsGport, 4643 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 4644 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMplsGports, 4645 _bcmFieldSliceSelFpf3, 15, 4646 _bcmFieldSliceIngressEntitySelect, 4647 _bcmFieldFwdEntityMplsGport, 4648 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 4649 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcNivGport, 4650 _bcmFieldSliceSelFpf3, 15, 4651 _bcmFieldSliceIngressEntitySelect, 4652 _bcmFieldFwdEntityNivGport, 4653 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 4654 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcNivGports, 4655 _bcmFieldSliceSelFpf3, 15, 4656 _bcmFieldSliceIngressEntitySelect, 4657 _bcmFieldFwdEntityNivGport, 4658 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 4659 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMimGport, 4660 _bcmFieldSliceSelFpf3, 15, 4661 _bcmFieldSliceIngressEntitySelect, 4662 _bcmFieldFwdEntityMimGport, 4663 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 4664 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcMimGports, 4665 _bcmFieldSliceSelFpf3, 15, 4666 _bcmFieldSliceIngressEntitySelect, 4667 _bcmFieldFwdEntityMimGport, 4668 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 4669 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVxlanGport, 4670 _bcmFieldSliceSelFpf3, 15, 4671 _bcmFieldSliceIngressEntitySelect, 4672 _bcmFieldFwdEntityVxlanGport, 4673 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 4674 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVxlanGports, 4675 _bcmFieldSliceSelFpf3, 15, 4676 _bcmFieldSliceIngressEntitySelect, 4677 _bcmFieldFwdEntityVxlanGport, 4678 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 4679 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVlanGport, 4680 _bcmFieldSliceSelFpf3, 15, 4681 _bcmFieldSliceIngressEntitySelect, 4682 _bcmFieldFwdEntityVlanGport, 4683 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 4684 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcVlanGports, 4685 _bcmFieldSliceSelFpf3, 15, 4686 _bcmFieldSliceIngressEntitySelect, 4687 _bcmFieldFwdEntityVlanGport, 4688 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 4689 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcModPortGport, 4690 _bcmFieldSliceSelFpf3, 15, 4691 _bcmFieldSliceIngressEntitySelect, 4692 _bcmFieldFwdEntityModPortGport, 4693 fp_global_mask_tcam_ofs + f3_offset + 21, 15); 4694 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcModPortGports, 4695 _bcmFieldSliceSelFpf3, 15, 4696 _bcmFieldSliceIngressEntitySelect, 4697 _bcmFieldFwdEntityModPortGport, 4698 fp_global_mask_tcam_ofs + f3_offset + 21, 15); 4699 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcGport, 4700 _bcmFieldSliceSelFpf3, 15, 4701 _bcmFieldSliceIngressEntitySelect, 4702 _bcmFieldFwdEntityCommonGport, 4703 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 4704 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcGports, 4705 _bcmFieldSliceSelFpf3, 15, 4706 _bcmFieldSliceIngressEntitySelect, 4707 _bcmFieldFwdEntityCommonGport, 4708 fp_global_mask_tcam_ofs + f3_offset + 21, 16); 4709 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcModuleGport, 4710 _bcmFieldSliceSelFpf3, 15, 4711 _bcmFieldSliceIngressEntitySelect, 4712 _bcmFieldFwdEntityModPortGport, 4713 fp_global_mask_tcam_ofs + f3_offset + 28, 8); 4714 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTrunkMemberSourceModuleId, 4715 _bcmFieldSliceSelFpf3, 15, 4716 _bcmFieldSliceIngressEntitySelect, 4717 _bcmFieldFwdEntityModPortGport, 4718 fp_global_mask_tcam_ofs + f3_offset + 28, 8); 4719 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 4720 _bcmFieldSliceSelFpf3, 15, 4721 fp_global_mask_tcam_ofs + f3_offset + 37, 12); 4722 4723 4724 4725 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFcoeVersionIsZero, 4726 _bcmFieldSliceSelFpf3, 16, 4727 fp_global_mask_tcam_ofs + f3_offset, 1); 4728 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFcoeSOF, 4729 _bcmFieldSliceSelFpf3, 16, 4730 fp_global_mask_tcam_ofs + f3_offset + 1, 8); 4731 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanRCtl, 4732 _bcmFieldSliceSelFpf3, 16, 4733 fp_global_mask_tcam_ofs + f3_offset + 15, 8); 4734 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanVFTVersion, 4735 _bcmFieldSliceSelFpf3, 16, 4736 fp_global_mask_tcam_ofs + f3_offset + 23, 2); 4737 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanVFTHopCount, 4738 _bcmFieldSliceSelFpf3, 16, 4739 fp_global_mask_tcam_ofs + f3_offset + 25, 5); 4740 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanVFTVsanId, 4741 _bcmFieldSliceSelFpf3, 16, 4742 fp_global_mask_tcam_ofs + f3_offset + 30, 12); 4743 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanVFTVsanPri, 4744 _bcmFieldSliceSelFpf3, 16, 4745 fp_global_mask_tcam_ofs + f3_offset + 42, 3); 4746 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanSrcFpmaCheck, 4747 _bcmFieldSliceSelFpf3, 16, 4748 fp_global_mask_tcam_ofs + f3_offset + 45, 1); 4749 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanSrcBindCheck, 4750 _bcmFieldSliceSelFpf3, 16, 4751 fp_global_mask_tcam_ofs + f3_offset + 46, 1); 4752 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanZoneCheck, 4753 _bcmFieldSliceSelFpf3, 16, 4754 fp_global_mask_tcam_ofs + f3_offset + 47, 2); 4755 } 4756 4757 /* FIXED single wide */ 4758 if ((soc_property_get(unit, spn_RIOT_ENABLE, 0)) || 4759 (soc_feature(unit, soc_feature_l2_entry_used_as_my_station) && 4760 soc_property_get(unit,spn_L2_ENTRY_USED_AS_MY_STATION, 0))) { 4761 /* MY_STATION TCAM_2 hit maps to MY_STATION_HIT in FP */ 4762 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyMyStation2Hit, 4763 _bcmFieldSliceSelDisable, 0, fixed_offset, 1); 4764 } 4765 /* MY_STATION_TCAM hit maps to MY_STATION_1_HIT in FP */ 4766 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyMyStationHit, 4767 _bcmFieldSliceSelDisable, 0, fixed_offset + 23, 1); 4768 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyHiGig, 4769 _bcmFieldSliceSelDisable, 0, fixed_offset + 1, 1); 4770 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyForwardingType, 4771 _bcmFieldSliceSelDisable, 0, fixed_offset + 2, 3); 4772 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, _bcmFieldQualifySvpValid, 4773 _bcmFieldSliceSelDisable, 0, fixed_offset + 5, 1); 4774 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifySrcVirtualPortValid, 4775 _bcmFieldSliceSelDisable, 0, fixed_offset + 5, 1); 4776 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyIpType, 4777 _bcmFieldSliceSelDisable, 0, fixed_offset + 6, 5); 4778 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyL4Ports, 4779 _bcmFieldSliceSelDisable, 0, fixed_offset + 11, 1); 4780 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyL3Routable, 4781 _bcmFieldSliceSelDisable, 0, fixed_offset + 12, 1); 4782 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyLoopback, 4783 _bcmFieldSliceSelDisable, 0, fixed_offset + 17, 1); 4784 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyLoopbackType, 4785 _bcmFieldSliceSelDisable, 0, fixed_offset + 13, 5); 4786 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyTunnelType, 4787 _bcmFieldSliceSelDisable, 0, fixed_offset + 13, 5); 4788 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyMirrorCopy, 4789 _bcmFieldSliceSelDisable, 0, fixed_offset + 18, 1); 4790 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyRepCopy, 4791 _bcmFieldSliceSelDisable, 0, fixed_offset + 19, 1); 4792 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyIpInfo, 4793 _bcmFieldSliceSelDisable, 0, fixed_offset + 20, 1); 4794 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyDrop, 4795 _bcmFieldSliceSelDisable, 0, fixed_offset + 21, 1); 4796 _FP_QUAL_PRIMARY_ADD(unit, stage_fc, bcmFieldQualifyRecoverableDrop, 4797 _bcmFieldSliceSelDisable, 0, fixed_offset + 22, 1); 4798 4799 /* Overlay of FIXED key in pairing mode */ 4800 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyIpFrag, 4801 _bcmFieldDevSelDisable, 0, 4802 _bcmFieldSliceSelDisable, 0, 4803 _bcmFieldSliceSelDisable, 0, 4804 0, 4805 0, 0, 4806 fixed_pairing_overlay_offset, 2, 4807 0, 0, 4808 1); 4809 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol, 4810 _bcmFieldDevSelDisable, 0, 4811 _bcmFieldSliceSelDisable, 0, 4812 _bcmFieldSliceSelDisable, 0, 4813 0, 4814 0, 0, 4815 fixed_pairing_overlay_offset + 2, 8, 4816 0, 0, 4817 1); 4818 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyTtl, 4819 _bcmFieldDevSelDisable, 0, 4820 _bcmFieldSliceSelDisable, 0, 4821 _bcmFieldSliceTtlClassSelect, 0, 4822 0, 4823 0, 0, 4824 fixed_pairing_overlay_offset + 10, 8, 4825 0, 0, 4826 1); 4827 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyTtlClassZero, 4828 _bcmFieldDevSelDisable, 0, 4829 _bcmFieldSliceSelDisable, 0, 4830 _bcmFieldSliceTtlClassSelect, 0, 4831 0, 4832 0, 0, 4833 fixed_pairing_overlay_offset + 10, 8, 4834 0, 0, 4835 1); 4836 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyTtlClassOne, 4837 _bcmFieldDevSelDisable, 0, 4838 _bcmFieldSliceSelDisable, 0, 4839 _bcmFieldSliceTtlClassSelect, 1, 4840 0, 4841 0, 0, 4842 fixed_pairing_overlay_offset + 10, 8, 4843 0, 0, 4844 1); 4845 4846 /* Overlay of IPBM in pairing mode */ 4847 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyTcpControl, 4848 _bcmFieldDevSelDisable, 0, 4849 _bcmFieldSliceSelDisable, 0, 4850 _bcmFieldSliceTcpClassSelect, 0, 4851 0, 4852 0, 0, 4853 fp_global_mask_tcam_ofs + ipbm_pairing_f0_offset, 6, 4854 0, 0, 4855 1); 4856 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyTcpClassZero, 4857 _bcmFieldDevSelDisable, 0, 4858 _bcmFieldSliceSelDisable, 0, 4859 _bcmFieldSliceTcpClassSelect, 0, 4860 0, 4861 0, 0, 4862 fp_global_mask_tcam_ofs + ipbm_pairing_f0_offset, 6, 4863 0, 0, 4864 1); 4865 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyTcpClassOne, 4866 _bcmFieldDevSelDisable, 0, 4867 _bcmFieldSliceSelDisable, 0, 4868 _bcmFieldSliceTcpClassSelect, 1, 4869 0, 4870 0, 0, 4871 fp_global_mask_tcam_ofs + ipbm_pairing_f0_offset, 6, 4872 0, 0, 4873 1); 4874 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyL4DstPort, 4875 _bcmFieldDevSelDisable, 0, 4876 _bcmFieldSliceSelDisable, 0, 4877 _bcmFieldSliceSelDisable, 0, 4878 0, 4879 0, 0, 4880 fp_global_mask_tcam_ofs + ipbm_pairing_f0_offset + 6, 16, 4881 0, 0, 4882 1); 4883 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyL4SrcPort, 4884 _bcmFieldDevSelDisable, 0, 4885 _bcmFieldSliceSelDisable, 0, 4886 _bcmFieldSliceSelDisable, 0, 4887 0, 4888 0, 0, 4889 fp_global_mask_tcam_ofs + ipbm_pairing_f0_offset + 22, 16, 4890 0, 0, 4891 1); 4892 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyIcmpTypeCode, 4893 _bcmFieldDevSelDisable, 0, 4894 _bcmFieldSliceSelDisable, 0, 4895 _bcmFieldSliceSelDisable, 0, 4896 0, 4897 0, 0, 4898 fp_global_mask_tcam_ofs + ipbm_pairing_f0_offset + 22, 16, 4899 0, 0, 4900 1); 4901 4902 return (BCM_E_NONE); 4903 } 4904 4905 /* 4906 * Function: 4907 * _field_td2plus_lookup_qualifiers_init 4908 * Purpose: 4909 * Initialize device stage lookup qaualifiers 4910 * select codes & offsets 4911 * Parameters: 4912 * unit - (IN) BCM device number. 4913 * stage_fc - (IN) Field Processor stage control structure. 4914 4915 * Returns: 4916 * BCM_E_NONE 4917 */ 4918 STATIC int 4919 _field_td2plus_lookup_qualifiers_init(int unit, _field_stage_t *stage_fc) 4920 { 4921 const unsigned f1_offset = 164, f2_offset = 36, f3_offset = 0; 4922 _FP_QUAL_DECL; 4923 4924 /* Input parameters check. */ 4925 if (NULL == stage_fc) { 4926 return (BCM_E_PARAM); 4927 } 4928 4929 /* Enable the overlay of Sender Ethernet Address onto MACSA 4930 * on ARP/RARP packets. 4931 */ 4932 BCM_IF_ERROR_RETURN 4933 (soc_reg_field32_modify(unit, ING_CONFIG_64r, REG_PORT_ANY, 4934 ARP_VALIDATION_ENf, 1)); 4935 4936 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyStageLookup, 4937 _bcmFieldSliceSelDisable, 0, 0, 0); 4938 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIp4, 4939 _bcmFieldSliceSelDisable, 0, 0, 0); 4940 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIp6, 4941 _bcmFieldSliceSelDisable, 0, 0, 0); 4942 4943 /* FPF1 */ 4944 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 4945 bcmFieldQualifyInnerIpProtocolCommon, 4946 _bcmFieldSliceSelFpf1, 0, 4947 _bcmFieldSliceIpHeaderSelect, 1, f1_offset, 3); 4948 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocolCommon, 4949 _bcmFieldSliceSelFpf1, 0, 4950 _bcmFieldSliceIpHeaderSelect, 0, f1_offset, 3); 4951 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTunnelTerminated, 4952 _bcmFieldSliceSelFpf1, 0, f1_offset + 3, 1); 4953 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpInfo, 4954 _bcmFieldSliceSelFpf1, 0, f1_offset + 4, 1); 4955 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerTpid, 4956 _bcmFieldSliceSelFpf1, 0, f1_offset + 5, 2); 4957 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterTpid, 4958 _bcmFieldSliceSelFpf1, 0, f1_offset + 7, 2); 4959 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2Format, 4960 _bcmFieldSliceSelFpf1, 0, f1_offset + 9, 2); 4961 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyHiGigProxy, 4962 _bcmFieldSliceSelFpf1, 0, f1_offset + 11, 1); 4963 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyHiGig, 4964 _bcmFieldSliceSelFpf1, 0, f1_offset + 12, 1); 4965 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan, 4966 _bcmFieldSliceSelFpf1, 0, f1_offset + 13, 16); 4967 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 4968 _bcmFieldSliceSelFpf1, 0, f1_offset + 13, 12); 4969 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi, 4970 _bcmFieldSliceSelFpf1, 0, f1_offset + 25, 1); 4971 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri, 4972 _bcmFieldSliceSelFpf1, 0, f1_offset + 26, 3); 4973 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVlanFormat, 4974 _bcmFieldSliceSelFpf1, 0, f1_offset + 29, 2); 4975 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInnerIpType, 4976 _bcmFieldSliceSelFpf1, 0, 4977 _bcmFieldSliceIpHeaderSelect, 1, f1_offset + 31, 4978 5); 4979 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyIpType, 4980 _bcmFieldSliceSelFpf1, 0, 4981 _bcmFieldSliceIpHeaderSelect, 0, f1_offset + 31, 4982 5); 4983 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifySrcPort, 4984 _bcmFieldDevSelDisable, 0, 4985 _bcmFieldSliceSelFpf1, 0, 4986 _bcmFieldSliceSrcEntitySelect, _bcmFieldFwdEntityGlp, 4987 0, 4988 f1_offset + 36, 7, /* Port value in SGLP */ 4989 f1_offset + 43, 8, /* Module value in SGLP */ 4990 f1_offset + 51, 1, /* Trunk bit in SGLP (should be 0) */ 4991 0 4992 ); 4993 4994 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifySrcTrunk, 4995 _bcmFieldDevSelDisable, 0, 4996 _bcmFieldSliceSelFpf1, 0, 4997 _bcmFieldSliceSrcEntitySelect, _bcmFieldFwdEntityGlp, 4998 0, 4999 f1_offset + 36, 15, /* trunk id field of SGLP */ 5000 f1_offset + 51, 1, /* trunk bit of SGLP */ 5001 0, 0, 5002 0 5003 ); 5004 5005 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifySrcMplsGport, 5006 _bcmFieldDevSelDisable, 0, 5007 _bcmFieldSliceSelFpf1, 0, 5008 _bcmFieldSliceSrcEntitySelect, _bcmFieldFwdEntityMplsGport, 5009 0, 5010 f1_offset + 36, 20, /* SVP_VALID + S_TYPE_SEL + S_FIELD */ 5011 0, 0, 5012 0, 0, 5013 0 5014 ); 5015 5016 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifySrcMplsGports, 5017 _bcmFieldDevSelDisable, 0, 5018 _bcmFieldSliceSelFpf1, 0, 5019 _bcmFieldSliceSrcEntitySelect, _bcmFieldFwdEntityMplsGport, 5020 0, 5021 f1_offset + 36, 20, /* SVP_VALID + S_TYPE_SEL + S_FIELD */ 5022 0, 0, 5023 0, 0, 5024 0 5025 ); 5026 5027 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifySrcNivGport, 5028 _bcmFieldDevSelDisable, 0, 5029 _bcmFieldSliceSelFpf1, 0, 5030 _bcmFieldSliceSrcEntitySelect, _bcmFieldFwdEntityNivGport, 5031 0, 5032 f1_offset + 36, 20, /* SVP_VALID + S_TYPE_SEL + S_FIELD */ 5033 0, 0, 5034 0, 0, 5035 0 5036 ); 5037 5038 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifySrcNivGports, 5039 _bcmFieldDevSelDisable, 0, 5040 _bcmFieldSliceSelFpf1, 0, 5041 _bcmFieldSliceSrcEntitySelect, _bcmFieldFwdEntityNivGport, 5042 0, 5043 f1_offset + 36, 20, /* SVP_VALID + S_TYPE_SEL + S_FIELD */ 5044 0, 0, 5045 0, 0, 5046 0 5047 ); 5048 5049 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifySrcMimGport, 5050 _bcmFieldDevSelDisable, 0, 5051 _bcmFieldSliceSelFpf1, 0, 5052 _bcmFieldSliceSrcEntitySelect, _bcmFieldFwdEntityMimGport, 5053 0, 5054 f1_offset + 36, 20, /* SVP_VALID + S_TYPE_SEL + S_FIELD */ 5055 0, 0, 5056 0, 0, 5057 0 5058 ); 5059 5060 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifySrcMimGports, 5061 _bcmFieldDevSelDisable, 0, 5062 _bcmFieldSliceSelFpf1, 0, 5063 _bcmFieldSliceSrcEntitySelect, _bcmFieldFwdEntityMimGport, 5064 0, 5065 f1_offset + 36, 20, /* SVP_VALID + S_TYPE_SEL + S_FIELD */ 5066 0, 0, 5067 0, 0, 5068 0 5069 ); 5070 5071 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifySrcVxlanGport, 5072 _bcmFieldDevSelDisable, 0, 5073 _bcmFieldSliceSelFpf1, 0, 5074 _bcmFieldSliceSrcEntitySelect, _bcmFieldFwdEntityVxlanGport, 5075 0, 5076 f1_offset + 36, 20, /* SVP_VALID + S_TYPE_SEL + S_FIELD */ 5077 0, 0, 5078 0, 0, 5079 0 5080 ); 5081 5082 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifySrcVxlanGports, 5083 _bcmFieldDevSelDisable, 0, 5084 _bcmFieldSliceSelFpf1, 0, 5085 _bcmFieldSliceSrcEntitySelect, _bcmFieldFwdEntityVxlanGport, 5086 0, 5087 f1_offset + 36, 20, /* SVP_VALID + S_TYPE_SEL + S_FIELD */ 5088 0, 0, 5089 0, 0, 5090 0 5091 ); 5092 5093 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifySrcVlanGport, 5094 _bcmFieldDevSelDisable, 0, 5095 _bcmFieldSliceSelFpf1, 0, 5096 _bcmFieldSliceSrcEntitySelect, _bcmFieldFwdEntityVlanGport, 5097 0, 5098 f1_offset + 36, 20, /* SVP_VALID + S_TYPE_SEL + S_FIELD */ 5099 0, 0, 5100 0, 0, 5101 0 5102 ); 5103 5104 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifySrcVlanGports, 5105 _bcmFieldDevSelDisable, 0, 5106 _bcmFieldSliceSelFpf1, 0, 5107 _bcmFieldSliceSrcEntitySelect, _bcmFieldFwdEntityVlanGport, 5108 0, 5109 f1_offset + 36, 20, /* SVP_VALID + S_TYPE_SEL + S_FIELD */ 5110 0, 0, 5111 0, 0, 5112 0 5113 ); 5114 5115 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifySrcModPortGport, 5116 _bcmFieldDevSelDisable, 0, 5117 _bcmFieldSliceSelFpf1, 0, 5118 _bcmFieldSliceSrcEntitySelect, _bcmFieldFwdEntityModPortGport, 5119 0, 5120 f1_offset + 36, 15, /* mod + port field of unresolved SGLP */ 5121 0, 0, 5122 0, 0, 5123 0 5124 ); 5125 5126 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifySrcModPortGports, 5127 _bcmFieldDevSelDisable, 0, 5128 _bcmFieldSliceSelFpf1, 0, 5129 _bcmFieldSliceSrcEntitySelect, _bcmFieldFwdEntityModPortGport, 5130 0, 5131 f1_offset + 36, 15, /* mod + port field of unresolved SGLP */ 5132 0, 0, 5133 0, 0, 5134 0 5135 ); 5136 5137 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifySrcModuleGport, 5138 _bcmFieldDevSelDisable, 0, 5139 _bcmFieldSliceSelFpf1, 0, 5140 _bcmFieldSliceSrcEntitySelect, _bcmFieldFwdEntityModPortGport, 5141 0, 5142 f1_offset + 36 + 7, 8, /* mod field of unresolved SGLP */ 5143 0, 0, 5144 0, 0, 5145 0 5146 ); 5147 5148 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyInPort, 5149 _bcmFieldDevSelDisable, 0, 5150 _bcmFieldSliceSelFpf1, 0, 5151 _bcmFieldSliceSrcEntitySelect, _bcmFieldFwdEntityPortGroupNum, 5152 0, 5153 f1_offset + 36, 7, /* ingress port field */ 5154 0, 0, 5155 0, 0, 5156 0 5157 ); 5158 5159 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassPort, 5160 _bcmFieldDevSelDisable, 0, 5161 _bcmFieldSliceSelFpf1, 0, 5162 _bcmFieldSliceSrcEntitySelect, _bcmFieldFwdEntityPortGroupNum, 5163 0, 5164 f1_offset + 36 + 7, 8, /* ingress port group field */ 5165 0, 0, 5166 0, 0, 5167 0 5168 ); 5169 5170 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyTrunkMemberSourceModuleId, 5171 _bcmFieldDevSelDisable, 0, 5172 _bcmFieldSliceSelFpf1, 0, 5173 _bcmFieldSliceSrcEntitySelect, _bcmFieldFwdEntityModPortGport, 5174 0, 5175 f1_offset + 36 + 7, 8, 5176 0, 0, 5177 0, 0, 5178 0 5179 ); 5180 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4Ports, 5181 _bcmFieldSliceSelFpf1, 0, f1_offset + 56, 1); 5182 5183 5184 /* FPF2 */ 5185 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInnerTtl, 5186 _bcmFieldSliceSelFpf2, 0, 5187 _bcmFieldSliceIpHeaderSelect, 1, f2_offset, 8); 5188 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTtl, 5189 _bcmFieldSliceSelFpf2, 0, 5190 _bcmFieldSliceIpHeaderSelect, 0, f2_offset, 8); 5191 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTcpControl, 5192 _bcmFieldSliceSelFpf2, 0, f2_offset + 8, 6); 5193 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInnerIpFrag, 5194 _bcmFieldSliceSelFpf2, 0, 5195 _bcmFieldSliceIpHeaderSelect, 1, f2_offset + 14, 5196 2); 5197 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyIpFrag, 5198 _bcmFieldSliceSelFpf2, 0, 5199 _bcmFieldSliceIpHeaderSelect, 0, f2_offset + 14, 5200 2); 5201 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInnerTos, 5202 _bcmFieldSliceSelFpf2, 0, 5203 _bcmFieldSliceIpHeaderSelect, 1, f2_offset + 16, 5204 8); 5205 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTos, 5206 _bcmFieldSliceSelFpf2, 0, 5207 _bcmFieldSliceIpHeaderSelect, 0, f2_offset + 16, 5208 8); 5209 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInnerL4DstPort, 5210 _bcmFieldSliceSelFpf2, 0, 5211 _bcmFieldSliceIpHeaderSelect, 1, f2_offset + 24, 5212 16); 5213 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyL4DstPort, 5214 _bcmFieldSliceSelFpf2, 0, 5215 _bcmFieldSliceIpHeaderSelect, 0, f2_offset + 24, 5216 16); 5217 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInnerL4SrcPort, 5218 _bcmFieldSliceSelFpf2, 0, 5219 _bcmFieldSliceIpHeaderSelect, 1, f2_offset + 40, 5220 16); 5221 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyL4SrcPort, 5222 _bcmFieldSliceSelFpf2, 0, 5223 _bcmFieldSliceIpHeaderSelect, 0, f2_offset + 40, 5224 16); 5225 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyIcmpTypeCode, 5226 _bcmFieldSliceSelFpf2, 0, 5227 _bcmFieldSliceIpHeaderSelect, 0, f2_offset + 40, 5228 16); 5229 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInnerIpProtocol, 5230 _bcmFieldSliceSelFpf2, 0, 5231 _bcmFieldSliceIpHeaderSelect, 1, f2_offset + 56, 5232 8); 5233 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol, 5234 _bcmFieldSliceSelFpf2, 0, 5235 _bcmFieldSliceIpHeaderSelect, 0, f2_offset + 56, 5236 8); 5237 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInnerDstIp, 5238 _bcmFieldSliceSelFpf2, 0, 5239 _bcmFieldSliceIpHeaderSelect, 1, f2_offset + 64, 5240 32); 5241 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstIp, 5242 _bcmFieldSliceSelFpf2, 0, 5243 _bcmFieldSliceIpHeaderSelect, 0, f2_offset + 64, 5244 32); 5245 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInnerSrcIp, 5246 _bcmFieldSliceSelFpf2, 0, 5247 _bcmFieldSliceIpHeaderSelect, 1, f2_offset + 96, 5248 32); 5249 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcIp, 5250 _bcmFieldSliceSelFpf2, 0, 5251 _bcmFieldSliceIpHeaderSelect, 0, f2_offset + 96, 5252 32); 5253 5254 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInnerSrcIp6, 5255 _bcmFieldSliceSelFpf2, 1, 5256 _bcmFieldSliceIpHeaderSelect, 1, f2_offset, 128); 5257 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcIp6, 5258 _bcmFieldSliceSelFpf2, 1, 5259 _bcmFieldSliceIpHeaderSelect, 0, f2_offset, 128); 5260 5261 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInnerDstIp6, 5262 _bcmFieldSliceSelFpf2, 2, 5263 _bcmFieldSliceIpHeaderSelect, 1, f2_offset, 128); 5264 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstIp6, 5265 _bcmFieldSliceSelFpf2, 2, 5266 _bcmFieldSliceIpHeaderSelect, 0, f2_offset, 128); 5267 5268 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyEtherType, 5269 _bcmFieldSliceSelFpf2, 3, f2_offset + 16, 16); 5270 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcMac, 5271 _bcmFieldSliceSelFpf2, 3, f2_offset + 32, 48); 5272 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstMac, 5273 _bcmFieldSliceSelFpf2, 3, f2_offset + 80, 48); 5274 5275 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInnerTos, 5276 _bcmFieldSliceSelFpf2, 4, 5277 _bcmFieldSliceIpHeaderSelect, 1, f2_offset, 8); 5278 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTos, 5279 _bcmFieldSliceSelFpf2, 4, 5280 _bcmFieldSliceIpHeaderSelect, 0, f2_offset, 8); 5281 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInnerIpProtocol, 5282 _bcmFieldSliceSelFpf2, 4, 5283 _bcmFieldSliceIpHeaderSelect, 1, f2_offset + 8, 5284 8); 5285 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol, 5286 _bcmFieldSliceSelFpf2, 4, 5287 _bcmFieldSliceIpHeaderSelect, 0, f2_offset + 8, 5288 8); 5289 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInnerDstIp, 5290 _bcmFieldSliceSelFpf2, 4, 5291 _bcmFieldSliceIpHeaderSelect, 1, f2_offset + 16, 5292 32); 5293 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstIp, 5294 _bcmFieldSliceSelFpf2, 4, 5295 _bcmFieldSliceIpHeaderSelect, 0, f2_offset + 16, 5296 32); 5297 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInnerSrcIp, 5298 _bcmFieldSliceSelFpf2, 4, 5299 _bcmFieldSliceIpHeaderSelect, 1, f2_offset + 48, 5300 32); 5301 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcIp, 5302 _bcmFieldSliceSelFpf2, 4, 5303 _bcmFieldSliceIpHeaderSelect, 0, f2_offset + 48, 5304 32); 5305 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcMac, 5306 _bcmFieldSliceSelFpf2, 4, f2_offset + 80, 48); 5307 5308 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInnerTos, 5309 _bcmFieldSliceSelFpf2, 5, 5310 _bcmFieldSliceIpHeaderSelect, 1, f2_offset, 8); 5311 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTos, 5312 _bcmFieldSliceSelFpf2, 5, 5313 _bcmFieldSliceIpHeaderSelect, 0, f2_offset, 8); 5314 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInnerIpProtocol, 5315 _bcmFieldSliceSelFpf2, 5, 5316 _bcmFieldSliceIpHeaderSelect, 1, f2_offset + 8, 5317 8); 5318 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol, 5319 _bcmFieldSliceSelFpf2, 5, 5320 _bcmFieldSliceIpHeaderSelect, 0, f2_offset + 8, 5321 8); 5322 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInnerDstIp, 5323 _bcmFieldSliceSelFpf2, 5, 5324 _bcmFieldSliceIpHeaderSelect, 1, f2_offset + 16, 5325 32); 5326 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstIp, 5327 _bcmFieldSliceSelFpf2, 5, 5328 _bcmFieldSliceIpHeaderSelect, 0, f2_offset + 16, 5329 32); 5330 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInnerSrcIp, 5331 _bcmFieldSliceSelFpf2, 5, 5332 _bcmFieldSliceIpHeaderSelect, 1, f2_offset + 48, 5333 32); 5334 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcIp, 5335 _bcmFieldSliceSelFpf2, 5, 5336 _bcmFieldSliceIpHeaderSelect, 0, f2_offset + 48, 5337 32); 5338 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstMac, 5339 _bcmFieldSliceSelFpf2, 5, f2_offset + 80, 48); 5340 5341 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInnerSrcIp6High, 5342 _bcmFieldSliceSelFpf2, 6, 5343 _bcmFieldSliceIpHeaderSelect, 1, f2_offset, 64); 5344 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcIp6High, 5345 _bcmFieldSliceSelFpf2, 6, 5346 _bcmFieldSliceIpHeaderSelect, 0, f2_offset, 64); 5347 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInnerDstIp6High, 5348 _bcmFieldSliceSelFpf2, 6, 5349 _bcmFieldSliceIpHeaderSelect, 1, f2_offset + 64, 5350 64); 5351 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstIp6High, 5352 _bcmFieldSliceSelFpf2, 6, 5353 _bcmFieldSliceIpHeaderSelect, 0, f2_offset + 64, 5354 64); 5355 5356 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVnTag, 5357 _bcmFieldSliceSelFpf2, 7, f2_offset, 33); 5358 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySnap, 5359 _bcmFieldSliceSelFpf2, 7, f2_offset + 64, 40); 5360 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyLlc, 5361 _bcmFieldSliceSelFpf2, 7, f2_offset + 104, 24); 5362 5363 _FP_QUAL_ADD(unit, stage_fc, _bcmFieldQualifyData0, 5364 _bcmFieldSliceSelFpf2, 8, f2_offset, 128); 5365 5366 _FP_QUAL_ADD(unit, stage_fc, _bcmFieldQualifyData1, 5367 _bcmFieldSliceSelFpf2, 9, f2_offset, 128); 5368 5369 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFcoeSOF, 5370 _bcmFieldSliceSelFpf2, 10, f2_offset + 6, 8); 5371 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanDFCtl, 5372 _bcmFieldSliceSelFpf2, 10, f2_offset + 14, 8); 5373 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanCSCtl, 5374 _bcmFieldSliceSelFpf2, 10, f2_offset + 22, 8); 5375 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanFCtl, 5376 _bcmFieldSliceSelFpf2, 10, f2_offset + 30, 24); 5377 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanType, 5378 _bcmFieldSliceSelFpf2, 10, f2_offset + 54, 8); 5379 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanDstId, 5380 _bcmFieldSliceSelFpf2, 10, f2_offset + 62, 24); 5381 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanSrcId, 5382 _bcmFieldSliceSelFpf2, 10, f2_offset + 86, 24); 5383 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanRCtl, 5384 _bcmFieldSliceSelFpf2, 10, f2_offset + 110, 8); 5385 5386 /* FPF3 */ 5387 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlan, 5388 _bcmFieldSliceSelFpf3, 0, f3_offset + 0, 16); 5389 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanId, 5390 _bcmFieldSliceSelFpf3, 0, f3_offset + 0, 12); 5391 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanCfi, 5392 _bcmFieldSliceSelFpf3, 0, f3_offset + 12, 1); 5393 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanPri, 5394 _bcmFieldSliceSelFpf3, 0, f3_offset + 13, 3); 5395 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyEtherType, 5396 _bcmFieldSliceSelFpf3, 0, f3_offset + 16, 16); 5397 5398 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInnerL4DstPort, 5399 _bcmFieldSliceSelFpf3, 1, 5400 _bcmFieldSliceIpHeaderSelect, 1, f3_offset + 0, 5401 16); 5402 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyL4DstPort, 5403 _bcmFieldSliceSelFpf3, 1, 5404 _bcmFieldSliceIpHeaderSelect, 0, f3_offset + 0, 5405 16); 5406 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInnerL4SrcPort, 5407 _bcmFieldSliceSelFpf3, 1, 5408 _bcmFieldSliceIpHeaderSelect, 1, f3_offset + 16, 5409 16); 5410 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyL4SrcPort, 5411 _bcmFieldSliceSelFpf3, 1, 5412 _bcmFieldSliceIpHeaderSelect, 0, f3_offset + 16, 5413 16); 5414 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyIcmpTypeCode, 5415 _bcmFieldSliceSelFpf3, 1, 5416 _bcmFieldSliceIpHeaderSelect, 0, f3_offset + 16, 5417 16); 5418 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInnerTos, 5419 _bcmFieldSliceSelFpf3, 2, 5420 _bcmFieldSliceIpHeaderSelect, 1, f3_offset + 0, 5421 8); 5422 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyTos, 5423 _bcmFieldSliceSelFpf3, 2, 5424 _bcmFieldSliceIpHeaderSelect, 0, f3_offset + 0, 5425 8); 5426 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInnerIpProtocol, 5427 _bcmFieldSliceSelFpf3, 2, 5428 _bcmFieldSliceIpHeaderSelect, 1, f3_offset + 8, 5429 8); 5430 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol, 5431 _bcmFieldSliceSelFpf3, 2, 5432 _bcmFieldSliceIpHeaderSelect, 0, f3_offset + 8, 5433 8); 5434 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyExtensionHeaderSubCode, 5435 _bcmFieldSliceSelFpf3, 2, f3_offset + 16, 8); 5436 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyExtensionHeaderType, 5437 _bcmFieldSliceSelFpf3, 2, f3_offset + 24, 8); 5438 5439 5440 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassL3, 5441 _bcmFieldSliceSelFpf3, 3, f3_offset + 0, 8); 5442 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlan, 5443 _bcmFieldSliceSelFpf3, 3, f3_offset + 8, 16); 5444 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanId, 5445 _bcmFieldSliceSelFpf3, 3, f3_offset + 8, 12); 5446 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanCfi, 5447 _bcmFieldSliceSelFpf3, 3, f3_offset + 20, 1); 5448 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanPri, 5449 _bcmFieldSliceSelFpf3, 3, f3_offset + 21, 3); 5450 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcModuleGport, 5451 _bcmFieldSliceSelFpf3, 3, f3_offset + 24, 8); 5452 5453 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanVFTHopCount, 5454 _bcmFieldSliceSelFpf3, 5, f3_offset, 8); 5455 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanVFTVsanId, 5456 _bcmFieldSliceSelFpf3, 5, f3_offset + 8, 12); 5457 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanVFTVsanPri, 5458 _bcmFieldSliceSelFpf3, 5, f3_offset + 20, 3); 5459 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyFibreChanVFTVersion, 5460 _bcmFieldSliceSelFpf3, 5, f3_offset + 23, 2); 5461 5462 /* DWF3 */ 5463 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyInnerTos, 5464 _bcmFieldSliceSelFpf3, 0, 5465 _bcmFieldSliceIpHeaderSelect, 1, f3_offset + 0, 8); 5466 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyTos, 5467 _bcmFieldSliceSelFpf3, 0, 5468 _bcmFieldSliceIpHeaderSelect, 0, f3_offset + 0, 8); 5469 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyInnerTtl, 5470 _bcmFieldSliceSelFpf3, 0, 5471 _bcmFieldSliceIpHeaderSelect, 1, f3_offset + 8, 8); 5472 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyTtl, 5473 _bcmFieldSliceSelFpf3, 0, 5474 _bcmFieldSliceIpHeaderSelect, 0, f3_offset + 8, 8); 5475 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyTcpControl, 5476 _bcmFieldSliceSelFpf3, 0, 5477 _bcmFieldSliceIpHeaderSelect, 0, f3_offset + 16, 5478 6); 5479 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyInnerIpFrag, 5480 _bcmFieldSliceSelFpf3, 0, 5481 _bcmFieldSliceIpHeaderSelect, 1, f3_offset + 22, 5482 2); 5483 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyIpFrag, 5484 _bcmFieldSliceSelFpf3, 0, 5485 _bcmFieldSliceIpHeaderSelect, 0, f3_offset + 22, 5486 2); 5487 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyInnerIpProtocol, 5488 _bcmFieldSliceSelFpf3, 0, 5489 _bcmFieldSliceIpHeaderSelect, 1, f3_offset + 24, 5490 8); 5491 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol, 5492 _bcmFieldSliceSelFpf3, 0, 5493 _bcmFieldSliceIpHeaderSelect, 0, f3_offset + 24, 5494 8); 5495 5496 /* DWF2 */ 5497 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyInnerTtl, 5498 _bcmFieldSliceSelFpf2, 0, 5499 _bcmFieldSliceIpHeaderSelect, 1, f2_offset + 0, 5500 8); 5501 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyTtl, 5502 _bcmFieldSliceSelFpf2, 0, 5503 _bcmFieldSliceIpHeaderSelect, 0, f2_offset + 0, 5504 8); 5505 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyTcpControl, 5506 _bcmFieldSliceSelFpf2, 0, 5507 _bcmFieldSliceIpHeaderSelect, 0, f2_offset + 8, 5508 6); 5509 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyInnerIpFrag, 5510 _bcmFieldSliceSelFpf2, 0, 5511 _bcmFieldSliceIpHeaderSelect, 1, f2_offset + 14, 5512 2); 5513 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyIpFrag, 5514 _bcmFieldSliceSelFpf2, 0, 5515 _bcmFieldSliceIpHeaderSelect, 0, f2_offset + 14, 5516 2); 5517 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyInnerTos, 5518 _bcmFieldSliceSelFpf2, 0, 5519 _bcmFieldSliceIpHeaderSelect, 1, f2_offset + 16, 5520 8); 5521 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyTos, 5522 _bcmFieldSliceSelFpf2, 0, 5523 _bcmFieldSliceIpHeaderSelect, 0, f2_offset + 16, 5524 8); 5525 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyInnerL4DstPort, 5526 _bcmFieldSliceSelFpf2, 0, 5527 _bcmFieldSliceIpHeaderSelect, 1, f2_offset + 24, 5528 16); 5529 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyL4DstPort, 5530 _bcmFieldSliceSelFpf2, 0, 5531 _bcmFieldSliceIpHeaderSelect, 0, f2_offset + 24, 5532 16); 5533 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyInnerL4SrcPort, 5534 _bcmFieldSliceSelFpf2, 0, 5535 _bcmFieldSliceIpHeaderSelect, 1, f2_offset + 40, 5536 16); 5537 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyL4SrcPort, 5538 _bcmFieldSliceSelFpf2, 0, 5539 _bcmFieldSliceIpHeaderSelect, 0, f2_offset + 40, 5540 16); 5541 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyIcmpTypeCode, 5542 _bcmFieldSliceSelFpf2, 0, 5543 _bcmFieldSliceIpHeaderSelect, 0, f2_offset + 40, 5544 16); 5545 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyInnerIpProtocol, 5546 _bcmFieldSliceSelFpf2, 0, 5547 _bcmFieldSliceIpHeaderSelect, 1, f2_offset + 56, 5548 8); 5549 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol, 5550 _bcmFieldSliceSelFpf2, 0, 5551 _bcmFieldSliceIpHeaderSelect, 0, f2_offset + 56, 5552 8); 5553 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyInnerDstIp, 5554 _bcmFieldSliceSelFpf2, 0, 5555 _bcmFieldSliceIpHeaderSelect, 1, f2_offset + 64, 5556 32); 5557 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyDstIp, 5558 _bcmFieldSliceSelFpf2, 0, 5559 _bcmFieldSliceIpHeaderSelect, 0, f2_offset + 64, 5560 32); 5561 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyInnerSrcIp, 5562 _bcmFieldSliceSelFpf2, 0, 5563 _bcmFieldSliceIpHeaderSelect, 1, f2_offset + 96, 5564 32); 5565 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifySrcIp, 5566 _bcmFieldSliceSelFpf2, 0, 5567 _bcmFieldSliceIpHeaderSelect, 0, f2_offset + 96, 5568 32); 5569 5570 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyInnerSrcIp6, 5571 _bcmFieldSliceSelFpf2, 1, 5572 _bcmFieldSliceIpHeaderSelect, 1, f2_offset, 5573 128); 5574 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifySrcIp6, 5575 _bcmFieldSliceSelFpf2, 1, 5576 _bcmFieldSliceIpHeaderSelect, 0, f2_offset, 5577 128); 5578 5579 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, _bcmFieldQualifyData1, 5580 _bcmFieldSliceSelFpf2, 2, 5581 _bcmFieldSliceSelDisable, 0, 5582 f2_offset, 128); 5583 5584 /* DWF1 */ 5585 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, 5586 bcmFieldQualifyExtensionHeaderSubCode, 5587 _bcmFieldSliceSelFpf1, 0, 5588 _bcmFieldSliceIpHeaderSelect, 0, f1_offset + 0, 5589 8); 5590 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyExtensionHeaderType, 5591 _bcmFieldSliceSelFpf1, 0, 5592 _bcmFieldSliceIpHeaderSelect, 0, f1_offset + 8, 5593 8); 5594 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassL3, 5595 _bcmFieldSliceSelFpf1, 0, 5596 _bcmFieldSliceIpHeaderSelect, 0, f1_offset + 16, 5597 8); 5598 _FP_QUAL_INTRASLICE_ADD(unit, stage_fc, bcmFieldQualifyEtherType, 5599 _bcmFieldSliceSelFpf1, 0, 5600 _bcmFieldSliceIpHeaderSelect, 0, f1_offset + 24, 5601 16); 5602 5603 return (BCM_E_NONE); 5604 } 5605 5606 /* 5607 * Function: 5608 * _field_td2plus_egress_qualifiers_init 5609 * Purpose: 5610 * Initialize device stage egress qaualifiers 5611 * select codes & offsets 5612 * Parameters: 5613 * unit - (IN) BCM device number. 5614 * stage_fc - (IN) Field Processor stage control structure. 5615 * 5616 * Returns: 5617 * BCM_E_NONE 5618 */ 5619 STATIC int 5620 _field_td2plus_egress_qualifiers_init(int unit, _field_stage_t *stage_fc) 5621 { 5622 _FP_QUAL_DECL; 5623 _key_fld_ = KEYf; 5624 5625 /* Input parameters check. */ 5626 if (NULL == stage_fc) { 5627 return (BCM_E_PARAM); 5628 } 5629 5630 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyStageEgress, 5631 _bcmFieldSliceSelDisable, 0, 0, 0); 5632 5633 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4Ports, 5634 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 0, 1); 5635 /* EG_DVP_CLASS_ID */ 5636 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyEgressClassTrill, 5637 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 5638 _bcmFieldSliceSelEgrDvpKey4, 3, 5639 2, 12); 5640 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyEgressClassWlan, 5641 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 5642 _bcmFieldSliceSelEgrDvpKey4, 3, 5643 2, 12); 5644 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyEgressClassL2Gre, 5645 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 5646 _bcmFieldSliceSelEgrDvpKey4, 3, 5647 2, 12); 5648 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyEgressClassVxlan, 5649 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 5650 _bcmFieldSliceSelEgrDvpKey4, 3, 5651 2, 12); 5652 /* DVP_VALID + DVP + SPARE_DVP */ 5653 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMplsGport, 5654 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 5655 _bcmFieldSliceSelEgrDvpKey4, 0, 5656 1, 17); 5657 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMplsGports, 5658 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 5659 _bcmFieldSliceSelEgrDvpKey4, 0, 5660 1, 17); 5661 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstNivGport, 5662 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 5663 _bcmFieldSliceSelEgrDvpKey4, 0, 5664 1, 17); 5665 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstNivGports, 5666 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 5667 _bcmFieldSliceSelEgrDvpKey4, 0, 5668 1, 17); 5669 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMimGport, 5670 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 5671 _bcmFieldSliceSelEgrDvpKey4, 0, 5672 1, 17); 5673 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstMimGports, 5674 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 5675 _bcmFieldSliceSelEgrDvpKey4, 0, 5676 1, 17); 5677 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstVxlanGport, 5678 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 5679 _bcmFieldSliceSelEgrDvpKey4, 0, 5680 1, 17); 5681 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstVxlanGports, 5682 _bcmFieldDevSelDisable, 0, 5683 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 5684 _bcmFieldSliceSelEgrDvpKey4, 0, 5685 0, 5686 1, 17, 5687 227, 2, /* DVP TYPE */ 5688 0, 0, 5689 0 5690 ); 5691 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstVlanGport, 5692 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 5693 _bcmFieldSliceSelEgrDvpKey4, 0, 5694 1, 17); 5695 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstVlanGports, 5696 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 5697 _bcmFieldSliceSelEgrDvpKey4, 0, 5698 1, 17); 5699 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstGport, 5700 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 5701 _bcmFieldSliceSelEgrDvpKey4, 0, 5702 1, 17); 5703 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstGports, 5704 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 5705 _bcmFieldSliceSelEgrDvpKey4, 0, 5706 1, 17); 5707 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 5708 bcmFieldQualifyDestVirtualPortValid, 5709 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 5710 _bcmFieldSliceSelEgrDvpKey4, 0, 5711 1, 1); 5712 5713 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIntPriority, 5714 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 18, 4); 5715 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyColor, 5716 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 22, 2); 5717 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL2Format, 5718 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 24, 2); 5719 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyEtherType, 5720 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 26, 16); 5721 if (!soc_feature(unit, soc_feature_fp_based_oam)) { 5722 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcMac, 5723 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 42, 48); 5724 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstMac, 5725 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 90, 48); 5726 } else { 5727 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 5728 bcmFieldQualifySrcMac, 5729 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 5730 _bcmFieldSliceSelEgrOamOverlayKey4, 0, 5731 42, 48); 5732 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 5733 bcmFieldQualifyDstMac, 5734 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 5735 _bcmFieldSliceSelEgrOamOverlayKey4, 0, 5736 90, 48); 5737 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 5738 bcmFieldQualifyOamHeaderBits32_63, 5739 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 5740 _bcmFieldSliceSelEgrOamOverlayKey4, 1, 5741 42, 32); 5742 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 5743 bcmFieldQualifyOamHeaderBits0_31, 5744 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 5745 _bcmFieldSliceSelEgrOamOverlayKey4, 1, 5746 74, 32); 5747 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 5748 bcmFieldQualifyOamEgressClassVxlt, 5749 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 5750 _bcmFieldSliceSelEgrOamOverlayKey4, 1, 5751 106, 12); 5752 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 5753 bcmFieldQualifyOamEgressClassPort, 5754 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 5755 _bcmFieldSliceSelEgrOamOverlayKey4, 1, 5756 118, 12); 5757 } 5758 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVlanTranslationHit, 5759 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 138, 1); 5760 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyHiGigProxy, 5761 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 139, 1); 5762 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyHiGig, 5763 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 140, 1); 5764 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlan, 5765 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 141, 16); 5766 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanCfi, 5767 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 141, 1); 5768 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanPri, 5769 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 142, 3); 5770 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanId, 5771 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 145, 12); 5772 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInPort, 5773 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 157, 7); 5774 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3Routable, 5775 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 164, 1); 5776 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMirrorCopy, 5777 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 165, 1); 5778 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan, 5779 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 166, 16); 5780 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 5781 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 166, 12); 5782 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi, 5783 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 178, 1); 5784 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri, 5785 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 179, 3); 5786 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVlanFormat, 5787 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 182, 2); 5788 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstHiGig, 5789 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 184, 1); 5790 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 5791 bcmFieldQualifyInterfaceClassPort, 5792 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 5793 _bcmFieldSliceSelEgrClassF4, 0, 5794 185, 8); 5795 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL2, 5796 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 5797 _bcmFieldSliceSelEgrClassF4, 0, 5798 193, 13 5799 ); 5800 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL3, 5801 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 5802 _bcmFieldSliceSelEgrClassF4, 0, 5803 193, 13 5804 ); 5805 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField, 5806 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 5807 _bcmFieldSliceSelEgrClassF4, 0, 5808 193, 13 5809 ); 5810 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField, 5811 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 5812 _bcmFieldSliceSelEgrClassF4, 0, 5813 193, 13 5814 ); 5815 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL2, 5816 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 5817 _bcmFieldSliceSelEgrClassF4, 0, 5818 193, 13 5819 ); 5820 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL3, 5821 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 5822 _bcmFieldSliceSelEgrClassF4, 0, 5823 193, 13 5824 ); 5825 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassL2, 5826 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 5827 _bcmFieldSliceSelEgrClassF4, 0, 5828 193, 13 5829 ); 5830 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassL3, 5831 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 5832 _bcmFieldSliceSelEgrClassF4, 0, 5833 193, 13 5834 ); 5835 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyOutPort, 5836 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 5837 _bcmFieldSliceSelEgrClassF4, 1, 5838 193, 7); 5839 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstPort, 5840 _bcmFieldDevSelDisable, 0, 5841 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 5842 _bcmFieldSliceSelEgrClassF4, 3, 5843 0, 5844 193, 7, /* DST_PORT */ 5845 185, 8, /* DST_MODID */ 5846 0, 0, 5847 0 5848 ); 5849 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyCpuQueue, 5850 _bcmFieldDevSelDisable, 0, 5851 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 5852 _bcmFieldSliceSelEgrClassF4, 2, 5853 0, 5854 193, 6, /* CpuCos - 6 bits */ 5855 16, 2, /* Original - Data and Mask bits[5:4] */ 5856 0, 0, 5857 0 5858 ); 5859 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyIngressClassField, 5860 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 5861 _bcmFieldSliceSelEgrClassF4, 0, 5862 193, 13 5863 ); 5864 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 5865 bcmFieldQualifyIngressInterfaceClassPort, 5866 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 5867 _bcmFieldSliceSelEgrClassF4, 0, 5868 193, 13 5869 ); 5870 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 5871 bcmFieldQualifyIngressInterfaceClassVPort, 5872 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 5873 _bcmFieldSliceSelEgrClassF4, 0, 5874 193, 13 5875 ); 5876 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 5877 bcmFieldQualifyInterfaceClassVPort, 5878 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 5879 _bcmFieldSliceSelEgrClassF4, 0, 5880 2, 12 5881 ); 5882 5883 /* L3_PKT_TYPE */ 5884 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyIpType, 5885 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 5886 _bcmFieldSliceSelEgrMdlKey4, 0, 5887 206, 5); 5888 /* MDL */ 5889 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyOamMdl, 5890 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 5891 _bcmFieldSliceSelEgrMdlKey4, 1, 5892 206, 3); 5893 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyForwardingVlanId, 5894 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 211, 12); 5895 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVrf, 5896 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 211, 13); 5897 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVpn, 5898 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 211, 13); 5899 5900 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyForwardingType, 5901 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 224, 2); 5902 5903 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDrop, 5904 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY4, 226, 1); 5905 5906 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4Ports, 5907 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 0, 1); 5908 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIntPriority, 5909 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 1, 4); 5910 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyColor, 5911 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 5, 2); 5912 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpFrag, 5913 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 7, 2); 5914 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTcpControl, 5915 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 9, 6); 5916 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4DstPort, 5917 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 15, 16); 5918 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4SrcPort, 5919 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 31, 16); 5920 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIcmpTypeCode, 5921 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 31, 16); 5922 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTtl, 5923 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 47, 8); 5924 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol, 5925 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 55, 8); 5926 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstIp, 5927 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 63, 32); 5928 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifySrcIp, 5929 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 95, 32); 5930 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTos, 5931 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 127, 8); 5932 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyHiGigProxy, 5933 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 135, 1); 5934 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyHiGig, 5935 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 136, 1); 5936 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanId, 5937 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 137, 12); 5938 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInPort, 5939 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 149, 7); 5940 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3Routable, 5941 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 156, 1); 5942 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMirrorCopy, 5943 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 157, 1); 5944 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan, 5945 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 158, 16); 5946 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 5947 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 158, 12); 5948 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi, 5949 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 170, 1); 5950 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri, 5951 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 171, 3); 5952 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVlanFormat, 5953 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 174, 2); 5954 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstHiGig, 5955 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 176, 1); 5956 5957 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstPort, 5958 _bcmFieldDevSelDisable, 0, 5959 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 5960 _bcmFieldSliceSelEgrDestPortF1, 1, 5961 0, 5962 185, 7, /* DST_PORT */ 5963 177, 8, /* DST_MODID */ 5964 0, 0, 5965 0 5966 ); 5967 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassPort, 5968 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 5969 _bcmFieldSliceSelEgrDestPortF1, 0, 5970 177, 8 5971 ); 5972 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyOutPort, 5973 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 5974 _bcmFieldSliceSelEgrDestPortF1, 0, 5975 185, 7 5976 ); 5977 5978 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpType, 5979 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 192, 5); 5980 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL2, 5981 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 5982 _bcmFieldSliceSelEgrClassF1, 0, 5983 197, 13 5984 ); 5985 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL3, 5986 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 5987 _bcmFieldSliceSelEgrClassF1, 0, 5988 197, 13 5989 ); 5990 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField, 5991 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 5992 _bcmFieldSliceSelEgrClassF1, 0, 5993 197, 13 5994 ); 5995 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField, 5996 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 5997 _bcmFieldSliceSelEgrClassF1, 0, 5998 197, 13 5999 ); 6000 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL2, 6001 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 6002 _bcmFieldSliceSelEgrClassF1, 0, 6003 197, 13 6004 ); 6005 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL3, 6006 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 6007 _bcmFieldSliceSelEgrClassF1, 0, 6008 197, 13 6009 ); 6010 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassL2, 6011 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 6012 _bcmFieldSliceSelEgrClassF1, 0, 6013 197, 13 6014 ); 6015 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassL3, 6016 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 6017 _bcmFieldSliceSelEgrClassF1, 0, 6018 197, 13 6019 ); 6020 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyEgressClassTrill, 6021 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 6022 _bcmFieldSliceSelEgrClassF1, 0, 6023 197, 12 6024 ); 6025 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyEgressClassL2Gre, 6026 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 6027 _bcmFieldSliceSelEgrClassF1, 0, 6028 197, 12 6029 ); 6030 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyEgressClassVxlan, 6031 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 6032 _bcmFieldSliceSelEgrClassF1, 0, 6033 197, 12 6034 ); 6035 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyIngressClassField, 6036 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 6037 _bcmFieldSliceSelEgrClassF1, 0, 6038 197, 13 6039 ); 6040 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 6041 bcmFieldQualifyIngressInterfaceClassPort, 6042 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 6043 _bcmFieldSliceSelEgrClassF1, 0, 6044 197, 13 6045 ); 6046 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 6047 bcmFieldQualifyIngressInterfaceClassVPort, 6048 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 6049 _bcmFieldSliceSelEgrClassF1, 0, 6050 197, 13 6051 ); 6052 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 6053 bcmFieldQualifyInterfaceClassVPort, 6054 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 6055 _bcmFieldSliceSelEgrClassF1, 0, 6056 197, 12 6057 ); 6058 6059 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyForwardingVlanId, 6060 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 210, 12); 6061 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVrf, 6062 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 210, 13); 6063 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVpn, 6064 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 210, 13); 6065 6066 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyForwardingType, 6067 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 223, 2); 6068 6069 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDrop, 6070 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 225, 1); 6071 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIp4, 6072 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1, 0, 0); 6073 6074 /* KEY1 without v4 specific fields. */ 6075 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4Ports, 6076 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 0, 1); 6077 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIntPriority, 6078 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 1, 4); 6079 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyColor, 6080 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 5, 2); 6081 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTcpControl, 6082 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 9, 6); 6083 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4DstPort, 6084 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 15, 16); 6085 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4SrcPort, 6086 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 31, 16); 6087 6088 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIcmpTypeCode, 6089 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 31, 16); 6090 6091 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTtl, 6092 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 47, 8); 6093 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol, 6094 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 55, 8); 6095 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTos, 6096 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 127, 8); 6097 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyHiGigProxy, 6098 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 135, 1); 6099 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyHiGig, 6100 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 136, 1); 6101 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanId, 6102 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 137, 12); 6103 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInPort, 6104 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 149, 7); 6105 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3Routable, 6106 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 156, 1); 6107 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMirrorCopy, 6108 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 157, 1); 6109 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan, 6110 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 158, 16); 6111 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 6112 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 158, 12); 6113 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi, 6114 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 170, 1); 6115 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri, 6116 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 171, 3); 6117 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVlanFormat, 6118 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 174, 2); 6119 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstHiGig, 6120 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 176, 1); 6121 6122 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstPort, 6123 _bcmFieldDevSelDisable, 0, 6124 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 6125 _bcmFieldSliceSelEgrDestPortF1, 1, 6126 0, 6127 176, 7, /* DST_PORT */ 6128 168, 8, /* DST_MODID */ 6129 0, 0, 6130 0 6131 ); 6132 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassPort, 6133 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 6134 _bcmFieldSliceSelEgrDestPortF1, 0, 6135 177, 8 6136 ); 6137 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyOutPort, 6138 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 6139 _bcmFieldSliceSelEgrDestPortF1, 0, 6140 185, 7 6141 ); 6142 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpType, 6143 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 192, 5); 6144 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL2, 6145 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 6146 _bcmFieldSliceSelEgrClassF1, 0, 6147 197, 13); 6148 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL3, 6149 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 6150 _bcmFieldSliceSelEgrClassF1, 0, 6151 197, 13); 6152 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField, 6153 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 6154 _bcmFieldSliceSelEgrClassF1, 0, 6155 197, 13); 6156 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField, 6157 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 6158 _bcmFieldSliceSelEgrClassF1, 0, 6159 197, 13); 6160 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL2, 6161 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 6162 _bcmFieldSliceSelEgrClassF1, 0, 6163 197, 13); 6164 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL3, 6165 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 6166 _bcmFieldSliceSelEgrClassF1, 0, 6167 197, 13); 6168 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassL2, 6169 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 6170 _bcmFieldSliceSelEgrClassF1, 0, 6171 197, 13); 6172 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassL3, 6173 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 6174 _bcmFieldSliceSelEgrClassF1, 0, 6175 197, 13); 6176 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyEgressClassTrill, 6177 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 6178 _bcmFieldSliceSelEgrClassF1, 0, 6179 197, 12); 6180 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyEgressClassL2Gre, 6181 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 6182 _bcmFieldSliceSelEgrClassF1, 0, 6183 197, 12); 6184 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyEgressClassVxlan, 6185 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 6186 _bcmFieldSliceSelEgrClassF1, 0, 6187 197, 12); 6188 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyIngressClassField, 6189 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 6190 _bcmFieldSliceSelEgrClassF1, 0, 6191 197, 13); 6192 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 6193 bcmFieldQualifyIngressInterfaceClassPort, 6194 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 6195 _bcmFieldSliceSelEgrClassF1, 0, 6196 197, 13); 6197 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 6198 bcmFieldQualifyIngressInterfaceClassVPort, 6199 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 6200 _bcmFieldSliceSelEgrClassF1, 0, 6201 197, 13); 6202 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 6203 bcmFieldQualifyInterfaceClassVPort, 6204 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 6205 _bcmFieldSliceSelEgrClassF1, 0, 6206 197, 12); 6207 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyForwardingVlanId, 6208 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 210, 12); 6209 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVrf, 6210 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 210, 13); 6211 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVpn, 6212 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 210, 13); 6213 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyForwardingType, 6214 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 223, 2); 6215 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDrop, 6216 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY1_NO_V4, 225, 1); 6217 6218 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4Ports, 6219 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 0, 1); 6220 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpProtocol, 6221 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 1, 8); 6222 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcIp6, 6223 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 6224 _bcmFieldSliceIp6AddrSelect, 6225 _BCM_FIELD_EGRESS_SLICE_V6_KEY_MODE_SIP6, 6226 9, 128); 6227 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstIp6, 6228 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 6229 _bcmFieldSliceIp6AddrSelect, 6230 _BCM_FIELD_EGRESS_SLICE_V6_KEY_MODE_DIP6, 6231 9, 128); 6232 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcIp6High, 6233 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 6234 _bcmFieldSliceIp6AddrSelect, 6235 _BCM_FIELD_EGRESS_SLICE_V6_KEY_MODE_SIP_DIP_64, 6236 9, 64); 6237 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstIp6High, 6238 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 6239 _bcmFieldSliceIp6AddrSelect, 6240 _BCM_FIELD_EGRESS_SLICE_V6_KEY_MODE_SIP_DIP_64, 6241 73, 64); 6242 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTos, 6243 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 137, 8); 6244 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyHiGigProxy, 6245 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 145, 1); 6246 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyHiGig, 6247 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 146, 1); 6248 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanId, 6249 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 147, 12); 6250 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInPort, 6251 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 159, 7); 6252 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3Routable, 6253 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 166, 1); 6254 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMirrorCopy, 6255 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 167, 1); 6256 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan, 6257 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 168, 16); 6258 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 6259 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 168, 12); 6260 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi, 6261 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 180, 1); 6262 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri, 6263 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 181, 3); 6264 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVlanFormat, 6265 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 184, 2); 6266 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstHiGig, 6267 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 186, 1); 6268 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassPort, 6269 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 187, 8); 6270 6271 _FP_QUAL_EXT_ADD(unit, stage_fc, bcmFieldQualifyDstPort, 6272 _bcmFieldDevSelDisable, 0, 6273 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 6274 _bcmFieldSliceSelEgrClassF2, 5, 6275 0, 6276 195, 7, /* DST_PORT */ 6277 187, 8, /* DST_MODID */ 6278 0, 0, 6279 0 6280 ); 6281 6282 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL2, 6283 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 6284 _bcmFieldSliceSelEgrClassF2, 0, 6285 195, 13 6286 ); 6287 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL3, 6288 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 6289 _bcmFieldSliceSelEgrClassF2, 0, 6290 195, 13 6291 ); 6292 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField, 6293 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 6294 _bcmFieldSliceSelEgrClassF2, 0, 6295 195, 13 6296 ); 6297 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField, 6298 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 6299 _bcmFieldSliceSelEgrClassF2, 0, 6300 195, 13 6301 ); 6302 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL2, 6303 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 6304 _bcmFieldSliceSelEgrClassF2, 0, 6305 195, 13 6306 ); 6307 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL3, 6308 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 6309 _bcmFieldSliceSelEgrClassF2, 0, 6310 195, 13 6311 ); 6312 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassL2, 6313 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 6314 _bcmFieldSliceSelEgrClassF2, 0, 6315 195, 13 6316 ); 6317 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassL3, 6318 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 6319 _bcmFieldSliceSelEgrClassF2, 0, 6320 195, 13 6321 ); 6322 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyOutPort, 6323 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 6324 _bcmFieldSliceSelEgrClassF2, 3, 6325 195, 7 6326 ); 6327 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyIngressClassField, 6328 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 6329 _bcmFieldSliceSelEgrClassF2, 0, 6330 195, 13 6331 ); 6332 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 6333 bcmFieldQualifyIngressInterfaceClassPort, 6334 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 6335 _bcmFieldSliceSelEgrClassF2, 0, 6336 195, 13 6337 ); 6338 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 6339 bcmFieldQualifyIngressInterfaceClassVPort, 6340 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 6341 _bcmFieldSliceSelEgrClassF2, 0, 6342 195, 13 6343 ); 6344 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, 6345 bcmFieldQualifyInterfaceClassVPort, 6346 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 6347 _bcmFieldSliceSelEgrClassF2, 0, 6348 195, 12 6349 ); 6350 6351 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpType, 6352 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 208, 5); 6353 6354 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyForwardingVlanId, 6355 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 213, 12); 6356 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVrf, 6357 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 213, 13); 6358 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVpn, 6359 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 213, 13); 6360 6361 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyForwardingType, 6362 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 226, 2); 6363 6364 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDrop, 6365 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 228, 1); 6366 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIp6, 6367 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY2, 0, 0); 6368 6369 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4Ports, 6370 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 0, 1); 6371 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIntPriority, 6372 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 1, 4); 6373 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyColor, 6374 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 5, 2); 6375 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpFrag, 6376 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 7, 2); 6377 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTcpControl, 6378 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 9, 6); 6379 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4DstPort, 6380 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 15, 16); 6381 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL4SrcPort, 6382 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 31, 16); 6383 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIcmpTypeCode, 6384 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 31, 16); 6385 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyTtl, 6386 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 47, 8); 6387 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstIp6, 6388 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 55, 128); 6389 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyExtensionHeaderSubCode, 6390 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 183, 8); 6391 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyExtensionHeaderType, 6392 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 191, 8); 6393 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIpType, 6394 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 199, 5); 6395 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyEgressClassTrill, 6396 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 6397 _bcmFieldSliceSelEgrClassF3, 2, 6398 204, 12); 6399 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyEgressClassL2Gre, 6400 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 6401 _bcmFieldSliceSelEgrClassF3, 2, 6402 204, 12); 6403 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyEgressClassVxlan, 6404 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 6405 _bcmFieldSliceSelEgrClassF3, 2, 6406 204, 12); 6407 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDrop, 6408 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 216, 1); 6409 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyIp6, 6410 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY3, 0, 0); 6411 6412 #if 0 6413 /* FCOE EFP_KEY5 support is not enabled in SDK. 6414 Uncomment this block when support is added */ 6415 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyHiGigProxy, 6416 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 126, 1); 6417 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyHiGig, 6418 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 127, 1); 6419 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInnerVlanId, 6420 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 128, 12); 6421 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInPort, 6422 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 140, 7); 6423 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyL3Routable, 6424 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 147, 1); 6425 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyMirrorCopy, 6426 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 148, 1); 6427 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlan, 6428 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 149, 16); 6429 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanId, 6430 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 149, 12); 6431 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanCfi, 6432 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 161, 1); 6433 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOuterVlanPri, 6434 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 162, 3); 6435 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyVlanFormat, 6436 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 165, 2); 6437 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDstHiGig, 6438 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 167, 1); 6439 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassPort, 6440 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 168, 8); 6441 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyOutPort, 6442 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 176, 7); 6443 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyDrop, 6444 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 183, 1); 6445 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL2, 6446 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 6447 _bcmFieldSliceSelEgrClassF1, 0, 6448 200, 13 6449 ); 6450 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassL3, 6451 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 6452 _bcmFieldSliceSelEgrClassF1, 0, 6453 200, 13 6454 ); 6455 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassField, 6456 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 6457 _bcmFieldSliceSelEgrClassF1, 0, 6458 200, 13 6459 ); 6460 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifySrcClassField, 6461 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 6462 _bcmFieldSliceSelEgrClassF1, 0, 6463 200, 13 6464 ); 6465 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL2, 6466 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 6467 _bcmFieldSliceSelEgrClassF1, 0, 6468 200, 13 6469 ); 6470 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyDstClassL3, 6471 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 6472 _bcmFieldSliceSelEgrClassF1, 0, 6473 200, 13 6474 ); 6475 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassL2, 6476 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 6477 _bcmFieldSliceSelEgrClassF1, 0, 6478 200, 13 6479 ); 6480 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyInterfaceClassL3, 6481 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 6482 _bcmFieldSliceSelEgrClassF1, 0, 6483 200, 13 6484 ); 6485 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyEgressClassTrill, 6486 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 6487 _bcmFieldSliceSelEgrClassF1, 3, 6488 200, 12); 6489 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyEgressClassL2Gre, 6490 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 6491 _bcmFieldSliceSelEgrClassF1, 3, 6492 200, 12); 6493 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyIngressClassField, 6494 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 6495 _bcmFieldSliceSelEgrClassF1, 0, 6496 200, 13 6497 ); 6498 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyIngressInterfaceClassPort, 6499 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 6500 _bcmFieldSliceSelEgrClassF1, 0, 6501 200, 13 6502 ); 6503 _FP_QUAL_TWO_SLICE_SEL_ADD(unit, stage_fc, bcmFieldQualifyIngressInterfaceClassVPort, 6504 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 6505 _bcmFieldSliceSelEgrClassF1, 0, 6506 200, 13 6507 ); 6508 _FP_QUAL_ADD(unit, stage_fc, bcmFieldQualifyForwardingType, 6509 _bcmFieldSliceSelFpf3, _BCM_FIELD_EFP_KEY5, 198, 2); 6510 #endif 6511 6512 return (BCM_E_NONE); 6513 } 6514 6515 /* 6516 * Function: 6517 * _field_td2plus_qualifiers_init 6518 * Purpose: 6519 * Initialize device qaualifiers select codes & offsets 6520 * Parameters: 6521 * unit - (IN) BCM device number. 6522 * stage_fc - (IN) Field Processor stage control structure. 6523 * 6524 * Returns: 6525 * BCM_E_NONE 6526 * Notes: 6527 */ 6528 int 6529 _field_td2plus_qualifiers_init(int unit, _field_stage_t *stage_fc) 6530 { 6531 /* Allocated stage qualifiers configuration array. */ 6532 _FP_XGS3_ALLOC(stage_fc->f_qual_arr, 6533 (_bcmFieldQualifyCount * sizeof(_bcm_field_qual_info_t *)), 6534 "Field qualifiers"); 6535 if (stage_fc->f_qual_arr == 0) { 6536 return (BCM_E_MEMORY); 6537 } 6538 6539 switch (stage_fc->stage_id) { 6540 case _BCM_FIELD_STAGE_LOOKUP: 6541 return (_field_td2plus_lookup_qualifiers_init(unit, stage_fc)); 6542 case _BCM_FIELD_STAGE_INGRESS: 6543 return (_field_td2plus_ingress_qualifiers_init(unit, stage_fc)); 6544 case _BCM_FIELD_STAGE_EGRESS: 6545 return (_field_td2plus_egress_qualifiers_init(unit, stage_fc)); 6546 default: 6547 ; 6548 } 6549 6550 sal_free(stage_fc->f_qual_arr); 6551 return (BCM_E_INTERNAL); 6552 } 6553 6554 /* 6555 * Function: 6556 * _field_oam_stat_action_node_get 6557 * Description: 6558 * Get Oam Stat action node in Field Processor entry list. 6559 * Parameters: 6560 * unit - (IN) BCM device number. 6561 * f_ent - (IN) Field entry pointer. 6562 * oam_stat_action - (IN) Oam Stat Action Structure. 6563 * oam_stat_action_node - (IN) Oam Stat Action Node. 6564 * Returns: 6565 * BCM_E_XXX 6566 */ 6567 int _field_oam_stat_action_node_get (int unit, _field_entry_t *f_ent, 6568 bcm_field_oam_stat_action_t *oam_stat_action, 6569 _field_oam_stat_action_t **oam_stat_get_node) 6570 { 6571 int rv = BCM_E_NOT_FOUND; /* Return status */ 6572 _field_oam_stat_action_t *oam_stat_node; /* Oam stat Node */ 6573 bcm_field_oam_stat_action_t *oam_action; /* Oam stat action */ 6574 6575 /* Input Check */ 6576 if ((f_ent == NULL) || (oam_stat_action == NULL) 6577 || (oam_stat_get_node == NULL)) { 6578 return BCM_E_PARAM; 6579 } 6580 6581 oam_stat_node = f_ent->field_oam_stat_action; 6582 6583 /* If node is found update the get_node and return */ 6584 while (oam_stat_node != NULL) { 6585 oam_action = oam_stat_node->oam_stat_action; 6586 if (oam_action != NULL) { 6587 if (oam_action->stat_object == oam_stat_action->stat_object) { 6588 *oam_stat_get_node = oam_stat_node; 6589 return BCM_E_NONE; 6590 } 6591 } 6592 oam_stat_node = oam_stat_node->next; 6593 } 6594 6595 return rv; 6596 } 6597 6598 /* 6599 * Function: 6600 * _bcm_field_oam_stat_action_search 6601 * Description: 6602 * Search Oam Stat action in Field Processor entry list. 6603 * Parameters: 6604 * unit - (IN) BCM device number. 6605 * f_ent - (IN) Field entry pointer. 6606 * oam_stat_action - (IN) Oam Stat Action Structure. 6607 * Returns: 6608 * BCM_E_XXX 6609 */ 6610 int _field_oam_stat_action_search (int unit, _field_entry_t *f_ent, 6611 bcm_field_oam_stat_action_t *oam_stat_action) 6612 { 6613 int rv = BCM_E_NOT_FOUND; /* Return status */ 6614 _field_oam_stat_action_t *oam_stat_node; /* Oam stat Node */ 6615 bcm_field_oam_stat_action_t *oam_action; /* Oam stat action */ 6616 6617 /* Input Check */ 6618 if ((f_ent == NULL) || (oam_stat_action == NULL)) { 6619 return BCM_E_PARAM; 6620 } 6621 6622 oam_stat_node = f_ent->field_oam_stat_action; 6623 6624 /* Return stat nodes that are valid, if valid flag is not set 6625 * It means it is marked for removal */ 6626 while (oam_stat_node != NULL) { 6627 oam_action = oam_stat_node->oam_stat_action; 6628 if (oam_action != NULL) { 6629 if ((oam_action->stat_object == oam_stat_action->stat_object) 6630 && (oam_stat_node->flags & _FP_OAM_STAT_ACTION_VALID)) { 6631 return BCM_E_EXISTS; 6632 } 6633 } 6634 oam_stat_node = oam_stat_node->next; 6635 } 6636 6637 return rv; 6638 } 6639 6640 /* 6641 * Function: 6642 * _field_oam_lm_stat_pool_id_get 6643 * Description: 6644 * Return Flex Stat Pool Id from Stat Object and Stat Mode Id. 6645 * Parameters: 6646 * unit - (IN) BCM device number. 6647 * stat_object - (IN) Flex Stat Object. 6648 * stat_mode_id - (IN) Flex Stat Mode Id. 6649 * flex_stat_pool_id - (OUT) Flex Stat Pool Id. 6650 * Returns: 6651 * BCM_E_XXX 6652 */ 6653 int _field_oam_lm_stat_pool_id_get (int unit, bcm_stat_object_t stat_object, 6654 uint32 stat_mode_id, int8 *flex_stat_pool_id) 6655 { 6656 int rv = BCM_E_NONE; 6657 uint32 pool_id; 6658 int8 flex_pool_id; 6659 6660 if (flex_stat_pool_id == NULL) { 6661 return BCM_E_PARAM; 6662 } 6663 rv = _bcm_esw_stat_object_pool_num_get(unit, stat_object, &pool_id); 6664 if (BCM_SUCCESS(rv)) { 6665 flex_pool_id = pool_id; 6666 sal_memcpy (flex_stat_pool_id, &flex_pool_id, sizeof (int8)); 6667 } 6668 return rv; 6669 } 6670 6671 /* 6672 * Function: 6673 * _field_oam_stat_action_pool_instance_reserve 6674 * Description: 6675 * Reserve Oam Stat Pool Instance. 6676 * Parameters: 6677 * unit - (IN) BCM device number. 6678 * pool_instance - (IN) Oam Stat Action Pool Instance. 6679 * Returns: 6680 * BCM_E_XXX 6681 */ 6682 int _field_oam_stat_action_pool_instance_reserve (int unit, 6683 _field_entry_t *f_ent, int8 *instance, 6684 _field_oam_stat_pool_config_t config) 6685 { 6686 int idx = 0; 6687 uint8 *local_pool_instance = NULL; 6688 6689 if ((config < 0) || (config > _bcmFieldOamStatPoolInstanceCount)) { 6690 return BCM_E_PARAM; 6691 } 6692 6693 if ((instance == NULL) && (config != _bcmFieldOamStatPoolInstanceFreeAll)){ 6694 return BCM_E_PARAM; 6695 } 6696 6697 if (f_ent == NULL) { 6698 return BCM_E_PARAM; 6699 } 6700 6701 _FP_XGS3_ALLOC(local_pool_instance, sizeof (uint8), 6702 "local_pool_instance"); 6703 if (local_pool_instance == NULL) { 6704 return BCM_E_PARAM; 6705 } 6706 6707 sal_memcpy (local_pool_instance, 6708 &(f_ent->oam_pool_instance), sizeof(uint8)); 6709 6710 switch (config) { 6711 case _bcmFieldOamStatPoolInstanceReserve: 6712 /* Reserve from one of the 3 instances */ 6713 for (idx = 0; idx <= 2; idx++) { 6714 if (SHR_BITGET(local_pool_instance, idx) == 0) { 6715 *instance = idx; 6716 SHR_BITSET(local_pool_instance, idx); 6717 f_ent->oam_pool_instance = *local_pool_instance; 6718 sal_free (local_pool_instance); 6719 return BCM_E_NONE; 6720 } 6721 } 6722 break; 6723 case _bcmFieldOamStatPoolInstanceFree: 6724 /* Free the pool instance */ 6725 if ((*instance < 0) || (*instance > 2)) { 6726 sal_free (local_pool_instance); 6727 return BCM_E_PARAM; 6728 } 6729 6730 SHR_BITCLR(local_pool_instance, (*instance)); 6731 f_ent->oam_pool_instance = *local_pool_instance; 6732 sal_free (local_pool_instance); 6733 return BCM_E_NONE; 6734 break; 6735 6736 case _bcmFieldOamStatPoolInstanceFreeAll: 6737 f_ent->oam_pool_instance = 0; 6738 sal_free (local_pool_instance); 6739 return BCM_E_NONE; 6740 break; 6741 6742 case _bcmFieldOamStatPoolInstanceGet: 6743 /* Return Pool Instance Bitmap */ 6744 *instance = f_ent->oam_pool_instance; 6745 sal_free (local_pool_instance); 6746 return BCM_E_NONE; 6747 break; 6748 6749 case _bcmFieldOamStatPoolInstanceCount: 6750 sal_free (local_pool_instance); 6751 return BCM_E_PARAM; 6752 6753 /* Will never hit default case */ 6754 } 6755 6756 sal_free (local_pool_instance); 6757 return BCM_E_FULL; 6758 } 6759 6760 /* 6761 * Function: 6762 * _bcm_field_oam_stat_action_params_check 6763 * Description: 6764 * Check Oam Stat action Params 6765 * Parameters: 6766 * unit - (IN) BCM device number. 6767 * oam_stat_action - (IN) Oam Stat Action Structure. 6768 * Returns: 6769 * BCM_E_XXX 6770 */ 6771 6772 int _bcm_field_oam_stat_action_params_check (int unit, 6773 bcm_field_oam_stat_action_t *oam_stat_action) 6774 { 6775 bcm_stat_flex_direction_t direction; 6776 6777 if (oam_stat_action == NULL) { 6778 return BCM_E_PARAM; 6779 } 6780 6781 /* Check Stat Object */ 6782 if ((oam_stat_action->stat_object < 0) 6783 || (oam_stat_action->stat_object >= bcmStatObjectMaxValue)) { 6784 return BCM_E_PARAM; 6785 } 6786 /* Validate object */ 6787 BCM_IF_ERROR_RETURN( 6788 _bcm_esw_stat_validate_object(unit, 6789 oam_stat_action->stat_object, 6790 &direction)); 6791 /* Check Stat Mode */ 6792 if (direction == bcmStatFlexDirectionIngress) { 6793 if ((oam_stat_action->stat_mode_id & BCM_STAT_GROUP_MODE_ID_OAM_MASK) 6794 != BCM_STAT_GROUP_MODE_ID_OAM_SUFFIX) { 6795 return BCM_E_PARAM; 6796 } 6797 } 6798 6799 /* Check Stat Action */ 6800 if ((oam_stat_action->action < 0) 6801 || (oam_stat_action->action >= bcmFieldStatActionCount) 6802 || (oam_stat_action->action == bcmFieldStatActionIncrement)) { 6803 return BCM_E_PARAM; 6804 } 6805 6806 return BCM_E_NONE; 6807 } 6808 6809 /* 6810 * Function: 6811 * _bcm_field_oam_stat_action_add 6812 * Description: 6813 * Add Oam Stat action to Field Processor entry. 6814 * Parameters: 6815 * unit - (IN) BCM device number. 6816 * entry - (IN) Field entry id. 6817 * oam_stat_action - (IN) Oam Stat Action Structure. 6818 * Returns: 6819 * BCM_E_XXX 6820 */ 6821 int _bcm_field_oam_stat_action_add (int unit, bcm_field_entry_t entry, 6822 bcm_field_oam_stat_action_t *oam_stat_action) 6823 { 6824 int rv = BCM_E_NONE; /* Return Value */ 6825 _field_oam_stat_action_t *oam_stat_node = NULL; /* Oam Stat Action Node */ 6826 int8 oam_lm_stat_pool_id = -1; /* Oam Lm Stat Pool Id */ 6827 int8 pool_instance = -1; /* Oam Stat Pool Instance */ 6828 _field_entry_t *f_ent; /* Field entry pointer */ 6829 6830 if (oam_stat_action == NULL) { 6831 return BCM_E_PARAM; 6832 } 6833 6834 /* Input Params Check */ 6835 BCM_IF_ERROR_RETURN((_bcm_field_oam_stat_action_params_check(unit, 6836 oam_stat_action))); 6837 /* Get entry info. */ 6838 BCM_IF_ERROR_RETURN 6839 (_field_entry_get(unit, entry, _FP_ENTRY_PRIMARY, &f_ent)); 6840 6841 /* Check for conflicting actions */ 6842 if (f_ent->flags & _FP_ENTRY_OAM_STAT_NOT_ALLOWED) { 6843 #ifdef BROADCOM_DEBUG 6844 LOG_ERROR(BSL_LS_BCM_FP, 6845 (BSL_META_U(unit, 6846 "FP(unit %d) Error: Oam Stat Action conflicts with" 6847 " Nat Actions in entry=%d\n"), unit, entry )); 6848 #endif 6849 return (BCM_E_CONFIG); 6850 } 6851 6852 /* Check for duplicate stat action already existing */ 6853 rv = _field_oam_stat_action_search (unit, f_ent, oam_stat_action); 6854 if (rv == BCM_E_EXISTS) { 6855 return rv ; 6856 } 6857 6858 /* Get Flex Stat PoolId from the Stat Object and Stat Mode Id */ 6859 BCM_IF_ERROR_RETURN (_field_oam_lm_stat_pool_id_get (unit, 6860 oam_stat_action->stat_object, oam_stat_action->stat_mode_id, 6861 &oam_lm_stat_pool_id)); 6862 6863 /* Reserve the free pool instance from one of 3 instances */ 6864 rv = _field_oam_stat_action_pool_instance_reserve (unit, f_ent, 6865 &pool_instance, _bcmFieldOamStatPoolInstanceReserve); 6866 if (BCM_FAILURE(rv)) { 6867 return rv; 6868 } 6869 6870 /* Allocate memory and copy the input params */ 6871 _FP_XGS3_ALLOC(oam_stat_node, sizeof (_field_oam_stat_action_t), 6872 "field oam stat action node"); 6873 if (oam_stat_node == NULL) { 6874 LOG_ERROR(BSL_LS_BCM_FP, 6875 (BSL_META_U(unit, 6876 "FP(unit %d) Error: allocation failure for " 6877 "oam_stat_action_node\n"), unit)); 6878 rv = _field_oam_stat_action_pool_instance_reserve (unit, f_ent, 6879 &pool_instance, _bcmFieldOamStatPoolInstanceFree); 6880 return (BCM_E_MEMORY); 6881 } 6882 6883 /* Allocate memory and copy the input params */ 6884 _FP_XGS3_ALLOC(oam_stat_node->oam_stat_action, 6885 sizeof (bcm_field_oam_stat_action_t), 6886 "field oam stat action params"); 6887 if (oam_stat_node->oam_stat_action == NULL) { 6888 LOG_ERROR(BSL_LS_BCM_FP, 6889 (BSL_META_U(unit, 6890 "FP(unit %d) Error: allocation failure for " 6891 "oam_stat_action_node\n"), unit)); 6892 rv = _field_oam_stat_action_pool_instance_reserve (unit, f_ent, 6893 &pool_instance, _bcmFieldOamStatPoolInstanceFree); 6894 sal_free (oam_stat_node); 6895 return (BCM_E_MEMORY); 6896 } 6897 6898 6899 /* Copy the input parameters and insert to linked list */ 6900 sal_memcpy (oam_stat_node->oam_stat_action, oam_stat_action, 6901 sizeof (bcm_field_oam_stat_action_t)); 6902 oam_stat_node->flex_pool_id = oam_lm_stat_pool_id; 6903 oam_stat_node->pool_instance = pool_instance; 6904 oam_stat_node->next = NULL; 6905 oam_stat_node->flags |= _FP_OAM_STAT_ACTION_VALID; 6906 oam_stat_node->flags |= _FP_OAM_STAT_ACTION_DIRTY; 6907 6908 /* Add node to link list */ 6909 _FP_LINKLIST_INSERT(&(f_ent->field_oam_stat_action), oam_stat_node, &rv); 6910 if (BCM_FAILURE(rv)) { 6911 sal_free (oam_stat_node->oam_stat_action); 6912 sal_free (oam_stat_node); 6913 rv = _field_oam_stat_action_pool_instance_reserve (unit, f_ent, 6914 &pool_instance, _bcmFieldOamStatPoolInstanceFree); 6915 return rv; 6916 } 6917 6918 /* Update entry flags */ 6919 if (0 == (f_ent->flags & _FP_ENTRY_DIRTY)) { 6920 f_ent->flags |= _FP_ENTRY_POLICY_TABLE_ONLY_DIRTY; 6921 } 6922 6923 /* If oam action is present update entry flag 6924 * to say oam stat is valid. Used to check conflicts 6925 * with Nat Actions */ 6926 f_ent->flags |= _FP_ENTRY_DIRTY; 6927 rv = _field_oam_stat_action_pool_instance_reserve (unit, f_ent, 6928 &pool_instance, _bcmFieldOamStatPoolInstanceGet); 6929 if (BCM_FAILURE (rv)) { 6930 sal_free (oam_stat_node->oam_stat_action); 6931 sal_free (oam_stat_node); 6932 rv = _field_oam_stat_action_pool_instance_reserve (unit, f_ent, 6933 &pool_instance, _bcmFieldOamStatPoolInstanceFree); 6934 return rv; 6935 } 6936 6937 if (pool_instance != 0) { 6938 f_ent->flags |= _FP_ENTRY_OAM_STAT_VALID; 6939 } 6940 6941 return BCM_E_NONE; 6942 } 6943 6944 /* 6945 * Function: 6946 * _bcm_field_oam_stat_action_delete 6947 * Description: 6948 * Delete Oam Stat action from Field Processor entry. 6949 * Parameters: 6950 * unit - (IN) BCM device number. 6951 * entry - (IN) Field entry id. 6952 * oam_stat_action - (IN) Oam Stat Action Structure. 6953 * Returns: 6954 * BCM_E_XXX 6955 */ 6956 int _bcm_field_oam_stat_action_delete (int unit, bcm_field_entry_t entry, 6957 bcm_field_oam_stat_action_t *oam_stat_action) 6958 { 6959 _field_entry_t *f_ent; /* Field entry pointer. */ 6960 _field_oam_stat_action_t *oam_stat_node = NULL; /* Oam Stat Action Node. */ 6961 int rv = BCM_E_NONE; /* Return Value. */ 6962 int8 pool_instance = -1; /* Pool Instance */ 6963 6964 /* Check input parameters */ 6965 if (oam_stat_action == NULL) { 6966 return BCM_E_PARAM; 6967 } 6968 6969 /* Get entry info. */ 6970 BCM_IF_ERROR_RETURN 6971 (_field_entry_get(unit, entry, _FP_ENTRY_PRIMARY, &f_ent)); 6972 6973 /* Check for stat action already existing */ 6974 rv = _field_oam_stat_action_search (unit, f_ent, oam_stat_action); 6975 if (rv == BCM_E_NOT_FOUND) { 6976 return rv; 6977 } 6978 6979 /* Get stat action node and update flag as dirty */ 6980 rv = _field_oam_stat_action_node_get (unit, f_ent, 6981 oam_stat_action, &oam_stat_node); 6982 if (BCM_FAILURE(rv)) { 6983 return rv; 6984 } 6985 6986 /* Free the reserved flex stat pool index */ 6987 pool_instance = oam_stat_node->pool_instance; 6988 rv = _field_oam_stat_action_pool_instance_reserve (unit, f_ent, 6989 &pool_instance, _bcmFieldOamStatPoolInstanceFree); 6990 if (BCM_FAILURE(rv)) { 6991 return rv; 6992 } 6993 6994 /* Update the flags */ 6995 oam_stat_node->flags &= ~(_FP_OAM_STAT_ACTION_VALID); 6996 oam_stat_node->flags |= _FP_OAM_STAT_ACTION_DIRTY; 6997 6998 if (0 == (f_ent->flags & _FP_ENTRY_DIRTY)) { 6999 f_ent->flags |= _FP_ENTRY_POLICY_TABLE_ONLY_DIRTY; 7000 } 7001 7002 f_ent->flags |= _FP_ENTRY_DIRTY; 7003 7004 /* Free the Pool Instance reserved by the oam stat action */ 7005 rv = _field_oam_stat_action_pool_instance_reserve (unit, f_ent, 7006 &pool_instance, _bcmFieldOamStatPoolInstanceGet); 7007 if (BCM_FAILURE (rv)) { 7008 return rv; 7009 } 7010 7011 /* If there no pools reserved, reset the oam stat valid flag 7012 * so that nat actions can be configured */ 7013 if (pool_instance == 0) { 7014 f_ent->flags &= ~_FP_ENTRY_OAM_STAT_VALID; 7015 } 7016 7017 7018 return BCM_E_NONE; 7019 } 7020 7021 /* 7022 * Function: 7023 * _bcm_field_oam_stat_action_delete_all 7024 * Description: 7025 * Remove all Oam Stat action from Field Processor entry. 7026 * Parameters: 7027 * unit - (IN) BCM device number. 7028 * entry - (IN) Field entry id. 7029 * Returns: 7030 * BCM_E_XXX 7031 */ 7032 int _bcm_field_oam_stat_action_delete_all (int unit, bcm_field_entry_t entry) 7033 { 7034 _field_entry_t *f_ent; /* Field entry pointer. */ 7035 _field_oam_stat_action_t *oam_stat_node; /* Oam stat Node */ 7036 int8 pool_instance = -1; /* Pool Instance */ 7037 int rv = BCM_E_NONE; /* Return Value */ 7038 7039 /* Get entry info. */ 7040 BCM_IF_ERROR_RETURN 7041 (_field_entry_get(unit, entry, _FP_ENTRY_PRIMARY, &f_ent)); 7042 7043 oam_stat_node = f_ent->field_oam_stat_action; 7044 7045 while (oam_stat_node != NULL) { 7046 /* Free the reserved flex stat pool index */ 7047 pool_instance = oam_stat_node->pool_instance; 7048 rv = _field_oam_stat_action_pool_instance_reserve (unit, f_ent, 7049 &pool_instance, _bcmFieldOamStatPoolInstanceFree); 7050 if (BCM_FAILURE(rv)) { 7051 return rv; 7052 } 7053 7054 /* Update the flags */ 7055 oam_stat_node->flags &= ~(_FP_OAM_STAT_ACTION_VALID); 7056 oam_stat_node->flags |= _FP_OAM_STAT_ACTION_DIRTY; 7057 7058 if (0 == (f_ent->flags & _FP_ENTRY_DIRTY)) { 7059 f_ent->flags |= _FP_ENTRY_POLICY_TABLE_ONLY_DIRTY; 7060 } 7061 7062 f_ent->flags |= _FP_ENTRY_DIRTY; 7063 oam_stat_node = oam_stat_node->next; 7064 } 7065 7066 rv = _field_oam_stat_action_pool_instance_reserve (unit, f_ent, 7067 &pool_instance, _bcmFieldOamStatPoolInstanceGet); 7068 if (BCM_FAILURE (rv)) { 7069 return rv; 7070 } 7071 7072 /* If there no pools reserved, reset the oam stat valid flag 7073 * so that nat actions can be configured */ 7074 if (pool_instance == 0) { 7075 f_ent->flags &= ~_FP_ENTRY_OAM_STAT_VALID; 7076 } 7077 7078 return BCM_E_NONE; 7079 } 7080 7081 /* 7082 * Function: 7083 * _bcm_field_oam_stat_action_get 7084 * Description: 7085 * Get Oam Stat action from Field Processor entry. 7086 * Parameters: 7087 * unit - (IN) BCM device number. 7088 * entry - (IN) Field entry id. 7089 * oam_stat_action - (INOUT) Oam Stat Action Structure. 7090 * Returns: 7091 * BCM_E_XXX 7092 */ 7093 int _bcm_field_oam_stat_action_get (int unit, bcm_field_entry_t entry, 7094 bcm_field_oam_stat_action_t *oam_stat_action) 7095 { 7096 _field_entry_t *f_ent; /* Field entry pointer. */ 7097 _field_oam_stat_action_t *oam_stat_node; /* Oam stat Node. */ 7098 bcm_field_oam_stat_action_t *oam_action; /* Oam stat action. */ 7099 int rv = BCM_E_NONE; 7100 7101 /* Check input parameters */ 7102 if (oam_stat_action == NULL) { 7103 return BCM_E_PARAM; 7104 } 7105 7106 /* Get entry info. */ 7107 BCM_IF_ERROR_RETURN 7108 (_field_entry_get(unit, entry, _FP_ENTRY_PRIMARY, &f_ent)); 7109 7110 7111 /* Get stat action node and fill the get node */ 7112 rv = _field_oam_stat_action_node_get (unit, f_ent, 7113 oam_stat_action, &oam_stat_node); 7114 if (BCM_FAILURE(rv)) { 7115 return rv; 7116 } 7117 /* Search and fill the structure and return */ 7118 if (oam_stat_node != NULL) { 7119 oam_action = oam_stat_node->oam_stat_action; 7120 if (oam_action != NULL) { 7121 oam_stat_action->stat_object = oam_action->stat_object; 7122 oam_stat_action->stat_mode_id = oam_action->stat_mode_id; 7123 oam_stat_action->action = oam_action->action; 7124 return BCM_E_NONE; 7125 } 7126 } 7127 7128 return BCM_E_NOT_FOUND; 7129 } 7130 7131 /* 7132 * Function: 7133 * _bcm_field_oam_stat_action_get_all 7134 * Description: 7135 * Get all Oam Stat action from Field Processor entry. 7136 * Parameters: 7137 * unit - (IN) BCM device number. 7138 * entry - (IN) Field entry id. 7139 * oam_stat_max - (IN) Max number of Oam Stat actions. 7140 * oam_stat_action - (IN) Oam Stat Action Structure. 7141 * oam_stat_count - (INOUT) Number of oam stats configured. 7142 * Returns: 7143 * BCM_E_XXX 7144 */ 7145 int _bcm_field_oam_stat_action_get_all(int unit, 7146 bcm_field_entry_t entry, int oam_stat_max, 7147 bcm_field_oam_stat_action_t *oam_stat_action, 7148 int *oam_stat_count) 7149 { 7150 _field_entry_t *f_ent; /* Field entry pointer. */ 7151 _field_oam_stat_action_t *oam_stat_node; /* Oam stat Node. */ 7152 bcm_field_oam_stat_action_t *oam_action; /* Oam stat action. */ 7153 7154 if (oam_stat_count == NULL) { 7155 return BCM_E_PARAM; 7156 } 7157 7158 if ((oam_stat_max != 0) && (oam_stat_action == NULL)) { 7159 return BCM_E_PARAM; 7160 } 7161 7162 *oam_stat_count = 0; 7163 7164 /* Get entry info. */ 7165 BCM_IF_ERROR_RETURN 7166 (_field_entry_get(unit, entry, _FP_ENTRY_PRIMARY, &f_ent)); 7167 7168 oam_stat_node = f_ent->field_oam_stat_action; 7169 7170 /* Search and fill the structure and return */ 7171 /* If oam_stat_max equal zero, oam_stat_count being non-NULL is 7172 * expected to return the number of stat actions present in the entry 7173 * so that sufficient memory for the oam_action can be alloted by the user 7174 * and get_all api can be called again with non-zero oam_stat_max value 7175 */ 7176 while (oam_stat_node != NULL) { 7177 oam_action = oam_stat_node->oam_stat_action; 7178 if (oam_action != NULL) { 7179 if (oam_stat_max == 0) { 7180 (*oam_stat_count)++; 7181 } else { 7182 if (oam_stat_max >= (*oam_stat_count)) { 7183 sal_memcpy (&oam_stat_action[*oam_stat_count], 7184 oam_action, sizeof (bcm_field_oam_stat_action_t)); 7185 } 7186 (*oam_stat_count)++; 7187 } 7188 } 7189 oam_stat_node = oam_stat_node->next; 7190 } 7191 7192 return BCM_E_NONE; 7193 } 7194 7195 /* 7196 * Function: 7197 * _bcm_field_oam_stat_actions_destroy 7198 * Description: 7199 * Destroy all the stat actions 7200 * Parameters: 7201 * f_ent - (IN) Field entry Structure. 7202 * Returns: 7203 * BCM_E_XXX 7204 */ 7205 int _bcm_field_oam_stat_actions_destroy (int unit, _field_entry_t *f_ent) 7206 { 7207 _field_oam_stat_action_t *oam_stat_node; /* Oam stat Node. */ 7208 int rv = 0; 7209 7210 if (f_ent == NULL) { 7211 return BCM_E_PARAM; 7212 } 7213 7214 /* If there are no oam actions return E_NONE */ 7215 if (f_ent->field_oam_stat_action == NULL) { 7216 return BCM_E_NONE; 7217 } 7218 7219 while (f_ent->field_oam_stat_action != NULL) { 7220 oam_stat_node = f_ent->field_oam_stat_action; 7221 f_ent->field_oam_stat_action = 7222 (f_ent->field_oam_stat_action)->next; 7223 7224 sal_free (oam_stat_node->oam_stat_action); 7225 oam_stat_node->oam_stat_action = NULL; 7226 sal_free (oam_stat_node); 7227 oam_stat_node = NULL; 7228 } 7229 7230 /* Update flags and free the pool instances */ 7231 f_ent->flags &= ~_FP_ENTRY_OAM_STAT_VALID; 7232 rv = _field_oam_stat_action_pool_instance_reserve (unit, f_ent, 7233 NULL, _bcmFieldOamStatPoolInstanceFreeAll); 7234 if (BCM_FAILURE (rv)) { 7235 return rv; 7236 } 7237 7238 return BCM_E_NONE; 7239 } 7240 7241 /* 7242 * Function: 7243 * _bcm_field_oam_stat_invalid_actions_remove 7244 * Description: 7245 * Remove invalid Oam Stat Actions in H/w. 7246 * Parameters: 7247 * unit - (IN) BCM device number. 7248 * f_ent - (IN) Field entry Structure. 7249 * Returns: 7250 * BCM_E_XXX 7251 */ 7252 int _bcm_field_oam_stat_invalid_actions_remove (int unit, 7253 _field_entry_t *f_ent) 7254 { 7255 _field_oam_stat_action_t *oam_stat_node; /* Oam stat Node. */ 7256 _field_oam_stat_action_t *oam_prev_node; /* Oam stat Node. */ 7257 _field_oam_stat_action_t *oam_temp_node; /* Oam stat Node. */ 7258 int rv = 0; 7259 7260 if (f_ent == NULL) { 7261 return BCM_E_PARAM; 7262 } 7263 7264 if (f_ent->field_oam_stat_action == NULL) { 7265 return BCM_E_NONE; 7266 } 7267 7268 oam_stat_node = f_ent->field_oam_stat_action; 7269 oam_prev_node = oam_stat_node; 7270 7271 while (oam_stat_node != NULL) { 7272 if ((oam_stat_node->flags & _FP_OAM_STAT_ACTION_VALID) == 0) { 7273 if (oam_stat_node == f_ent->field_oam_stat_action) { 7274 oam_temp_node = oam_stat_node; 7275 f_ent->field_oam_stat_action = oam_stat_node->next; 7276 oam_prev_node = f_ent->field_oam_stat_action; 7277 } else { 7278 oam_prev_node->next = oam_stat_node->next; 7279 oam_temp_node = oam_stat_node; 7280 } 7281 7282 oam_stat_node = oam_stat_node->next; 7283 sal_free (oam_temp_node->oam_stat_action); 7284 oam_temp_node->oam_stat_action = NULL; 7285 sal_free (oam_temp_node); 7286 oam_temp_node = NULL; 7287 } else { 7288 oam_prev_node = oam_stat_node; 7289 oam_stat_node = oam_stat_node->next; 7290 } 7291 } 7292 7293 /* Reset the flag if all the oam stat actions are removed */ 7294 if (f_ent->field_oam_stat_action == NULL) { 7295 f_ent->flags &= ~_FP_ENTRY_OAM_STAT_VALID; 7296 rv = _field_oam_stat_action_pool_instance_reserve (unit, f_ent, 7297 NULL, _bcmFieldOamStatPoolInstanceFreeAll); 7298 if (BCM_FAILURE (rv)) { 7299 return rv; 7300 } 7301 } 7302 7303 return BCM_E_NONE; 7304 } 7305 7306 /* 7307 * Function: 7308 * _bcm_field_oam_stat_action_set 7309 * Description: 7310 * Set Oam Stat Actions in H/w. 7311 * Parameters: 7312 * unit - (IN) BCM device number. 7313 * f_ent - (IN) Field entry Structure. 7314 * policy_mem - (IN) Policy table memory 7315 * policy_buf - (INOUT) Memory buf. 7316 * Returns: 7317 * BCM_E_XXX 7318 */ 7319 int _bcm_field_oam_stat_action_set (int unit, _field_entry_t *f_ent, 7320 soc_mem_t mem, uint32 *buf) 7321 { 7322 _field_oam_stat_action_t *oam_stat_node; /* Oam stat Node. */ 7323 bcm_field_oam_stat_action_t *oam_action; /* Oam stat action. */ 7324 int action = 0; /* Stat Action Value */ 7325 7326 if ((f_ent == NULL) || (buf == NULL)) { 7327 return BCM_E_PARAM; 7328 } 7329 7330 oam_stat_node = f_ent->field_oam_stat_action; 7331 7332 while (oam_stat_node != NULL) { 7333 if (oam_stat_node->flags & _FP_OAM_STAT_ACTION_VALID) { 7334 oam_action = oam_stat_node->oam_stat_action; 7335 if (oam_action == NULL) { 7336 return BCM_E_PARAM; 7337 } 7338 7339 action = oam_action->action; 7340 7341 switch (oam_stat_node->pool_instance) { 7342 case 0: 7343 PolicySet (unit, mem, buf, LM_COUNTER_POOL_ID_Af, 7344 oam_stat_node->flex_pool_id); 7345 PolicySet (unit, mem, buf, LM_COUNTER_POOL_ACTION_Af, 7346 action); 7347 7348 /* Egress stage doesn't have NAT OAM ACTIONS */ 7349 if (_BCM_FIELD_STAGE_INGRESS == f_ent->group->stage_id) { 7350 PolicySet (unit, mem, buf, NAT_OAM_ACTION_SELECTf, 7351 _bcmFieldNatOamValidOam); 7352 } 7353 break; 7354 case 1: 7355 PolicySet (unit, mem, buf, LM_COUNTER_POOL_ID_Bf, 7356 oam_stat_node->flex_pool_id); 7357 PolicySet (unit, mem, buf, LM_COUNTER_POOL_ACTION_Bf, 7358 action); 7359 7360 /* Egress stage doesn't have NAT OAM ACTIONS */ 7361 if (_BCM_FIELD_STAGE_INGRESS == f_ent->group->stage_id) { 7362 PolicySet (unit, mem, buf, NAT_OAM_ACTION_SELECTf, 7363 _bcmFieldNatOamValidOam); 7364 } 7365 break; 7366 case 2: 7367 PolicySet (unit, mem, buf, LM_COUNTER_POOL_ID_Cf, 7368 oam_stat_node->flex_pool_id); 7369 PolicySet (unit, mem, buf, LM_COUNTER_POOL_ACTION_Cf, 7370 action); 7371 7372 /* Egress stage doesn't have NAT OAM ACTIONS */ 7373 if (_BCM_FIELD_STAGE_INGRESS == f_ent->group->stage_id) { 7374 PolicySet (unit, mem, buf, NAT_OAM_ACTION_SELECTf, 7375 _bcmFieldNatOamValidOam); 7376 } 7377 break; 7378 default: 7379 return BCM_E_PARAM; 7380 } 7381 } 7382 oam_stat_node->flags &= ~_FP_OAM_STAT_ACTION_DIRTY; 7383 oam_stat_node = oam_stat_node->next; 7384 } 7385 7386 return BCM_E_NONE; 7387 } 7388 7389 /* 7390 * Function: 7391 * _field_oam_stat_action_dump 7392 * Description: 7393 * Dump Oam Stat Actions. 7394 * Parameters: 7395 * unit - (IN) BCM device number. 7396 * f_ent - (IN) Field entry Structure. 7397 * Returns: 7398 * BCM_E_XXX 7399 */ 7400 int _field_oam_stat_action_dump (int unit, _field_entry_t *f_ent) 7401 { 7402 _field_oam_stat_action_t *oam_stat_node; /* Oam stat Node. */ 7403 bcm_field_oam_stat_action_t *oam_action; /* Oam stat action. */ 7404 int rv = BCM_E_NONE; 7405 char *sname[] = BCM_FIELD_STAT_ACTION; 7406 char *oname[] = BCM_STAT_OBJECT; 7407 char stat_mode[16]; 7408 7409 /* Input parameters check. */ 7410 if (f_ent == NULL) { 7411 return (BCM_E_PARAM); 7412 } 7413 7414 oam_stat_node = f_ent->field_oam_stat_action; 7415 /* Display entry's oam Stat Actions. */ 7416 if (oam_stat_node == NULL) { 7417 LOG_CLI((BSL_META_U(unit, 7418 " Oam stat Action=NULL\r\n"))); 7419 } else { 7420 LOG_CLI((BSL_META_U(unit, 7421 " Oam stat Action=\r\n"))); 7422 while (oam_stat_node != NULL) { 7423 oam_action = oam_stat_node->oam_stat_action; 7424 if (oam_action != NULL) { 7425 memset (stat_mode,0, sizeof(stat_mode)); 7426 if ((oam_action->stat_mode_id & BCM_STAT_GROUP_MODE_ID_OAM_MASK) 7427 == BCM_STAT_GROUP_MODE_ID_OAM_SUFFIX) { 7428 sal_strncpy (stat_mode, 7429 "OamCapable", sizeof(stat_mode)); 7430 } else { 7431 sal_strncpy (stat_mode, 7432 "OamInCapable", sizeof (stat_mode)); 7433 } 7434 LOG_CLI((BSL_META_U(unit, 7435 " {Object: %s; Mode:" 7436 " %s; Action: %s;}\r\n"), 7437 oname[oam_action->stat_object], 7438 stat_mode, sname[oam_action->action])); 7439 } 7440 oam_stat_node = oam_stat_node->next; 7441 } 7442 } 7443 7444 return rv; 7445 } 7446 7447 /* 7448 * Function: 7449 * _field_oam_stat_action_display 7450 * Description: 7451 * Dump Oam Stat Actions of all entries and groups. 7452 * Parameters: 7453 * unit - (IN) BCM device number. 7454 * Returns: 7455 * BCM_E_XXX 7456 */ 7457 int _field_oam_stat_action_display (int unit) 7458 { 7459 _field_group_t *fg = NULL; /* Field Group Structure */ 7460 _field_control_t *fc = NULL; /* Field Control Structure */ 7461 uint32 eid = 0; /* Entry Id */ 7462 int idx = 0; /* Entry Id */ 7463 _field_entry_t *f_ent; /* Field entry info */ 7464 _field_oam_stat_action_t *oam_stat_node; /* Oam stat Node */ 7465 bcm_field_oam_stat_action_t *oam_action; /* Oam stat action */ 7466 char *sname[] = BCM_FIELD_STAT_ACTION; /* Stat action String */ 7467 char *oname[] = BCM_STAT_OBJECT; /* Stat Object String */ 7468 int8 pool_bitmap = 0; 7469 int rv = 0; 7470 7471 BCM_IF_ERROR_RETURN(_field_control_get(unit, &fc)); 7472 7473 fg = fc->groups; 7474 7475 while (fg != NULL) { 7476 if (fg->stage_id == _BCM_FIELD_STAGE_INGRESS) { 7477 7478 LOG_CLI((BSL_META_U(unit, 7479 "Oam stat Action for Group %d\r\n"),fg->gid)); 7480 for (idx = 0; idx < fg->group_status.entry_count; idx++) { 7481 eid = (fg->entry_arr[idx])->eid; 7482 7483 /* Get entry description structure. */ 7484 BCM_IF_ERROR_RETURN((_field_entry_get(unit, 7485 eid, _FP_ENTRY_PRIMARY, &f_ent))); 7486 7487 oam_stat_node = f_ent->field_oam_stat_action; 7488 rv = _field_oam_stat_action_pool_instance_reserve (unit, f_ent, 7489 &pool_bitmap, _bcmFieldOamStatPoolInstanceGet); 7490 if (BCM_FAILURE (rv)) { 7491 return rv; 7492 } 7493 7494 /* Display entry's oam Stat Actions. */ 7495 LOG_CLI((BSL_META_U(unit, "Oam stat Action: Entry %d" 7496 " for Pool Bitmap %d\r\n"),eid,pool_bitmap)); 7497 while (oam_stat_node != NULL) { 7498 LOG_CLI((BSL_META_U(unit, " Pool Instance: %d" 7499 " Flex_Pool: %d\r\n"), 7500 oam_stat_node->pool_instance, 7501 oam_stat_node->flex_pool_id)); 7502 7503 oam_action = oam_stat_node->oam_stat_action; 7504 if (oam_action != NULL) { 7505 LOG_CLI((BSL_META_U(unit, 7506 "Node: %p Node_action:%p {Object: " 7507 "%s;Mode Id: %d;Action: %s;}\r\n"), 7508 oam_stat_node, oam_action, 7509 oname[oam_action->stat_object], 7510 oam_action->stat_mode_id, 7511 sname[oam_action->action])); 7512 } else { 7513 return BCM_E_INTERNAL; 7514 } 7515 oam_stat_node = oam_stat_node->next; 7516 } 7517 } 7518 fg = fg->next; 7519 } 7520 } 7521 return BCM_E_NONE; 7522 } 7523 7524 /* 7525 * Function: 7526 * _bcm_field_td2plus_entry_stat_extended_attach 7527 * 7528 * Description: 7529 * Attach statistics with action entity to Field Processor entry. 7530 * Parameters: 7531 * unit - (IN) BCM device number. 7532 * entry - (IN) Field entry id. 7533 * stat_id - (IN) Statistics entity id. 7534 * stat_action - (IN) Stat Action. 7535 * Returns: 7536 * BCM_E_XXX 7537 */ 7538 int 7539 _bcm_field_td2plus_entry_stat_extended_attach(int unit, 7540 _field_entry_t *f_ent, 7541 int stat_id, 7542 bcm_field_stat_action_t stat_action) 7543 { 7544 _field_entry_stat_t *f_ent_st; /* Field entry statistics structure.*/ 7545 _field_stat_t *f_st; /* Internal statisics descriptor. */ 7546 _field_stage_id_t stage_id; /* Pipeline stage id. */ 7547 int rv; /* Operation return status. */ 7548 7549 /* Input parameters check. */ 7550 if (NULL == f_ent) { 7551 return (BCM_E_PARAM); 7552 } 7553 7554 /* Get entry pipeline stage id. */ 7555 stage_id = f_ent->group->stage_id; 7556 7557 /* Valid only for Ingress & Egress Stage */ 7558 if ((stage_id != _BCM_FIELD_STAGE_INGRESS) && 7559 (stage_id != _BCM_FIELD_STAGE_EGRESS)) { 7560 return BCM_E_UNAVAIL; 7561 } 7562 7563 /* TD3 supports extended stats only for stage EFP*/ 7564 if (soc_feature(unit, soc_feature_td3_style_fp) && 7565 (stage_id != _BCM_FIELD_STAGE_EGRESS)) { 7566 return BCM_E_UNAVAIL; 7567 } 7568 7569 /* Check params for stat action */ 7570 if ((stat_action < bcmFieldStatActionIncrement) 7571 || (stat_action >= bcmFieldStatActionCount)) { 7572 LOG_ERROR(BSL_LS_BCM_FP, 7573 (BSL_META("FP(unit %d) Error: Not a valid Stat Action value\r\n"), 7574 unit)); 7575 return BCM_E_PARAM; 7576 } 7577 7578 if ((SOC_IS_TRIDENT2PLUS(unit) 7579 || soc_feature(unit, soc_feature_td3_style_fp)) && 7580 (stat_action != bcmFieldStatActionIncrement) && 7581 (stage_id == _BCM_FIELD_STAGE_EGRESS)) { 7582 LOG_ERROR(BSL_LS_BCM_FP, 7583 (BSL_META("FP(unit %d) Error: Egress Stage supports " 7584 "only Incremenent stat action\r\n"), unit)); 7585 return BCM_E_PARAM; 7586 } 7587 7588 /* Check if another statistics entity is already attached. */ 7589 f_ent_st = &f_ent->statistic; 7590 7591 if (f_ent_st->flags & _FP_ENTRY_EXTENDED_STAT_VALID) { 7592 return (BCM_E_EXISTS); 7593 } 7594 7595 /* Check if statistics action conflicts with other actions */ 7596 if (f_ent_st->flags & _FP_ENTRY_EXTENDED_STAT_NOT_ALLOWED) { 7597 return (BCM_E_CONFIG); 7598 } 7599 7600 /* Check if statid is not normal stat id */ 7601 if (f_ent_st->sid == stat_id) { 7602 return BCM_E_PARAM; 7603 } 7604 7605 /* Get statistics entity description structure. */ 7606 rv = _bcm_field_stat_get(unit, stat_id, &f_st); 7607 BCM_IF_ERROR_RETURN(rv); 7608 7609 if ((f_st->stage_id != stage_id) || 7610 (f_st->gid != f_ent->group->gid)) { 7611 return (BCM_E_PARAM); 7612 } 7613 7614 /* Increment statistics entity reference counter. */ 7615 f_st->sw_ref_count++; 7616 7617 /* Attach statistics entity to an entry. */ 7618 f_ent_st->flags |= _FP_ENTRY_EXTENDED_STAT_VALID; 7619 f_ent_st->flags |= _FP_ENTRY_EXTENDED_STAT_RESERVED; 7620 f_ent_st->extended_sid = stat_id; 7621 f_ent_st->stat_action = stat_action; 7622 7623 /* 7624 * If qualifiers have not been modified for this entry, 7625 * set Action only dirty flag. 7626 */ 7627 if (0 == (f_ent->flags & _FP_ENTRY_DIRTY)) { 7628 f_ent->flags |= _FP_ENTRY_POLICY_TABLE_ONLY_DIRTY; 7629 } 7630 7631 /* Entry must be reinstalled for statistics to take effect. */ 7632 f_ent->flags |= _FP_ENTRY_DIRTY; 7633 7634 return (BCM_E_NONE); 7635 } 7636 7637 /* 7638 * Function: 7639 * _bcm_field_td2plus_entry_stat_extended_get 7640 * 7641 * Description: 7642 * Get extended statid and stat_action. 7643 * Parameters: 7644 * unit - (IN) BCM device number. 7645 * entry - (IN) Field entry id. 7646 * stat_id - (OUT) Statistics entity id. 7647 * stat_action - (OUT) Stat Action. 7648 * Returns: 7649 * BCM_E_XXX 7650 */ 7651 int _bcm_field_td2plus_entry_stat_extended_get (int unit, 7652 _field_entry_t *f_ent, 7653 int *stat_id, 7654 bcm_field_stat_action_t *stat_action) 7655 { 7656 _field_stage_id_t stage_id; /* Pipeline stage id. */ 7657 7658 if ((f_ent == NULL) || (stat_id == NULL) || (stat_action == NULL)) { 7659 return BCM_E_PARAM; 7660 } 7661 7662 /* Get entry pipeline stage id. */ 7663 stage_id = f_ent->group->stage_id; 7664 7665 /* Valid only for Ingress & Egress Stage */ 7666 if ((stage_id != _BCM_FIELD_STAGE_INGRESS) && 7667 (stage_id != _BCM_FIELD_STAGE_EGRESS)) { 7668 return BCM_E_UNAVAIL; 7669 } 7670 7671 /* TD3 supports extended stats only for EFP */ 7672 if (soc_feature(unit, soc_feature_td3_style_fp) && 7673 (stage_id != _BCM_FIELD_STAGE_EGRESS)) { 7674 return BCM_E_UNAVAIL; 7675 } 7676 7677 if (f_ent->statistic.flags & _FP_ENTRY_EXTENDED_STAT_VALID) { 7678 *stat_id = f_ent->statistic.extended_sid; 7679 *stat_action = f_ent->statistic.stat_action; 7680 } else { 7681 return BCM_E_NOT_FOUND; 7682 } 7683 7684 return BCM_E_NONE; 7685 } 7686 7687 /* 7688 * Function: 7689 * _bcm_field_td2plus_entry_stat_detach 7690 * 7691 * Description: 7692 * Detach statistics entity from Field processor entry. 7693 * Parameters: 7694 * unit - (IN) BCM device number. 7695 * f_ent - (IN) Field entry structure. 7696 * stat_id - (IN) Statistics entity id. 7697 * Returns: 7698 * BCM_E_XXX 7699 */ 7700 int _bcm_field_td2plus_entry_stat_detach (int unit, 7701 _field_entry_t *f_ent, 7702 int stat_id) 7703 { 7704 7705 _field_stat_t *f_st; /* Internal statistics entity. */ 7706 _field_entry_stat_t *f_ent_st; /* Field entry stat structure. */ 7707 int rv; /* Operation return status. */ 7708 uint8 isExtendedStat = 0; /* Check if extended stat id. */ 7709 _field_stage_id_t stage_id; /* Pipeline stage id. */ 7710 7711 /* Input parameters check. */ 7712 if (NULL == f_ent) { 7713 return (BCM_E_PARAM); 7714 } 7715 7716 /* Get entry pipeline stage id. */ 7717 stage_id = f_ent->group->stage_id; 7718 7719 /* Valid only for Ingress & Egress Stage */ 7720 if ((stage_id != _BCM_FIELD_STAGE_INGRESS) 7721 && (stage_id != _BCM_FIELD_STAGE_EGRESS)) { 7722 return _bcm_field_entry_stat_detach(unit, f_ent, stat_id); 7723 } 7724 7725 f_ent_st = &f_ent->statistic; 7726 7727 if (stat_id == f_ent_st->sid) { 7728 isExtendedStat = 0; 7729 } else if (stat_id == f_ent_st->extended_sid) { 7730 isExtendedStat = 1; 7731 } else { 7732 if ((0 == (f_ent_st->flags & _FP_ENTRY_STAT_VALID)) && 7733 (0 == (f_ent_st->flags & _FP_ENTRY_EXTENDED_STAT_VALID))) { 7734 return (BCM_E_EMPTY); 7735 } 7736 return BCM_E_PARAM; 7737 } 7738 7739 /* Make sure statistics entity attached to the entry. */ 7740 if ((0 == (f_ent_st->flags & _FP_ENTRY_STAT_VALID)) && !isExtendedStat) { 7741 return (BCM_E_EMPTY); 7742 } 7743 7744 if ((0 == (f_ent_st->flags & _FP_ENTRY_EXTENDED_STAT_VALID)) 7745 && isExtendedStat) { 7746 return (BCM_E_EMPTY); 7747 } 7748 7749 /* Get statics entity descriptor structure. */ 7750 if (isExtendedStat) { 7751 BCM_IF_ERROR_RETURN(_bcm_field_stat_get(unit, 7752 f_ent_st->extended_sid, &f_st)); 7753 BCM_IF_ERROR_RETURN ( 7754 _bcm_field_td2plus_extended_stat_hw_free(unit, f_ent)); 7755 } else { 7756 BCM_IF_ERROR_RETURN(_bcm_field_stat_get(unit, f_ent_st->sid, &f_st)); 7757 BCM_IF_ERROR_RETURN (_bcm_field_stat_hw_free(unit, f_ent)); 7758 } 7759 7760 /* Decrement statistics entity reference counter. */ 7761 f_st->sw_ref_count--; 7762 7763 /* If no one else is using the entity and it is internal destroy it. */ 7764 if ((1 == f_st->sw_ref_count) && (f_st->hw_flags & _FP_STAT_INTERNAL)) { 7765 if (isExtendedStat) { 7766 rv = _field_stat_destroy(unit, f_ent_st->extended_sid); 7767 } else { 7768 rv = _field_stat_destroy(unit, f_ent_st->sid); 7769 } 7770 BCM_IF_ERROR_RETURN(rv); 7771 } 7772 7773 /* Detach policer from an entry. */ 7774 if (isExtendedStat) { 7775 f_ent_st->extended_sid = _FP_INVALID_INDEX; 7776 f_ent_st->flags &= ~(_FP_ENTRY_EXTENDED_STAT_VALID); 7777 f_ent_st->flags &= ~(_FP_ENTRY_EXTENDED_STAT_INSTALLED); 7778 } else { 7779 f_ent_st->sid = _FP_INVALID_INDEX; 7780 f_ent_st->flags &= ~(_FP_ENTRY_STAT_VALID); 7781 f_ent_st->flags &= ~(_FP_ENTRY_STAT_INSTALLED); 7782 f_ent_st->flags &= ~(_FP_ENTRY_STAT_USE_EVEN); 7783 f_ent_st->flags &= ~(_FP_ENTRY_STAT_USE_ODD); 7784 } 7785 7786 /* Mark entry for reinstall. */ 7787 f_ent->flags |= _FP_ENTRY_DIRTY; 7788 7789 return BCM_E_NONE; 7790 } 7791 7792 /* 7793 * Function: 7794 * _bcm_field_td2plus_extended_stat_hw_alloc 7795 * 7796 * Purpose: 7797 * Allocate hw counter from an entry. 7798 * 7799 * Parameters: 7800 * unit - (IN) BCM device number. 7801 * f_ent - (IN) Entry statistics belongs to. 7802 * Returns: 7803 * BCM_E_XXX 7804 */ 7805 int _bcm_field_td2plus_extended_stat_hw_alloc (int unit, _field_entry_t *f_ent) 7806 { 7807 _field_entry_stat_t *f_ent_st; /* Field entry stat structure. */ 7808 _field_stat_t *f_st; /* Field statistics descriptor. */ 7809 int rv; /* Operation return status. */ 7810 bcm_stat_flex_mode_t offset_mode; /* Counter mode. */ 7811 bcm_stat_group_mode_t stat_mode; /* Stat type bcmStatGroupModeXXX. */ 7812 bcm_stat_object_t stat_obj; /* Stat object type. */ 7813 uint32 pool_num; /* Flex Stat Hw Pool No. */ 7814 uint32 base_index; /* Flex Stat counter base index. */ 7815 uint32 flex_sid; /* Flex Stat ID. */ 7816 uint32 num_hw_cntrs; /* Number of counters allocated. */ 7817 _field_stage_id_t stage_id; /* Pipeline stage id. */ 7818 7819 7820 /* Input parameters check. */ 7821 if (NULL == f_ent) { 7822 return (BCM_E_PARAM); 7823 } 7824 7825 /* Get entry pipeline stage id. */ 7826 stage_id = f_ent->group->stage_id; 7827 7828 /* Valid only for Ingress Stage */ 7829 if ((stage_id != _BCM_FIELD_STAGE_INGRESS) 7830 && (stage_id != _BCM_FIELD_STAGE_EGRESS)) { 7831 return BCM_E_UNAVAIL; 7832 } 7833 7834 f_ent_st = &f_ent->statistic; 7835 7836 /* Skip entries without countres attached. */ 7837 if ((0 == (f_ent_st->flags & _FP_ENTRY_EXTENDED_STAT_VALID)) || 7838 (f_ent_st->flags & _FP_ENTRY_STAT_EMPTY)) { 7839 return (BCM_E_NONE); 7840 } 7841 7842 /* Read statistics entity configuration. */ 7843 rv = _bcm_field_stat_get(unit, f_ent_st->extended_sid, &f_st); 7844 BCM_IF_ERROR_RETURN (rv); 7845 7846 if (soc_feature(unit, soc_feature_advanced_flex_counter)) { 7847 /* Allocate flex STAT entity hw index. */ 7848 /* If counter is disabled skip allocation. */ 7849 if (0 == f_st->hw_stat) { 7850 return (BCM_E_NONE); 7851 } 7852 7853 if (_FP_INVALID_INDEX == f_st->hw_index) { 7854 switch (f_st->stage_id) { 7855 case _BCM_FIELD_STAGE_INGRESS: 7856 stat_obj = bcmStatObjectIngFieldStageIngress; 7857 break; 7858 case _BCM_FIELD_STAGE_EGRESS: 7859 stat_obj = bcmStatObjectEgrFieldStageEgress; 7860 break; 7861 default: 7862 /* IFP and EFP stages does not use Flex STAT. */ 7863 return (BCM_E_INTERNAL); 7864 } 7865 7866 flex_sid = f_st->flex_mode; 7867 num_hw_cntrs = f_st->hw_entry_count; 7868 /* Create a flex stat group. */ 7869 if ((f_ent_st->flags & _FP_ENTRY_EXTENDED_STAT_RESERVED) == 0) { 7870 BCM_IF_ERROR_RETURN 7871 (bcm_esw_stat_group_create(unit, 7872 stat_obj, 7873 (bcm_stat_group_mode_t) 7874 f_st->hw_mode, 7875 &flex_sid, 7876 &num_hw_cntrs 7877 ) 7878 ); 7879 } 7880 7881 /* Get flex counter hardware details stored in flex stat ID.*/ 7882 _bcm_esw_stat_get_counter_id_info(unit, flex_sid, 7883 &stat_mode, 7884 &stat_obj, 7885 &offset_mode, 7886 &pool_num, 7887 &base_index 7888 ); 7889 /* Store flex stat hardware details in stat data structure. */ 7890 f_st->flex_mode = flex_sid; 7891 f_st->pool_index = pool_num; 7892 f_st->hw_index = base_index; 7893 f_st->hw_mode = offset_mode; 7894 f_st->hw_entry_count = num_hw_cntrs; 7895 } 7896 /* Increment the group counters count equal to 7897 the hw entries count .*/ 7898 f_ent->group->group_status.counter_count = 7899 f_ent->group->group_status.counter_count + f_st->hw_entry_count; 7900 } 7901 7902 return BCM_E_NONE; 7903 } 7904 7905 /* 7906 * Function: 7907 * _bcm_field_td2plus_extended_stat_hw_free 7908 * 7909 * Purpose: 7910 * Deallocate hw counter from an entry. 7911 * 7912 * Parameters: 7913 * unit - (IN) BCM device number. 7914 * f_ent - (IN) Entry statistics belongs to. 7915 * Returns: 7916 * BCM_E_XXX 7917 */ 7918 int _bcm_field_td2plus_extended_stat_hw_free (int unit, _field_entry_t *f_ent) 7919 { 7920 _field_entry_stat_t *f_ent_st; /* Field entry statistics structure.*/ 7921 _field_stat_t *f_st; /* Statistics entity descriptor. */ 7922 _field_control_t *fc; /* Field control. */ 7923 uint64 value; /* 64 bit zero to reset hw value. */ 7924 int idx; /* Statistics iteration index. */ 7925 int rv; /* Operation return status. */ 7926 _field_stage_t *stage_fc = NULL; /* pipeline stage */ 7927 int entry_idx = 0; /* Entry index at policy table */ 7928 _field_stage_id_t stage_id; /* Pipeline stage id. */ 7929 soc_mem_t tcam_mem; /* TCAM memory id. */ 7930 soc_mem_t policy_mem; /* Policy table memory id. */ 7931 7932 /* Input parameters check. */ 7933 if (NULL == f_ent) { 7934 return (BCM_E_PARAM); 7935 } 7936 7937 /* Get entry pipeline stage id. */ 7938 stage_id = f_ent->group->stage_id; 7939 7940 /* Valid only for Ingress & Egress Stage */ 7941 if ((stage_id != _BCM_FIELD_STAGE_INGRESS) 7942 && (stage_id != _BCM_FIELD_STAGE_EGRESS)) { 7943 return BCM_E_UNAVAIL; 7944 } 7945 7946 BCM_IF_ERROR_RETURN (_field_control_get(unit, &fc)); 7947 7948 f_ent_st = &f_ent->statistic; 7949 7950 /* Skip uninstalled statistics entity. */ 7951 if (0 == (f_ent_st->flags & _FP_ENTRY_EXTENDED_STAT_INSTALLED)) { 7952 return (BCM_E_NONE); 7953 } 7954 7955 BCM_IF_ERROR_RETURN(_field_stage_control_get(unit, 7956 f_ent->group->stage_id, &stage_fc)); 7957 7958 rv = _field_fb_tcam_policy_mem_get(unit, f_ent->group->stage_id, 7959 &tcam_mem, &policy_mem); 7960 BCM_IF_ERROR_RETURN(rv); 7961 7962 /* Read stat entity configuration. */ 7963 BCM_IF_ERROR_RETURN(_bcm_field_stat_get(unit, 7964 f_ent_st->extended_sid, &f_st)); 7965 7966 /* Decrement hw reference count. */ 7967 if (f_st->hw_ref_count > 0) { 7968 f_st->hw_ref_count--; 7969 if (f_st->flex_mode != 0 && f_st->hw_ref_count > 0) { 7970 /* 7971 * Get entry index at which flex STAT information 7972 * has been programmed in policy table. 7973 */ 7974 BCM_IF_ERROR_RETURN (_bcm_field_slice_offset_to_tcam_idx(unit, 7975 stage_fc, f_ent->group->instance, 7976 f_ent->fs->slice_number, 7977 f_ent->slice_idx, &entry_idx)); 7978 7979 if (stage_id == _BCM_FIELD_STAGE_INGRESS) { 7980 rv = _bcm_esw_stat_flex_detach_ingress_table_counters (unit, 7981 policy_mem, entry_idx); 7982 } else if (stage_id == _BCM_FIELD_STAGE_EGRESS) { 7983 rv = _bcm_esw_stat_flex_detach_egress_table_counters (unit, 0, 7984 policy_mem, entry_idx); 7985 } 7986 7987 /* 7988 * Flex STAT module detached before field module, ignore 7989 * error during bcm_field_detach(). 7990 */ 7991 if (BCM_FAILURE(rv) && (TRUE == fc->init)) { 7992 return (rv); 7993 } 7994 } 7995 } 7996 7997 /* Statistics is not used by any other entry. */ 7998 if (f_st->hw_ref_count == 0) { 7999 COMPILER_64_ZERO(value); 8000 /* Read & Reset individual statistics. */ 8001 for (idx = 0; idx < f_st->nstat; idx++) { 8002 rv = _field_stat_value_get(unit, 0, f_st, f_st->stat_arr[idx], 8003 f_st->stat_values + idx); 8004 if (BCM_FAILURE(rv)) { 8005 /* During system restart flex stat module 8006 * might be reinitialized before fp reinit. Hence 8007 * calls to the flex stat module will result in 8008 * BCM_E_NOT_FOUND * error code. 8009 */ 8010 if (BCM_E_NOT_FOUND != rv) { 8011 return rv; 8012 } 8013 } else { 8014 rv = _field_stat_value_set(unit, f_st, 8015 f_st->stat_arr[idx], value); 8016 BCM_IF_ERROR_RETURN(rv); 8017 } 8018 } 8019 /* Mark hw resource as unused in sw. */ 8020 BCM_IF_ERROR_RETURN(_field_flex_counter_free(unit, f_ent, f_st)); 8021 } 8022 /* 8023 * If qualifiers have not been modified for this entry, 8024 * set Action only dirty flag. 8025 */ 8026 if (0 == (f_ent->flags & _FP_ENTRY_DIRTY)) { 8027 f_ent->flags |= _FP_ENTRY_POLICY_TABLE_ONLY_DIRTY; 8028 } 8029 8030 f_ent_st->flags &= ~_FP_ENTRY_EXTENDED_STAT_INSTALLED; 8031 f_ent_st->flags &= ~_FP_ENTRY_EXTENDED_STAT_RESERVED; 8032 8033 /* Mark entry for reinstall. */ 8034 f_ent->flags |= _FP_ENTRY_DIRTY; 8035 8036 return BCM_E_NONE; 8037 } 8038 8039 /* 8040 * Function: 8041 * _bcm_field_td2plus_stat_hw_alloc 8042 * 8043 * Purpose: 8044 * Allocate hw counter from an entry. 8045 * 8046 * Parameters: 8047 * unit - (IN) BCM device number. 8048 * f_ent - (IN) Entry statistics belongs to. 8049 * Returns: 8050 * BCM_E_XXX 8051 */ 8052 int _bcm_field_td2plus_stat_hw_alloc (int unit, _field_entry_t *f_ent) 8053 { 8054 _field_stage_id_t stage_id; /* Pipeline stage id. */ 8055 8056 /* Input parameters check. */ 8057 if (NULL == f_ent) { 8058 return (BCM_E_PARAM); 8059 } 8060 8061 /* Get entry pipeline stage id. */ 8062 stage_id = f_ent->group->stage_id; 8063 8064 BCM_IF_ERROR_RETURN (_bcm_field_stat_hw_alloc(unit, f_ent)); 8065 8066 /* Valid only for Ingress Stage */ 8067 if ((stage_id == _BCM_FIELD_STAGE_INGRESS) 8068 || (stage_id == _BCM_FIELD_STAGE_EGRESS)) { 8069 BCM_IF_ERROR_RETURN (_bcm_field_td2plus_extended_stat_hw_alloc 8070 (unit, f_ent)); 8071 } 8072 8073 return BCM_E_NONE; 8074 } 8075 8076 /* 8077 * Function: 8078 * _bcm_field_td2plus_stat_hw_free 8079 * 8080 * Purpose: 8081 * Deallocate hw counter from an entry. 8082 * 8083 * Parameters: 8084 * unit - (IN) BCM device number. 8085 * f_ent - (IN) Entry statistics belongs to. 8086 * Returns: 8087 * BCM_E_XXX 8088 */ 8089 int _bcm_field_td2plus_stat_hw_free (int unit, _field_entry_t *f_ent) 8090 { 8091 _field_stage_id_t stage_id; /* Pipeline stage id. */ 8092 8093 /* Input parameters check. */ 8094 if (NULL == f_ent) { 8095 return (BCM_E_PARAM); 8096 } 8097 8098 /* Get entry pipeline stage id. */ 8099 stage_id = f_ent->group->stage_id; 8100 8101 BCM_IF_ERROR_RETURN (_bcm_field_stat_hw_free(unit, f_ent)); 8102 8103 /* Valid only for Ingress,Egress Stage */ 8104 if ((stage_id == _BCM_FIELD_STAGE_INGRESS) 8105 || (stage_id == _BCM_FIELD_STAGE_EGRESS)) { 8106 BCM_IF_ERROR_RETURN ( 8107 _bcm_field_td2plus_extended_stat_hw_free(unit, f_ent)); 8108 } 8109 8110 return BCM_E_NONE; 8111 } 8112 8113 /* 8114 * Function: 8115 * _bcm_field_td2plus_extended_stat_action_set 8116 * Purpose: 8117 * Install counter update action into policy table. 8118 * Parameters: 8119 * unit - (IN) BCM device number 8120 * f_ent - (IN) entry structure to get policy info from 8121 * mem - (IN) Policy table memory 8122 * tcam_idx - (IN) Common index of various tables 8123 * buf - (OUT) Field Policy table entry 8124 * Returns: 8125 * BCM_E_XXX 8126 */ 8127 int _bcm_field_td2plus_extended_stat_action_set (int unit, 8128 _field_entry_t *f_ent, 8129 soc_mem_t mem, int tcam_idx, 8130 uint32 *buf) 8131 { 8132 _field_stat_t *f_st; /* Field statistics descriptor. */ 8133 int idx; /* Stat array index. */ 8134 _field_stage_id_t stage_id; /* Pipeline stage id. */ 8135 8136 8137 /* Check input params */ 8138 if ((f_ent == NULL) || (buf == NULL)) { 8139 return BCM_E_PARAM; 8140 } 8141 8142 /* Get entry pipeline stage id. */ 8143 stage_id = f_ent->group->stage_id; 8144 if ((stage_id != _BCM_FIELD_STAGE_INGRESS) 8145 && (stage_id != _BCM_FIELD_STAGE_EGRESS)) { 8146 return BCM_E_NONE; 8147 } 8148 8149 /* Increment statistics hw reference count. */ 8150 if ((f_ent->statistic.flags & _FP_ENTRY_EXTENDED_STAT_VALID) 8151 && !(f_ent->statistic.flags & _FP_ENTRY_EXTENDED_STAT_INSTALLED)) { 8152 /* Get statistics entity description structure. */ 8153 BCM_IF_ERROR_RETURN 8154 (_bcm_field_stat_get(unit, f_ent->statistic.extended_sid, &f_st)); 8155 if (_FP_INVALID_INDEX != f_st->hw_index) { 8156 /* 8157 * For STATs that are shared by entries, hardware counters 8158 * are not allocated again. But reference count is incremented 8159 * for these counters. 8160 */ 8161 f_st->hw_ref_count++; 8162 8163 if (stage_id == _BCM_FIELD_STAGE_INGRESS) { 8164 PolicySet(unit, mem, buf, G_L3SW_CHANGE_L2_FIELDSf, 0x9); 8165 PolicySet(unit, mem, buf, FLEX_COUNTER_ACTIONf, 8166 f_ent->statistic.stat_action); 8167 BCM_IF_ERROR_RETURN 8168 (_bcm_esw_stat_flex_attach_ingress_table_counters1 8169 (unit, mem, tcam_idx, f_st->hw_mode, f_st->hw_index, 8170 f_st->pool_index, buf)); 8171 } else if (stage_id == _BCM_FIELD_STAGE_EGRESS) { 8172 PolicySet(unit, mem, buf, FLEX_COUNTER_DSCP_SELf, 0x1); 8173 if (SOC_IS_APACHE(unit)) { 8174 PolicySet(unit, mem, buf, FLEX_COUNTER_ACTIONf, 8175 f_ent->statistic.stat_action); 8176 } 8177 BCM_IF_ERROR_RETURN 8178 (_bcm_esw_stat_flex_attach_egress_table_counters1 8179 (unit, mem, tcam_idx, f_st->hw_mode, f_st->hw_index, 8180 f_st->pool_index, buf)); 8181 } 8182 8183 /* Mark entry as installed. */ 8184 f_ent->statistic.flags |= _FP_ENTRY_EXTENDED_STAT_INSTALLED; 8185 8186 /* 8187 * Write individual statistics previous value, first time 8188 * entry is installed in hardware. 8189 */ 8190 if (1 == f_st->hw_ref_count) { 8191 for (idx = 0; idx < f_st->nstat; idx++) { 8192 BCM_IF_ERROR_RETURN 8193 (_field_stat_value_set(unit, f_st, f_st->stat_arr[idx], 8194 f_st->stat_values[idx])); 8195 } 8196 } 8197 } 8198 } 8199 return BCM_E_NONE; 8200 } 8201 8202 #ifdef BCM_WARM_BOOT_SUPPORT 8203 8204 /* Function: _field_oam_stat_action_count_get 8205 * 8206 * Purpose: 8207 * Sync Oam Stat Action information into scache 8208 * Parameters: 8209 * unit - (IN) BCM device number. 8210 * oam_pool_instance - (IN) Oam Stat Pool Instance Bitmap. 8211 * oam_stat_count - (OUT) Number of Oam Stat configured. 8212 * Returns: 8213 * BCM_E_XXXX. 8214 */ 8215 int _field_oam_stat_action_count_get (int unit, 8216 uint8 oam_pool_instance, int8 *oam_stat_count) 8217 { 8218 int idx = 0; 8219 int count = 0; 8220 8221 if (oam_stat_count == NULL) { 8222 return BCM_E_PARAM; 8223 } 8224 8225 for (idx = 0; idx < 3; idx++) { 8226 if (oam_pool_instance & (1 << idx)) { 8227 count++; 8228 } 8229 } 8230 8231 *oam_stat_count = count; 8232 8233 return BCM_E_NONE; 8234 } 8235 8236 /* Function: _field_oam_stat_action_scache_sync 8237 * 8238 * Purpose: 8239 * Sync Oam Stat Action information into scache 8240 * Parameters: 8241 * unit - (IN) BCM device number. 8242 * fc - (IN) Field Control. 8243 * stage_fc - (IN) Stage Control. 8244 * scache_ptr - (INOUT) Scache Pointer. 8245 * Returns: 8246 * BCM_E_XXXX. 8247 */ 8248 int _field_oam_stat_action_scache_sync (int unit, 8249 _field_stage_t *stage_fc, 8250 _field_entry_t *f_ent, 8251 _field_entry_oam_wb_t *f_ent_oam_wb) 8252 { 8253 int8 oam_stat_count = 0; 8254 int idx = 0; 8255 _field_oam_stat_action_t *oam_stat_node; /* Oam stat Node. */ 8256 bcm_field_oam_stat_action_t *oam_action; /* Oam stat action. */ 8257 int oam_stat_size = 0; 8258 8259 if ((stage_fc == NULL) || (f_ent_oam_wb == NULL) || (f_ent == NULL)) { 8260 return BCM_E_PARAM; 8261 } 8262 8263 if (stage_fc->stage_id != _BCM_FIELD_STAGE_INGRESS) { 8264 return BCM_E_NONE; 8265 } 8266 8267 /* If oam_stat_node is NULL return*/ 8268 oam_stat_node = f_ent->field_oam_stat_action; 8269 if (oam_stat_node == NULL) { 8270 return BCM_E_NONE; 8271 } 8272 8273 /* Get number of stat actions configured */ 8274 BCM_IF_ERROR_RETURN(_field_oam_stat_action_count_get (unit, 8275 f_ent->oam_pool_instance, &oam_stat_count)); 8276 8277 if (oam_stat_count != 0) { 8278 /* Set Bitmap for syncing oam stats */ 8279 f_ent_oam_wb->is_present_bmp |= _FP_OAM_STAT_ACTION_WB_SYNC; 8280 8281 8282 /* Alloc Structure for oam_stat */ 8283 oam_stat_size = sizeof (_field_oam_stat_action_wb_t) 8284 * oam_stat_count; 8285 _FP_XGS3_ALLOC(f_ent_oam_wb->oam_stat_action_wb, 8286 oam_stat_size, "Oam Stat Action WB"); 8287 if (f_ent_oam_wb->oam_stat_action_wb == NULL) { 8288 return BCM_E_MEMORY; 8289 } 8290 8291 /* Add Oam Stat information */ 8292 while (oam_stat_node != NULL) { 8293 if ((oam_stat_node->flags & _FP_OAM_STAT_ACTION_VALID) && 8294 ((oam_stat_node->flags & _FP_OAM_STAT_ACTION_DIRTY) == 0)) { 8295 oam_action = oam_stat_node->oam_stat_action; 8296 if (oam_action != NULL) { 8297 f_ent_oam_wb->oam_stat_action_wb[idx].stat_object = 8298 oam_action->stat_object; 8299 f_ent_oam_wb->oam_stat_action_wb[idx].stat_mode_id = 8300 oam_action->stat_mode_id; 8301 } 8302 idx++; 8303 } 8304 oam_stat_node = oam_stat_node->next; 8305 } 8306 8307 /* Add oam stat count */ 8308 f_ent_oam_wb->oam_stat_action_count = idx; 8309 } 8310 8311 return BCM_E_NONE; 8312 } 8313 8314 /* Function: _field_oam_stat_action_scache_recover 8315 * 8316 * Purpose: 8317 * Recover Oam Stat action information from scache 8318 * Parameters: 8319 * unit - (IN) BCM device number. 8320 * fc - (IN) Field Control. 8321 * stage_fc - (IN) Stage Control. 8322 * scache_ptr - (INOUT) Scache Pointer. 8323 * Returns: 8324 * BCM_E_XXXX. 8325 */ 8326 int _field_oam_stat_action_scache_recover (int unit, 8327 _field_stage_t *stage_fc, 8328 _field_entry_t *f_ent, 8329 _field_entry_oam_wb_t *f_ent_oam_wb) 8330 { 8331 bcm_field_oam_stat_action_t oam_stat_action; 8332 int idx = 0; 8333 _field_oam_stat_action_t *oam_stat_node = NULL; /* Oam Stat Action Node */ 8334 int8 oam_lm_stat_pool_id = -1; /* Oam Lm Stat Pool Id */ 8335 int rv = BCM_E_NONE; 8336 8337 8338 if ((f_ent == NULL) || (f_ent_oam_wb == NULL) || (stage_fc == NULL)) { 8339 return BCM_E_PARAM; 8340 } 8341 8342 if (stage_fc->stage_id != _BCM_FIELD_STAGE_INGRESS) { 8343 return BCM_E_NONE; 8344 } 8345 8346 if ((f_ent_oam_wb->is_present_bmp & _FP_OAM_STAT_ACTION_WB_SYNC) == 0) { 8347 return BCM_E_NONE; 8348 } 8349 8350 if (f_ent_oam_wb->oam_stat_action_count == 0) { 8351 return BCM_E_NONE; 8352 } 8353 8354 for (idx = 0 ; idx < f_ent_oam_wb->oam_stat_action_count; idx++) { 8355 sal_memset (&oam_stat_action, 0, sizeof(bcm_field_oam_stat_action_t)); 8356 oam_stat_action.stat_object = f_ent_oam_wb->oam_stat_action_wb[idx].stat_object; 8357 oam_stat_action.stat_mode_id = f_ent_oam_wb->oam_stat_action_wb[idx].stat_mode_id; 8358 oam_stat_action.action = bcmFieldStatActionNone; 8359 8360 oam_stat_node = NULL; 8361 8362 /* Allocate memory and copy the input params */ 8363 _FP_XGS3_ALLOC(oam_stat_node, sizeof (_field_oam_stat_action_t), 8364 "field oam stat action node"); 8365 if (oam_stat_node == NULL) { 8366 LOG_ERROR(BSL_LS_BCM_FP, 8367 (BSL_META_U(unit, 8368 "FP(unit %d) Error: allocation failure for " 8369 "oam_stat_action_node\n"), unit)); 8370 return (BCM_E_MEMORY); 8371 } 8372 8373 /* Allocate memory and copy the input params */ 8374 _FP_XGS3_ALLOC(oam_stat_node->oam_stat_action, 8375 sizeof (bcm_field_oam_stat_action_t), 8376 "field oam stat action params"); 8377 if (oam_stat_node->oam_stat_action == NULL) { 8378 LOG_ERROR(BSL_LS_BCM_FP, 8379 (BSL_META_U(unit, 8380 "FP(unit %d) Error: allocation failure for " 8381 "oam_stat_action_node\n"), unit)); 8382 sal_free (oam_stat_node); 8383 return (BCM_E_MEMORY); 8384 } 8385 8386 /* Get Flex Stat PoolId from the Stat Object and Stat Mode Id */ 8387 rv = _field_oam_lm_stat_pool_id_get (unit, 8388 oam_stat_action.stat_object, oam_stat_action.stat_mode_id, 8389 &oam_lm_stat_pool_id); 8390 if (BCM_FAILURE(rv)) { 8391 sal_free (oam_stat_node->oam_stat_action); 8392 sal_free (oam_stat_node); 8393 return rv; 8394 } 8395 8396 /* Copy the input parameters and insert to linked list */ 8397 sal_memcpy (oam_stat_node->oam_stat_action, &oam_stat_action, 8398 sizeof (bcm_field_oam_stat_action_t)); 8399 oam_stat_node->flex_pool_id = oam_lm_stat_pool_id; 8400 oam_stat_node->next = NULL; 8401 oam_stat_node->flags |= _FP_OAM_STAT_ACTION_VALID; 8402 8403 /* Add node to link list */ 8404 _FP_LINKLIST_INSERT(&(f_ent->field_oam_stat_action), oam_stat_node, &rv); 8405 if (BCM_FAILURE(rv)) { 8406 sal_free (oam_stat_node->oam_stat_action); 8407 sal_free (oam_stat_node); 8408 return rv; 8409 } 8410 8411 f_ent->flags |= _FP_ENTRY_OAM_STAT_VALID; 8412 } 8413 8414 return BCM_E_NONE; 8415 } 8416 8417 /* Function: _field_oam_stat_action_wb_add 8418 * 8419 * Purpose: 8420 * Recover Oam Stat action information from H/W 8421 * and add it to the structure 8422 * Parameters: 8423 * unit - (IN) BCM device number. 8424 * fc - (IN) Field Control. 8425 * stage_fc - (IN) Stage Control. 8426 * scache_ptr - (INOUT) Scache Pointer. 8427 * Returns: 8428 * BCM_E_XXXX. 8429 */ 8430 int _field_oam_stat_action_wb_add (int unit, _field_entry_t *f_ent, 8431 _field_oam_action_recover_t *oam_action_hw) 8432 { 8433 _field_oam_stat_action_t *oam_stat_node = NULL; /* Oam Stat Action Node */ 8434 bcm_field_oam_stat_action_t *oam_action; 8435 int idx = 0; 8436 uint8 *local_pool_instance = NULL; 8437 8438 if ((f_ent == NULL) || (oam_action_hw == NULL)) { 8439 return BCM_E_PARAM; 8440 } 8441 8442 _FP_XGS3_ALLOC(local_pool_instance, sizeof (uint8), 8443 "local_pool_instance"); 8444 if (local_pool_instance == NULL) { 8445 return BCM_E_PARAM; 8446 } 8447 8448 sal_memcpy (local_pool_instance, 8449 &(f_ent->oam_pool_instance), sizeof(uint8)); 8450 8451 oam_stat_node = f_ent->field_oam_stat_action; 8452 8453 while (oam_stat_node != NULL) { 8454 for (idx = 0; idx < 3; idx++) { 8455 if ((oam_stat_node->flex_pool_id 8456 == oam_action_hw[idx].flex_pool_id)) { 8457 /* Set Pool instance */ 8458 oam_stat_node->pool_instance = idx; 8459 /* Reserve the pool instance in f_ent*/ 8460 SHR_BITSET(local_pool_instance, idx); 8461 /* Set the oam action */ 8462 oam_action = oam_stat_node->oam_stat_action; 8463 if (oam_action != NULL) { 8464 oam_action->action = 8465 (oam_action_hw[oam_stat_node->pool_instance].action); 8466 } 8467 break; 8468 } 8469 } 8470 oam_stat_node = oam_stat_node->next; 8471 } 8472 8473 f_ent->oam_pool_instance = *local_pool_instance; 8474 sal_free (local_pool_instance); 8475 local_pool_instance = NULL; 8476 8477 return BCM_E_NONE; 8478 } 8479 8480 8481 /* Function: _field_extended_stat_scache_sync 8482 * 8483 * Purpose: 8484 * Sync Oam Stat Action information into scache 8485 * Parameters: 8486 * unit - (IN) BCM device number. 8487 * fc - (IN) Field Control. 8488 * stage_fc - (IN) Stage Control. 8489 * scache_ptr - (INOUT) Scache Pointer. 8490 * Returns: 8491 * BCM_E_XXXX. 8492 */ 8493 int _field_extended_stat_scache_sync (int unit, _field_stage_t *stage_fc, 8494 _field_entry_t *f_ent, _field_entry_oam_wb_t *f_ent_oam_wb) 8495 { 8496 _field_entry_stat_t *f_ent_st; /* Field entry statistics structure.*/ 8497 _field_stat_t *f_st; /* Internal statisics descriptor. */ 8498 int rv = BCM_E_NONE; 8499 _field_extended_stat_wb_t *extended_stat_wb = NULL; 8500 8501 8502 if ((stage_fc == NULL) || (f_ent_oam_wb == NULL) || (f_ent == NULL)) { 8503 return BCM_E_PARAM; 8504 } 8505 8506 if ((stage_fc->stage_id != _BCM_FIELD_STAGE_INGRESS) && 8507 (stage_fc->stage_id != _BCM_FIELD_STAGE_EGRESS)) { 8508 return BCM_E_NONE; 8509 } 8510 8511 f_ent_st = &f_ent->statistic; 8512 8513 if ((f_ent_st->flags & _FP_ENTRY_EXTENDED_STAT_VALID) 8514 && (f_ent_st->flags & _FP_ENTRY_EXTENDED_STAT_INSTALLED)) { 8515 /* Set Bitmap for syncing extended stats */ 8516 f_ent_oam_wb->is_present_bmp |= _FP_EXTENDED_STATS_WB_SYNC; 8517 8518 _FP_XGS3_ALLOC(f_ent_oam_wb->extended_stat_wb, 8519 (sizeof (_field_extended_stat_wb_t)), 8520 "Extended Stat WB"); 8521 if (f_ent_oam_wb->extended_stat_wb == NULL) { 8522 return BCM_E_MEMORY; 8523 } 8524 extended_stat_wb = f_ent_oam_wb->extended_stat_wb; 8525 8526 extended_stat_wb->stat_id = f_ent_st->extended_sid; 8527 8528 /* Get statistics entity description structure. */ 8529 rv = _bcm_field_stat_get(unit, f_ent_st->extended_sid , &f_st); 8530 if (BCM_FAILURE(rv)) { 8531 sal_free (f_ent_oam_wb->extended_stat_wb); 8532 f_ent_oam_wb->extended_stat_wb = NULL; 8533 return (rv); 8534 } 8535 8536 extended_stat_wb->flex_mode = f_st->flex_mode; 8537 extended_stat_wb->hw_flags = f_st->hw_flags; 8538 8539 switch(f_st->nstat) { 8540 case 1:if(f_st->stat_arr[0] == bcmFieldStatBytes) { 8541 extended_stat_wb->flex_stat_map = 1; 8542 } else { 8543 extended_stat_wb->flex_stat_map = 2; 8544 } 8545 break; 8546 case 2: 8547 default: /* Although 0-and-default cases are invalid */ 8548 extended_stat_wb->flex_stat_map = 3; 8549 break; 8550 } 8551 } 8552 8553 return BCM_E_NONE; 8554 } 8555 8556 /* Function: _field_extended_stat_scache_recover 8557 * 8558 * Purpose: 8559 * Sync Oam Stat Action information into scache 8560 * Parameters: 8561 * unit - (IN) BCM device number. 8562 * fc - (IN) Field Control. 8563 * stage_fc - (IN) Stage Control. 8564 * scache_ptr - (INOUT) Scache Pointer. 8565 * Returns: 8566 * BCM_E_XXXX. 8567 */ 8568 int _field_extended_flex_counter_recover(int unit, _field_entry_t *f_ent, 8569 int part, bcm_field_stat_t sid, 8570 _field_entry_oam_wb_t *f_ent_oam_wb, 8571 bcm_field_stat_action_t action) 8572 { 8573 _field_group_t *fg=NULL; 8574 _field_stage_t *stage_fc=NULL; 8575 _field_stage_id_t stage_id; 8576 _field_control_t *fc=NULL; 8577 _field_stat_t *f_st = NULL; 8578 _field_entry_stat_t *f_ent_st = NULL; 8579 int rv=0; 8580 int stat_id=0; 8581 bcm_field_stat_t stat_arr[2]={bcmFieldStatBytes, bcmFieldStatPackets}; 8582 uint8 nstat = 2; 8583 _field_extended_stat_wb_t *extended_stats; 8584 bcm_stat_group_mode_t stat_mode; /* Stat type bcmStatGroupModeXXX. */ 8585 bcm_stat_object_t stat_obj; /* Stat object type. */ 8586 uint32 pool_num; /* Flex Stat Hw Pool No. */ 8587 uint32 base_index; /* Flex Stat counter base index. */ 8588 int offset_mode = 0; 8589 8590 /* Input Param Check */ 8591 if (f_ent_oam_wb == NULL) { 8592 return BCM_E_NONE; 8593 } 8594 8595 extended_stats = f_ent_oam_wb->extended_stat_wb; 8596 if (extended_stats == NULL) { 8597 return BCM_E_NONE; 8598 } 8599 8600 stage_id = f_ent->group->stage_id; 8601 8602 /* Valid only for Ingress and Egress Stage */ 8603 if ((stage_id != _BCM_FIELD_STAGE_INGRESS) 8604 && (stage_id != _BCM_FIELD_STAGE_EGRESS)) { 8605 return BCM_E_NONE; 8606 } 8607 8608 /* Get field control and stage control */ 8609 BCM_IF_ERROR_RETURN(_field_control_get(unit, &fc)); 8610 BCM_IF_ERROR_RETURN(_field_stage_control_get(unit, stage_id, &stage_fc)); 8611 8612 /* if not level 2 warmboot return */ 8613 if (!fc->l2warm) { 8614 return BCM_E_NONE; 8615 } 8616 8617 rv = _bcm_field_stat_get(unit, extended_stats->stat_id, &f_st); 8618 if (!((rv == BCM_E_NOT_FOUND) || (rv == BCM_E_NONE))) { 8619 return rv; 8620 } 8621 8622 if (rv == BCM_E_NOT_FOUND) { 8623 stat_id = extended_stats->stat_id; 8624 8625 _FP_XGS3_ALLOC(f_st, sizeof (_field_stat_t), "Field stat entity"); 8626 if (NULL == f_st) { 8627 return (BCM_E_MEMORY); 8628 } 8629 8630 fg = f_ent->group; 8631 8632 f_st->hw_ref_count = 0; 8633 f_st->sw_ref_count = 1; 8634 f_st->pool_index = _FP_INVALID_INDEX; 8635 f_st->hw_index = _FP_INVALID_INDEX; 8636 f_st->sid = stat_id; 8637 f_st->hw_flags = 0; /* INTERNAL */ 8638 f_st->stage_id = fg->stage_id; 8639 f_st->gid = fg->gid; 8640 /* Allocate counters array. */ 8641 switch(extended_stats->flex_stat_map) { 8642 case 1: 8643 nstat = 1; 8644 stat_arr[0] = bcmFieldStatBytes; 8645 LOG_VERBOSE(BSL_LS_BCM_FP, 8646 (BSL_META_U(unit, 8647 "_field_flex_counter_recover:" 8648 " StatBytes \n"))); 8649 break; 8650 case 2: 8651 nstat = 1; 8652 stat_arr[0] = bcmFieldStatPackets; 8653 LOG_VERBOSE(BSL_LS_BCM_FP, 8654 (BSL_META_U(unit, 8655 "_field_flex_counter_recover:" 8656 " StatPackets \n"))); 8657 break; 8658 case 3: 8659 LOG_VERBOSE(BSL_LS_BCM_FP, 8660 (BSL_META_U(unit, 8661 "_field_flex_counter_recover: " 8662 " StatBytes & Packets\n"))); 8663 break; 8664 default: 8665 LOG_WARN(BSL_LS_BCM_FP, 8666 (BSL_META_U(unit, 8667 "_field_flex_counter_recover: " 8668 " Default Bytes&Pkts.\n"))); 8669 break; 8670 } 8671 8672 /* Get field control and stage control */ 8673 rv = _field_control_get(unit, &fc); 8674 if (BCM_FAILURE(rv)) { 8675 sal_free(f_st); 8676 return (rv); 8677 } 8678 8679 rv = _bcm_field_stat_array_init(unit, fc, f_st, nstat, stat_arr); 8680 if (BCM_FAILURE(rv)) { 8681 sal_free(f_st); 8682 return (rv); 8683 } 8684 f_st->hw_entry_count = 1; 8685 _FP_HASH_INSERT(fc->stat_hash, f_st, 8686 (stat_id & _FP_HASH_INDEX_MASK(fc))); 8687 fc->stat_count++; 8688 } 8689 8690 f_ent_st = &f_ent->statistic; 8691 f_st->hw_ref_count++; 8692 f_st->sw_ref_count++; 8693 /* Associate the stat object with the entry */ 8694 f_ent_st->flags |= _FP_ENTRY_EXTENDED_STAT_VALID; 8695 f_ent_st->flags |= _FP_ENTRY_EXTENDED_STAT_INSTALLED; 8696 f_ent_st->extended_sid = f_st->sid; 8697 f_ent_st->stat_action = action; 8698 8699 if (!soc_feature(unit, soc_feature_advanced_flex_counter)) { 8700 return BCM_E_INTERNAL; 8701 } 8702 8703 rv = _bcm_field_stat_get(unit, f_ent_st->extended_sid , &f_st); 8704 if (BCM_FAILURE(rv)) { 8705 return rv; 8706 } 8707 8708 if (extended_stats->flex_mode != 0) { 8709 8710 f_st->flex_mode = extended_stats->flex_mode; 8711 f_st->hw_flags = extended_stats->hw_flags; 8712 _bcm_esw_stat_get_counter_id_info(unit, f_st->flex_mode, 8713 &stat_mode, 8714 &stat_obj, 8715 (uint32 *)&offset_mode, 8716 &pool_num, 8717 &base_index 8718 ); 8719 f_st->hw_index = base_index; 8720 f_st->pool_index = pool_num; 8721 f_st->hw_mode = offset_mode; /* offset_mode from counter info */ 8722 f_st->hw_entry_count = 1; /* PlsNote:For SingleMode=1 */ 8723 /* Currently OnlySingleMode is supportes so above OK */ 8724 /* else decision will be based on stat_mode */ 8725 } 8726 8727 return BCM_E_NONE; 8728 } 8729 8730 #endif /* BCM_WARM_BOOT_SUPPORT */ 8731 #endif /* BCM_TRIDENT2PLUS_SUPPORT && BCM_FIELD_SUPPORT */