xgs5.h (59310B)
1 /* 2 * 3 * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file. 4 * 5 * Copyright 2007-2020 Broadcom Inc. All rights reserved. 6 * 7 * File: xgs5.h 8 * Purpose: Definitions for XGS5 systems. 9 */ 10 11 #ifndef _BCM_INT_XGS5_H_ 12 #define _BCM_INT_XGS5_H_ 13 #include <shared/shr_bprof.h> 14 15 #include <bcm/qos.h> 16 #include <bcm/switch.h> 17 #include <bcm_int/esw/subport.h> 18 #include <bcm_int/esw/port.h> 19 #if defined(INCLUDE_FLOWTRACKER) 20 #include <soc/shared/ft_msg.h> 21 #include <bcm_int/esw/flowtracker.h> 22 #include <bcm/cosq.h> 23 #include <soc/shared/qcm.h> 24 #endif 25 #include <soc/esw/port.h> 26 27 #include <bcm/ecn.h> 28 #ifdef BCM_MPLS_SUPPORT 29 #include <bcm/mpls.h> 30 #endif 31 32 #if defined(INCLUDE_IFA) 33 #include <bcm/ifa.h> 34 #endif 35 36 #if defined(INCLUDE_BFD) 37 38 #include <soc/mcm/allenum.h> 39 #include <soc/tnl_term.h> 40 #include <bcm/tunnel.h> 41 #include <bcm/bfd.h> 42 #include <bcm_int/esw/bfd.h> 43 44 /* 45 * Local RX DMA channel 46 * 47 * This is the channel number local to the uC (0..3). 48 * Each uController application needs to use a different RX DMA channel. 49 */ 50 #define BCM_XGS5_BFD_RX_CHANNEL 1 51 52 53 /* 54 * Device Specific HW Definitions 55 */ 56 57 /* Device programming routines */ 58 typedef struct bcm_xgs5_bfd_hw_calls_s { 59 int (*l3_tnl_term_entry_init)(int unit, 60 bcm_tunnel_terminator_t *tnl_info, 61 soc_tunnel_term_t *entry); 62 int (*mpls_lock)(int unit); 63 void (*mpls_unlock)(int unit); 64 } bcm_xgs5_bfd_hw_calls_t; 65 66 /* L2 Table */ 67 typedef struct bcm_xgs5_bfd_l2_table_s { 68 soc_mem_t mem; 69 soc_field_t key_type; 70 uint32 bfd_key_type; 71 soc_field_t valid; 72 soc_field_t static_bit; 73 soc_field_t session_id_type; 74 soc_field_t your_discr; 75 soc_field_t label; 76 soc_field_t session_index; 77 soc_field_t cpu_queue_class; 78 soc_field_t remote; 79 soc_field_t dst_module; 80 soc_field_t dst_port; 81 soc_field_t int_pri; 82 } bcm_xgs5_bfd_l2_table_t; 83 84 /* L3 IPv4 Unicast Table */ 85 typedef struct bcm_xgs5_bfd_l3_ipv4_table_s { 86 soc_mem_t mem; 87 soc_field_t vrf_id; 88 soc_field_t ip_addr; 89 soc_field_t key_type; 90 soc_field_t local_address; 91 soc_field_t bfd_enable; 92 } bcm_xgs5_bfd_l3_ipv4_table_t; 93 94 /* L3 IPv6 Unicast Table */ 95 typedef struct bcm_xgs5_bfd_l3_ipv6_table_s { 96 soc_mem_t mem; 97 soc_field_t ip_addr_lwr_64; 98 soc_field_t ip_addr_upr_64; 99 soc_field_t key_type_0; 100 soc_field_t key_type_1; 101 soc_field_t vrf_id; 102 soc_field_t local_address; 103 soc_field_t bfd_enable; 104 soc_field_t base_valid_0; 105 soc_field_t base_valid_1; 106 soc_field_t key_type; 107 soc_field_t data_type; 108 } bcm_xgs5_bfd_l3_ipv6_table_t; 109 110 /* L3 Tunnel Table */ 111 typedef struct bcm_xgs5_bfd_l3_tunnel_table_s { 112 soc_mem_t mem; 113 soc_field_t bfd_enable; 114 } bcm_xgs5_bfd_l3_tunnel_table_t; 115 116 /* L3 Tunnel Table IPV6*/ 117 typedef struct bcm_xgs5_bfd_l3_tunnel_ipv6_table_s { 118 soc_mem_t mem; 119 soc_field_t bfd_enable; 120 } bcm_xgs5_bfd_l3_tunnel_ipv6_table_t; 121 122 /* MPLS Table */ 123 typedef struct bcm_xgs5_bfd_mpls_table_s { 124 soc_mem_t mem; 125 soc_field_t valid; 126 soc_field_t key_type; 127 uint32 key_type_value; 128 soc_field_t mpls_label; 129 soc_field_t session_id_type; 130 soc_field_t bfd_enable; 131 soc_field_t cw_check_ctrl; 132 soc_field_t pw_cc_type; 133 soc_field_t mpls_action_if_bos; 134 soc_field_t l3_iif; 135 soc_field_t decap_use_ttl; 136 soc_field_t mod_id; 137 soc_field_t port_num; 138 } bcm_xgs5_bfd_mpls_table_t; 139 140 /* HW Definitions */ 141 typedef struct bcm_xgs5_bfd_hw_defs_t { 142 bcm_xgs5_bfd_hw_calls_t *hw_call; /* Chip programming */ 143 bcm_xgs5_bfd_l2_table_t *l2; /* L2 Memory Table */ 144 bcm_xgs5_bfd_l3_ipv4_table_t *l3_ipv4; /* L3 IPv4 UC Table */ 145 bcm_xgs5_bfd_l3_ipv6_table_t *l3_ipv6; /* L3 IPv6 UC Table */ 146 bcm_xgs5_bfd_l3_tunnel_table_t *l3_tunnel; /* L3 Tunnel Table */ 147 bcm_xgs5_bfd_l3_tunnel_ipv6_table_t *l3_tunnel_ipv6; /*L3 Tunnel IPV6 table */ 148 bcm_xgs5_bfd_mpls_table_t *mpls; /* MPLS Table */ 149 uint8 bfd_feature_enable; /*Save BFD Feature Flag */ 150 } bcm_xgs5_bfd_hw_defs_t; 151 152 153 /* Functions */ 154 extern 155 int bcmi_xgs5_bfd_init(int unit, 156 bcm_esw_bfd_drv_t *drv, 157 bcm_xgs5_bfd_hw_defs_t *hw_defs); 158 extern 159 int bcmi_xgs5_bfd_detach(int unit); 160 extern 161 int bcmi_xgs5_bfd_endpoint_create(int unit, 162 bcm_bfd_endpoint_info_t *endpoint_info); 163 extern 164 int bcmi_xgs5_bfd_endpoint_get(int unit, bcm_bfd_endpoint_t endpoint, 165 bcm_bfd_endpoint_info_t *endpoint_info); 166 extern 167 int bcmi_xgs5_bfd_tx_start(int unit); 168 extern 169 int bcmi_xgs5_bfd_tx_stop(int unit); 170 extern 171 int bcmi_xgs5_bfd_endpoint_destroy(int unit, 172 bcm_bfd_endpoint_t endpoint); 173 extern 174 int bcmi_xgs5_bfd_endpoint_destroy_all(int unit); 175 extern 176 int bcmi_xgs5_bfd_endpoint_poll(int unit, bcm_bfd_endpoint_t endpoint); 177 extern 178 int bcmi_xgs5_bfd_event_register(int unit, 179 bcm_bfd_event_types_t event_types, 180 bcm_bfd_event_cb cb, void *user_data); 181 extern 182 int bcmi_xgs5_bfd_event_unregister(int unit, 183 bcm_bfd_event_types_t event_types, 184 bcm_bfd_event_cb cb); 185 extern 186 int bcmi_xgs5_bfd_endpoint_stat_get(int unit, 187 bcm_bfd_endpoint_t endpoint, 188 bcm_bfd_endpoint_stat_t *ctr_info, 189 uint32 options); 190 extern 191 int bcmi_xgs5_bfd_auth_sha1_set(int unit, int index, 192 bcm_bfd_auth_sha1_t *sha1); 193 extern 194 int bcmi_xgs5_bfd_auth_sha1_get(int unit, int index, 195 bcm_bfd_auth_sha1_t *sha1); 196 extern 197 int bcmi_xgs5_bfd_auth_simple_password_set(int unit, int index, 198 bcm_bfd_auth_simple_password_t *sp); 199 extern 200 int bcmi_xgs5_bfd_auth_simple_password_get(int unit, int index, 201 bcm_bfd_auth_simple_password_t *sp); 202 extern 203 int bcmi_xgs5_bfd_status_multi_get(int unit, int max_endpoints, 204 bcm_bfd_status_t *status_arr, 205 int *count); 206 extern 207 int bcmi_xgs5_bfd_discard_stat_set(int unit, 208 bcm_bfd_discard_stat_t *discarded_info); 209 extern 210 int bcmi_xgs5_bfd_discard_stat_get(int unit, 211 bcm_bfd_discard_stat_t *discarded_info); 212 213 #ifdef BCM_WARM_BOOT_SUPPORT 214 extern 215 int bcmi_xgs5_bfd_sync(int unit); 216 217 extern 218 int _bcmi_bfd_wb_downgrade_config_set(int unit, uint32 warmboot_ver); 219 #endif /* BCM_WARM_BOOT_SUPPORT */ 220 221 #ifdef BCM_WARM_BOOT_SUPPORT_SW_DUMP 222 extern 223 void bcmi_xgs5_bfd_sw_dump(int unit); 224 #endif /* BCM_WARM_BOOT_SUPPORT_SW_DUMP */ 225 226 extern 227 void bcmi_xgs5_bfd_dump_trace(int unit); 228 #endif /* INCLUDE_BFD */ 229 230 /* ING Port Table */ 231 typedef struct bcmi_xgs5_subport_coe_ing_port_table_s { 232 soc_mem_t mem; 233 soc_field_t port_type; 234 } bcmi_xgs5_subport_coe_ing_port_table_t; 235 236 /* EGR Port Table */ 237 typedef struct bcmi_xgs5_subport_coe_egr_port_table_s { 238 soc_mem_t mem; 239 soc_field_t port_type; 240 } bcmi_xgs5_subport_coe_egr_port_table_t; 241 242 /* Subport Tag SGPP Memory Table */ 243 typedef struct bcmi_xgs5_subport_coe_subport_tag_sgpp_table_s { 244 soc_mem_t mem; 245 soc_field_t valid; 246 soc_field_t subport_tag; 247 soc_field_t subport_tag_mask; 248 soc_field_t subport_tag_namespace; 249 soc_field_t subport_tag_namespace_mask; 250 soc_field_t src_modid; 251 soc_field_t src_port; 252 soc_field_t phb_enable; 253 soc_field_t int_pri; 254 soc_field_t cng; 255 } bcmi_xgs5_subport_coe_subport_tag_sgpp_table_t; 256 257 /* Modport map subport Memory Table */ 258 typedef struct bcmi_xgs5_subport_coe_modport_map_subport_table_s { 259 soc_mem_t mem; 260 soc_field_t dest; 261 soc_field_t is_trunk; 262 soc_field_t enable; 263 #ifdef BCM_FIREBOLT6_SUPPORT 264 soc_field_t dst_subport; 265 #endif 266 } bcmi_xgs5_subport_coe_modport_map_subport_table_t; 267 268 /* Egress subport tag dot1p Table */ 269 typedef struct bcmi_xgs5_subport_coe_egr_subport_tag_dot1p_table_s { 270 soc_mem_t mem; 271 soc_field_t subport_tag_priority; 272 soc_field_t subport_tag_cfi; 273 soc_field_t subport_tag_color; 274 } bcmi_xgs5_subport_coe_egr_subport_tag_dot1p_table_t; 275 276 typedef struct bcmi_xgs5_subport_coe_hw_defs_s { 277 /* Ingress Port Memory Table */ 278 bcmi_xgs5_subport_coe_ing_port_table_t *igr_port; 279 /* Egress Port Memory Table */ 280 bcmi_xgs5_subport_coe_egr_port_table_t *egr_port; 281 /* Subport Tag SGPP Memory Table */ 282 bcmi_xgs5_subport_coe_subport_tag_sgpp_table_t *subport_tag_sgpp; 283 /* Modport map subport Memory Table */ 284 bcmi_xgs5_subport_coe_modport_map_subport_table_t *modport_map_subport; 285 /* Egress subport tag dot1p Table */ 286 bcmi_xgs5_subport_coe_egr_subport_tag_dot1p_table_t *egr_subport_tag_dot1p; 287 } bcmi_xgs5_subport_coe_hw_defs_t; 288 289 290 /* Functions */ 291 extern int bcmi_xgs5_subport_init(int unit, 292 bcm_esw_subport_drv_t *drv, 293 bcmi_xgs5_subport_coe_hw_defs_t *hw_defs); 294 extern int _bcmi_xgs5_subport_reinit(int unit); 295 extern int bcmi_xgs5_subport_coe_cleanup(int unit); 296 extern int bcmi_xgs5_subport_coe_group_create(int unit, 297 bcm_subport_group_config_t *config, 298 bcm_gport_t *group); 299 extern int bcmi_xgs5_subport_coe_group_destroy(int unit, bcm_gport_t group); 300 extern int bcmi_xgs5_subport_coe_group_get(int unit, bcm_gport_t group, 301 bcm_subport_group_config_t *config); 302 extern int bcmi_xgs5_subport_coe_group_traverse(int unit, bcm_gport_t group, 303 bcm_subport_port_traverse_cb cb, 304 void *user_data); 305 extern int bcmi_xgs5_subport_coe_port_add(int unit, bcm_subport_config_t 306 *config, bcm_gport_t *port); 307 extern int bcmi_xgs5_subport_coe_port_delete(int unit, bcm_gport_t port); 308 extern int bcmi_xgs5_subport_coe_port_get(int unit, bcm_gport_t port, 309 bcm_subport_config_t *config); 310 extern int bcmi_xgs5_subport_coe_port_traverse(int unit, 311 bcm_subport_port_traverse_cb cb, 312 void *user_data); 313 314 extern int bcmi_xgs5_subport_egr_subtag_dot1p_map_add(int unit, 315 bcm_qos_map_t *map); 316 extern int bcmi_xgs5_subport_egr_subtag_dot1p_map_delete(int unit, 317 bcm_qos_map_t *map); 318 319 extern int bcmi_xgs5_subport_subtag_port_tpid_set(int unit, bcm_gport_t gport, 320 uint16 tpid); 321 322 extern int bcmi_xgs5_subport_subtag_port_tpid_delete(int unit, 323 bcm_gport_t gport, 324 uint16 tpid); 325 326 extern int bcmi_xgs5_subport_subtag_port_tpid_get(int unit, bcm_gport_t gport, 327 uint16 *tpid); 328 329 extern int bcmi_xgs5_port_control_subtag_status_set(int unit, 330 bcm_port_t port, 331 int value); 332 333 extern int bcmi_xgs5_port_control_subtag_status_get(int unit, 334 bcm_port_t port, 335 int *value); 336 337 extern int _bcmi_xgs5_subport_group_resolve(int unit, 338 bcm_gport_t subport_group_gport, 339 bcm_module_t *modid, 340 bcm_port_t *port, 341 bcm_trunk_t *trunk_id, 342 int *id); 343 344 extern int _bcm_xgs5_subport_port_resolve(int unit, 345 bcm_gport_t subport_port_gport, 346 bcm_module_t *modid, 347 bcm_port_t *port, 348 bcm_trunk_t *trunk_id, 349 int *id); 350 351 extern int bcmi_xgs5_subport_gport_modport_get(int unit, 352 bcm_gport_t subport_gport, bcm_module_t *module, bcm_port_t *port); 353 354 extern int _bcmi_coe_subport_physical_port_get(int unit, bcm_gport_t subport, 355 int *local_port); 356 357 extern int _bcmi_coe_subport_mod_port_physical_port_get(int unit, bcm_module_t modid, 358 bcm_port_t portid, 359 int *local_port); 360 361 extern int _bcm_xgs5_subport_coe_mod_local(int unit, int modid); 362 363 extern int _bcm_xgs5_subport_gport_validate(int unit, bcm_port_t port_in, 364 bcm_port_t *port_out); 365 366 extern int _bcm_xgs5_subport_coe_mod_port_local(int unit, int modid, 367 bcm_port_t port); 368 369 extern int _bcm_xgs5_subport_coe_gport_local(int unit, bcm_gport_t gport); 370 371 extern int _bcmi_coe_multicast_subport_encap_get(int unit, 372 bcm_gport_t subport_port, 373 bcm_if_t *encap_id); 374 375 extern int _bcmi_coe_subport_tcam_idx_get(int unit, bcm_gport_t subport, 376 int *hw_idx); 377 378 extern int bcmi_xgs5_subport_coe_ether_type_size_set(int unit, 379 bcm_switch_control_t type, 380 int arg); 381 382 extern int bcmi_xgs5_subport_coe_ether_type_size_get(int unit, 383 bcm_switch_control_t type, 384 int *arg); 385 386 extern int bcmi_xgs5_subport_subtag_port_override_set(int unit, int port, int arg); 387 388 extern int bcmi_xgs5_subport_subtag_port_override_get(int unit, int port, int *arg); 389 390 extern int bcmi_xgs5_subport_port_learn_set(int unit, bcm_gport_t subport_port_id, 391 uint32 flags); 392 393 extern int bcmi_xgs5_subport_port_learn_get(int unit, bcm_gport_t subport_port_id, 394 uint32 *flags); 395 396 397 #ifdef INCLUDE_L3 398 #if (defined(BCM_TOMAHAWK_SUPPORT) || defined(BCM_TRIDENT2PLUS_SUPPORT)) 399 400 #define _BCM_MPLS_XGS5_MPLS_ACTION_IF_NOT_BOS_INVALID 0x0 401 #define _BCM_MPLS_XGS5_MPLS_ACTION_IF_NOT_BOS_POP 0x1 402 #define _BCM_MPLS_XGS5_MPLS_ACTION_IF_NOT_BOS_PHP_NHI 0x2 403 #define _BCM_MPLS_XGS5_MPLS_ACTION_IF_NOT_BOS_SWAP_NHI 0x3 404 #define _BCM_MPLS_XGS5_MPLS_ACTION_IF_NOT_BOS_SWAP_ECMP 0x4 405 #define _BCM_MPLS_XGS5_MPLS_ACTION_IF_NOT_BOS_PHP_ECMP 0x5 406 407 #define _BCM_MPLS_XGS5_MPLS_ACTION_IF_BOS_INVALID 0x0 408 #define _BCM_MPLS_XGS5_MPLS_ACTION_IF_BOS_L2_SVP 0x1 409 #define _BCM_MPLS_XGS5_MPLS_ACTION_IF_BOS_L3_IIF 0x2 410 #define _BCM_MPLS_XGS5_MPLS_ACTION_IF_BOS_SWAP_NHI 0x3 411 #define _BCM_MPLS_XGS5_MPLS_ACTION_IF_BOS_L3_NHI 0x4 412 #define _BCM_MPLS_XGS5_MPLS_ACTION_IF_BOS_L3_ECMP 0x5 413 #define _BCM_MPLS_XGS5_MPLS_ACTION_IF_BOS_SWAP_ECMP 0x6 414 #define _BCM_MPLS_XGS5_MPLS_ACTION_IF_BOS_ROE_NHI 0x7 415 416 /* ROE Tunnel Type */ 417 #define _BCM_MPLS_XGS5_MPLS_ROE_CUSTOM_TUNNEL 0x1 418 #define _BCM_MPLS_XGS5_MPLS_ROE_TUNNEL 0x2 419 420 /* TD3:MPLS_ACTION 421 * Common format used for both MPLS_ACTION_IF_NOT_BOS 422 * and MPLS_ACTION_IF_BOS.*/ 423 #define _BCM_MPLS_TD3_MPLS_ACTION_INVALID 0x0 424 #define _BCM_MPLS_TD3_MPLS_ACTION_L2_SVP 0x1 425 #define _BCM_MPLS_TD3_MPLS_ACTION_L3_IIF 0x2 426 #define _BCM_MPLS_TD3_MPLS_ACTION_SWAP 0x3 427 #define _BCM_MPLS_TD3_MPLS_ACTION_RESERVED_2 0x4 428 #define _BCM_MPLS_TD3_MPLS_ACTION_PHP 0x5 429 #define _BCM_MPLS_TD3_MPLS_ACTION_POP_SVP_ENTROPY 0x6 /*Applicable only for BOS=0 labels*/ 430 #define _BCM_MPLS_TD3_MPLS_ACTION_POP 0x7 /*Applicable only for BOS=0 labels*/ 431 #define _BCM_MPLS_TD3_MPLS_ACTION_RESERVED_1 0x8 432 433 434 435 /* MPLS functions */ 436 extern int bcmi_xgs5_mpls_tunnel_switch_get(int unit, 437 bcm_mpls_tunnel_switch_t *info); 438 extern int bcmi_xgs5_mpls_tunnel_switch_delete_all(int unit); 439 extern int bcmi_xgs5_mpls_tunnel_switch_delete(int unit, 440 bcm_mpls_tunnel_switch_t *info); 441 extern int bcmi_xgs5_mpls_tunnel_switch_add(int unit, 442 bcm_mpls_tunnel_switch_t *info); 443 extern int bcmi_xgs5_mpls_tunnel_switch_traverse(int unit, 444 bcm_mpls_tunnel_switch_traverse_cb cb, 445 void *user_data); 446 447 /***************************************************** 448 ********** ********** 449 ****** ****** 450 **** Segment Routing Changes - START **** 451 */ 452 extern int bcmi_xgs5_mpls_tunnel_initiator_set(int unit, 453 bcm_if_t intf, int num_labels, 454 bcm_mpls_egress_label_t *label_array); 455 extern int bcmi_xgs5_mpls_tunnel_initiator_get(int unit, 456 bcm_if_t intf, int label_max, 457 bcm_mpls_egress_label_t *label_array, int *label_count); 458 extern int bcmi_xgs5_mpls_tunnel_initiator_clear(int unit, int intf_id); 459 extern int bcmi_xgs5_mpls_tunnel_initiator_clear_all(int unit); 460 extern int bcmi_xgs5_mpls_tunnel_initiator_reinit(int unit); 461 extern int bcmi_egr_ip_tunnel_mpls_sw_init(int unit); 462 extern int bcmi_egr_ip_tunnel_mpls_sw_cleanup(int unit); 463 /***************************************************** 464 ********** ********** 465 ****** ****** 466 **** Segment Routing Changes - END **** 467 */ 468 extern int 469 bcmi_xgs5_mpls_failover_nw_port_match_get(int unit, bcm_mpls_port_t *mpls_port, 470 int vp, mpls_entry_entry_t *return_ment); 471 472 /* End of MPLS functions */ 473 474 #endif /* (defined(BCM_TOMAHAWK_SUPPORT) || defined(BCM_TRIDENT2PLUS_SUPPORT)) */ 475 #if (defined(BCM_TOMAHAWK2_SUPPORT) || defined(BCM_TRIDENT3_SUPPORT)) 476 extern int bcmi_xgs5_mpls_ecn_map_create(int unit, uint32 flags, 477 int *map_id); 478 extern int bcmi_xgs5_mpls_ecn_map_destroy(int unit, int map_id); 479 extern int bcmi_xgs5_mpls_ecn_map_set(int unit, int map_id, 480 bcm_ecn_map_t *map); 481 extern int bcmi_xgs5_mpls_ecn_map_get(int unit, int map_id, 482 bcm_ecn_map_t *map); 483 extern int 484 bcmi_xgs5_mpls_ecn_port_map_get(int unit, bcm_gport_t port, 485 bcm_ecn_port_map_t* ecn_map); 486 extern int 487 bcmi_xgs5_mpls_ecn_port_map_set(int unit, bcm_gport_t port, 488 bcm_ecn_port_map_t* ecn_map); 489 490 #endif /* BCM_TOMAHAWK2_SUPPORT */ 491 492 extern int bcmi_xgs5_ecn_map_create(int unit, uint32 flags, 493 int *map_id); 494 extern int bcmi_xgs5_ecn_map_destroy(int unit, int map_id); 495 extern int bcmi_xgs5_ecn_map_set(int unit, int map_id, 496 bcm_ecn_map_t *map); 497 extern int bcmi_xgs5_ecn_map_get(int unit, int map_id, 498 bcm_ecn_map_t *map); 499 extern int 500 bcmi_xgs5_ecn_port_map_get(int unit, bcm_gport_t port, 501 bcm_ecn_port_map_t* ecn_map); 502 extern int 503 bcmi_xgs5_ecn_port_map_set(int unit, bcm_gport_t port, 504 bcm_ecn_port_map_t* ecn_map); 505 506 extern int bcmi_xgs5_ecn_init(int unit); 507 #ifdef BCM_WARM_BOOT_SUPPORT_SW_DUMP 508 extern void bcmi_xgs5_ecn_sw_dump(int unit); 509 #endif 510 #endif /* INCLUDE_L3 */ 511 512 513 /* EP Redirection definitions */ 514 515 /* Device specific hardware defines */ 516 /* EGR Port Table */ 517 typedef struct bcmi_xgs5_port_redirection_egr_port_table_s { 518 soc_mem_t mem; 519 soc_field_t dest_type; 520 soc_field_t dest_value; 521 soc_field_t drop_original; 522 soc_field_t pkt_priority; 523 soc_field_t pkt_change_priority; 524 soc_field_t pkt_color; 525 soc_field_t pkt_change_color; 526 soc_field_t strength; 527 soc_field_t buffer_priority; 528 soc_field_t action; 529 soc_field_t redir_pkt_source; 530 soc_field_t redir_pkt_truncate; 531 } bcmi_xgs5_port_redirection_egr_port_table_t; 532 533 /* Port hardware defs */ 534 typedef struct bcmi_xgs5_port_hw_defs_s { 535 bcmi_xgs5_port_redirection_egr_port_table_t *egr_port; 536 } bcmi_xgs5_port_hw_defs_t; 537 538 /* 539 * Port Functions 540 */ 541 542 /* 543 * FlexPort Operations Changes 544 * 545 * Flags to be used to determine the type of operations required 546 * when the FlexPort API multi_set() is called. 547 * 548 * OP_NONE - No changes. 549 * OP_REMAP - Change in port mapping. It requires FlexPort sequence. 550 * OP_LANES - Change in lanes. It requires FlexPort sequence. 551 * OP_SPEED - Change in speed. This is covered in a FlexPort sequence. 552 * If 'remap' or 'lanes' are not changing, then 553 * calling the 'speed' set function is enough (no need 554 * to call the FlexPort sequence). 555 * OP_ENCAP - Change in encap mode. It is NOT covered in a FlexPort 556 * sequence, so an explicit call must be made to change 557 * the encap mode. 558 * OP_ADD - Add a new logical port. It requires FlexPort sequence. 559 * OP_DEL - Delete a logical port. It requires FlexPort sequence. 560 * OP_ACTIVE - Active a logical port. It requires FlexPort sequence. 561 * OP_ENABLE - Enable or disable a logical port. It does NOT require 562 * FlexPort sequence. 563 * OP_CALENDAR - Only TDM calendar change. Currently only between 25G port use 25G TDM 564 * calendar and 25G port use 50G TDM. 565 * OP_ENCAP_FLEX - When change in encap mode, requires FlexPort sequence. 566 */ 567 #define BCMI_XGS5_PORT_RESOURCE_OP_NONE 0 568 #define BCMI_XGS5_PORT_RESOURCE_OP_REMAP (1 << 0) 569 #define BCMI_XGS5_PORT_RESOURCE_OP_LANES (1 << 1) 570 #define BCMI_XGS5_PORT_RESOURCE_OP_SPEED (1 << 2) 571 #define BCMI_XGS5_PORT_RESOURCE_OP_ENCAP (1 << 3) 572 #define BCMI_XGS5_PORT_RESOURCE_OP_ADD (1 << 4) 573 #define BCMI_XGS5_PORT_RESOURCE_OP_DEL (1 << 5) 574 #define BCMI_XGS5_PORT_RESOURCE_OP_ACTIVE (1 << 6) 575 #define BCMI_XGS5_PORT_RESOURCE_OP_ENABLE (1 << 7) 576 #define BCMI_XGS5_PORT_RESOURCE_OP_CALENDAR (1 << 8) 577 #define BCMI_XGS5_PORT_RESOURCE_OP_ENCAP_FLEX (1 << 9) 578 #define BCMI_XGS5_PORT_RESOURCE_OP_CHL (1 << 10) 579 580 /* 581 * Sequence of attaching a port to BCM layer. 582 * Follow the same sequence as in _bcm_modules_init() 583 */ 584 typedef enum bcmi_xgs5_port_attach_exec_seq_e{ 585 /* MMU config init */ 586 PORT_ATTACH_EXEC__MMU_INIT, 587 588 /* PORT module (bcm_esw_port_init) */ 589 PORT_ATTACH_EXEC__DSCP_PROFILE, 590 PORT_ATTACH_EXEC__SOFTWARE, 591 PORT_ATTACH_EXEC__EGR_VLAN_ACTION, 592 PORT_ATTACH_EXEC__PORT_CFG_INIT, 593 PORT_ATTACH_EXEC__PORT_PROBE, 594 PORT_ATTACH_EXEC__FRAME_LENGTH_CHECK, 595 PORT_ATTACH_EXEC__RCPU_MTU, 596 PORT_ATTACH_EXEC__OUTER_TPID, 597 PORT_ATTACH_EXEC__EGR_BLOCK_PROFILE, 598 PORT_ATTACH_EXEC__VLAN_PROTOCOL, 599 PORT_ATTACH_EXEC__EEE, 600 PORT_ATTACH_EXEC__HIGIG, 601 PORT_ATTACH_EXEC__PORT_INFO_CFG, /* Set PORT_INFO with status from HW*/ 602 PORT_ATTACH_EXEC__EGR_LINK_DELAY, 603 604 /* Other modules related to port */ 605 PORT_ATTACH_EXEC__STG, 606 PORT_ATTACH_EXEC__VLAN, 607 PORT_ATTACH_EXEC__TRUNK, 608 PORT_ATTACH_EXEC__COSQ, 609 PORT_ATTACH_EXEC__LINKSCAN, 610 PORT_ATTACH_EXEC__STATISTIC, 611 PORT_ATTACH_EXEC__STACK, 612 PORT_ATTACH_EXEC__RATE, 613 PORT_ATTACH_EXEC__FIELD, 614 PORT_ATTACH_EXEC__MIRROR, 615 PORT_ATTACH_EXEC__L3, 616 PORT_ATTACH_EXEC__IPMC, 617 PORT_ATTACH_EXEC__IPMC_REPL, 618 PORT_ATTACH_EXEC__MPLS, 619 PORT_ATTACH_EXEC__MIM, 620 621 PORT_ATTACH_EXEC__MAX 622 } bcmi_xgs5_port_attach_exec_seq_t; 623 624 #define BCMI_XGS5_PORT_ATTACH_PHASES_MSG {\ 625 "MMU init", /* PORT_ATTACH_EXEC__MMU_INIT */ \ 626 "DSCP profile", /* PORT_ATTACH_EXEC__DSCP_PROFILE */ \ 627 "Software init", /* PORT_ATTACH_EXEC__SOFTWARE */ \ 628 "Egress Vlan action", /* PORT_ATTACH_EXEC__EGR_VLAN_ACTION */ \ 629 "Port config init", /* PORT_ATTACH_EXEC__PORT_CFG_INIT */ \ 630 "Port probe", /* PORT_ATTACH_EXEC__PORT_PROBE */ \ 631 "Fram length check", /* PORT_ATTACH_EXEC__FRAME_LENGTH_CHECK */ \ 632 "RCPU MTU", /* PORT_ATTACH_EXEC__RCPU_MTU */ \ 633 "Outer TPID", /* PORT_ATTACH_EXEC__OUTER_TPID */ \ 634 "Egress block profile", /* PORT_ATTACH_EXEC__EGR_BLOCK_PROFILE */ \ 635 "Vlan protocol", /* PORT_ATTACH_EXEC__VLAN_PROTOCOL */ \ 636 "EEE config", /* PORT_ATTACH_EXEC__EEE */ \ 637 "HIGIG", /* PORT_ATTACH_EXEC__HIGIG */ \ 638 "Port info config", /* PORT_ATTACH_EXEC__PORT_INFO_CFG */ \ 639 "Egress link delay", /* PORT_ATTACH_EXEC__EGR_LINK_DELAY */ \ 640 "STG", /* PORT_ATTACH_EXEC__STG */ \ 641 "Vlan", /* PORT_ATTACH_EXEC__VLAN */ \ 642 "Trunk", /* PORT_ATTACH_EXEC__TRUNK */ \ 643 "COSQ", /* PORT_ATTACH_EXEC__COSQ */ \ 644 "Linkscan", /* PORT_ATTACH_EXEC__LINKSCAN */ \ 645 "Statistic", /* PORT_ATTACH_EXEC__STATISTIC */ \ 646 "Stack", /* PORT_ATTACH_EXEC__STACK */ \ 647 "Rate", /* PORT_ATTACH_EXEC__RATE */ \ 648 "Field", /* PORT_ATTACH_EXEC__FIELD */ \ 649 "Mirror", /* PORT_ATTACH_EXEC__MIRROR */ \ 650 "L3", /* PORT_ATTACH_EXEC__L3 */ \ 651 "IPMC", /* PORT_ATTACH_EXEC__IPMC */ \ 652 "IPMC replication", /* PORT_ATTACH_EXEC__IPMC_REPL */ \ 653 "MPLS", /* PORT_ATTACH_EXEC__MPLS */ \ 654 "MIM", /* PORT_ATTACH_EXEC__MIM */ \ 655 "Unkown phase" /* PORT_ATTACH_EXEC__MAX */ \ 656 } 657 658 /* 659 * Sequence of detaching a port from BCM layer. 660 * Follow the same sequence as in _bcm_esw_modules_deinit() 661 */ 662 typedef enum bcmi_xgs5_port_detach_exec_seq_e{ 663 664 /* Other modules related to port */ 665 PORT_DETACH_EXEC__IPMC_REPL, 666 PORT_DETACH_EXEC__IPMC, 667 PORT_DETACH_EXEC__MPLS, 668 PORT_DETACH_EXEC__MIM, 669 PORT_DETACH_EXEC__L3, 670 PORT_DETACH_EXEC__MIRROR, 671 PORT_DETACH_EXEC__FIELD, 672 PORT_DETACH_EXEC__RATE, 673 PORT_DETACH_EXEC__STACK, 674 PORT_DETACH_EXEC__COSQ, 675 PORT_DETACH_EXEC__TRUNK, 676 PORT_DETACH_EXEC__VLAN, 677 PORT_DETACH_EXEC__STG, 678 679 /* PORT module (_bcm_esw_port_deinit) */ 680 PORT_DETACH_EXEC__ASF, 681 PORT_DETACH_EXEC__EGR_LINK_DELAY, 682 PORT_DETACH_EXEC__HIGIG, 683 PORT_DETACH_EXEC__EEE, 684 PORT_DETACH_EXEC__VLAN_PROTOCOL, 685 PORT_DETACH_EXEC__EGR_BLOCK_PROFILE, 686 PORT_DETACH_EXEC__PHY, 687 PORT_DETACH_EXEC__DSCP_PROFILE, 688 PORT_DETACH_EXEC__PORT_CFG_INIT, 689 PORT_DETACH_EXEC__EGR_VLAN_ACTION, 690 PORT_DETACH_EXEC__SOFTWARE, 691 692 PORT_DETACH_EXEC__MAX 693 } bcmi_xgs5_port_detach_exec_seq_t; 694 695 #define BCMI_XGS5_PORT_DETACH_PHASES_MSG {\ 696 "IPMC replication", /* PORT_DETACH_EXEC__IPMC_REPL */ \ 697 "IPMC", /* PORT_DETACH_EXEC__IPMC */ \ 698 "MPLS", /* PORT_DETACH_EXEC__MPLS */ \ 699 "MIM", /* PORT_DETACH_EXEC__MIM */ \ 700 "L3", /* PORT_DETACH_EXEC__L3 */ \ 701 "Mirror", /* PORT_DETACH_EXEC__MIRROR */ \ 702 "Field", /* PORT_DETACH_EXEC__FIELD */ \ 703 "Rate", /* PORT_DETACH_EXEC__RATE */ \ 704 "Stack", /* PORT_DETACH_EXEC__STACK */ \ 705 "COSQ", /* PORT_DETACH_EXEC__COSQ */ \ 706 "Trunk", /* PORT_DETACH_EXEC__TRUNK */ \ 707 "Vlan", /* PORT_DETACH_EXEC__VLAN */ \ 708 "STG", /* PORT_DETACH_EXEC__STG */ \ 709 "ASF", /* PORT_DETACH_EXEC__ASF */ \ 710 "Egress link delay", /* PORT_DETACH_EXEC__EGR_LINK_DELAY */ \ 711 "HIGIG", /* PORT_DETACH_EXEC__HIGIG */ \ 712 "EEE config", /* PORT_DETACH_EXEC__EEE */ \ 713 "Vlan protocol", /* PORT_DETACH_EXEC__VLAN_PROTOCOL */ \ 714 "Egress block profile", /* PORT_DETACH_EXEC__EGR_BLOCK_PROFILE */ \ 715 "PHY Detach", /* PORT_DETACH_EXEC__PHY */ \ 716 "DSCP profile", /* PORT_DETACH_EXEC__DSCP_PROFILE */ \ 717 "Port config init", /* PORT_DETACH_EXEC__PORT_CFG_INIT */ \ 718 "Egress Vlan action", /* PORT_DETACH_EXEC__EGR_VLAN_ACTION */ \ 719 "Software", /* PORT_DETACH_EXEC__SOFTWARE */ \ 720 "Unkown phase" /* PORT_DETACH_EXEC__MAX */ \ 721 } 722 723 #define BCMI_XGS5_PORTS_PER_PBLK 4 /* Num of ports per port block */ 724 #define BCMI_XGS5_PORTS_PER_PM8X50_PBLK 8 /* Num of ports per PM8x50 block */ 725 726 /* 727 * Flexport restriction 728 */ 729 #define BCMI_XGS5_FLEXPORT_RESTRICTION_MIX_LR_OVS_DEV (1 << 0) 730 #define BCMI_XGS5_FLEXPORT_RESTRICTION_MIX_LR_OVS_PM (1 << 1) 731 #define BCMI_XGS5_FLEXPORT_RESTRICTION_PIPE_BANDWIDTH (1 << 2) 732 #define BCMI_XGS5_FLEXPORT_RESTRICTION_SPEED_CLASS (1 << 3) 733 #define BCMI_XGS5_FLEXPORT_RESTRICTION_PM_OVS_MIX_SISTER (1 << 4) 734 #define BCMI_XGS5_FLEXPORT_RESTRICTION_PM_SINGLE_PLL (1 << 5) 735 #define BCMI_XGS5_FLEXPORT_RESTRICTION_PM_MIX_ETH_HIGIG (1 << 6) 736 #define BCMI_XGS5_FLEXPORT_RESTRICTION_PORT_RATIO (1 << 7) 737 #define BCMI_XGS5_FLEXPORT_RESTRICTION_LR_OVS (1 << 8) 738 #define BCMI_XGS5_FLEXPORT_RESTRICTION_PM_HG_MIX_SPEED (1 << 9) 739 #define BCMI_XGS5_FLEXPORT_RESTRICTION_PM_LR_MIX_SISTER (1 << 10) 740 #define BCMI_XGS5_FLEXPORT_RESTRICTION_PM_DOUBLE_PLL (1 << 11) 741 742 /* 743 * Port Ratio 744 */ 745 #define BCMI_XGS5_PORT_RATIO_SINGLE (1 << 0) 746 #define BCMI_XGS5_PORT_RATIO_DUAL_1_1 (1 << 1) 747 #define BCMI_XGS5_PORT_RATIO_DUAL_2_1 (1 << 2) 748 #define BCMI_XGS5_PORT_RATIO_DUAL_1_2 (1 << 3) 749 #define BCMI_XGS5_PORT_RATIO_TRI_023_2_1_1 (1 << 4) 750 #define BCMI_XGS5_PORT_RATIO_TRI_023_4_1_1 (1 << 5) 751 #define BCMI_XGS5_PORT_RATIO_TRI_012_1_1_2 (1 << 6) 752 #define BCMI_XGS5_PORT_RATIO_TRI_012_1_1_4 (1 << 7) 753 #define BCMI_XGS5_PORT_RATIO_QUAD (1 << 8) 754 755 /* Lanes support */ 756 #define BCMI_XGS5_PORT_LANES_1 (1 << 0) 757 #define BCMI_XGS5_PORT_LANES_2 (1 << 1) 758 #define BCMI_XGS5_PORT_LANES_4 (1 << 2) 759 #define BCMI_XGS5_PORT_LANES_10 (1 << 3) 760 #define BCMI_XGS5_PORT_LANES_12 (1 << 4) 761 #define BCMI_XGS5_PORT_LANES_8 (1 << 5) 762 763 764 /* 765 * Physical Port Information 766 */ 767 typedef struct bcmi_xgs5_phy_port_s { 768 uint32 lanes_valid; /* Lanes capabilities */ 769 int pipe; 770 int flex; /* Flex enable by SOC property 771 'port_flex_enable' */ 772 int force_lb; 773 int max_lane_speed; 774 int force_hg; /* Port forced to hg mode only, per TSC port */ 775 } bcmi_xgs5_phy_port_t; 776 777 typedef struct bcmi_xgs5_speed_class_s { 778 uint32 speed_class_num; /* Max speed class num */ 779 uint32 no_mix_speed_mask; /* Not supported combination of speed classes */ 780 } bcmi_xgs5_speed_class_t; 781 782 /* 783 * Physical Device information 784 */ 785 typedef struct bcmi_xgs5_dev_info_s { 786 int num_pipe; /* Number of pipes in device */ 787 int num_tsc; /* Number of TSCs in device, not including management TSC */ 788 int phy_ports_max; /* Max physical ports in device */ 789 int ports_pipe_max[SOC_MAX_NUM_PIPES]; /* Max logical ports per pipe */ 790 int mmu_lossless; /* Default MMU lossless */ 791 int asf_prof_default;/* Default ASF MEM profile */ 792 793 /* Logical port boundary for each pipe */ 794 int pipe_bound; /* Indicate if have logic port boundary for pipe */ 795 int pipe_log_port_base[SOC_MAX_NUM_PIPES]; 796 int pipe_phy_port_base[SOC_MAX_NUM_PIPES]; 797 798 /* Ethernet speed and related Higig speed share same speed class in TDM */ 799 int speed_unify; /* Indicate that schedulers handle Ethernet ports 800 * and the related HiGig port speed identically */ 801 802 int tdm_speed_min; /* Min speed involved in DV TDM code (Mbps) */ 803 804 /* The Max packet size that is used in statistic counter update*/ 805 int cntmaxsize_xl; /* default value for XLPORT */ 806 int cntmaxsize_cl; /* default value for CLPORT */ 807 808 /* Restrictions */ 809 uint32 restriction_mask; 810 uint32 encap_mask; 811 uint32 hg_encap_mask; /* Supported Higig encap mask */ 812 uint32 port_ratio_mask; 813 uint8 aux_port_flexible; /* 1: Auxiliary ports support FlexPort opertions 814 * 0: Auxiliary ports does NOT support FlexPort 815 */ 816 pbmp_t aux_pbm; /* Port bitmap of auxiliary ports */ 817 uint32 pipe_lr_bw; /* Max line rate bandwidth (Mbps) */ 818 int tdm_pipe_lr_bw_limit_checker_speed_min; /* Min speed used in 819 * line rate bandwidth limit 820 * check calculations for 821 * TDM (Mbps) 822 */ 823 uint32 speed_valid[SOC_PORT_RESOURCE_LANES_MAX+1]; 824 bcmi_xgs5_speed_class_t speed_class; 825 bcmi_xgs5_phy_port_t *phy_port_info; 826 827 /* Bitmap of modules initialized in _bcm_modules_init */ 828 SHR_BITDCL init_cond[_SHR_BITDCLSIZE(SHR_BPROF_STATS_MAX)]; 829 830 /* Enable to do entire FlexPort sequence for encap change 831 * operation i.e BCMI_XGS5_PORT_RESOURCE_OP_ENCAP 832 */ 833 uint8 encap_change_flex; 834 } bcmi_xgs5_dev_info_t; 835 836 /* Device programming routines */ 837 typedef struct bcmi_xgs5_port_func_s { 838 int (*reconfigure_ports)(int unit, 839 soc_port_schedule_state_t *flexport_info); /*DV provide*/ 840 int (*soc_resource_init)(int unit, int nport, 841 bcm_port_resource_t *resource, 842 soc_port_resource_t *soc_resource); 843 int (*port_resource_validate)(int unit, 844 soc_port_schedule_state_t *port_schedule_state); 845 int (*pre_flexport_tdm)(int unit, 846 soc_port_schedule_state_t *port_schedule_state); 847 int (*post_flexport_tdm)(int unit, 848 soc_port_schedule_state_t *port_schedule_state); 849 int (*port_macro_update)(int unit, 850 soc_port_schedule_state_t *port_schedule_state); 851 int (*port_enable)(int unit, 852 soc_port_schedule_state_t *port_schedule_state); 853 int (*port_disable)(int unit, 854 soc_port_schedule_state_t *port_schedule_state); 855 int (*no_tdm_speed_update)(int unit, bcm_port_t port, int speed); 856 int (*speed_ability_get)(int unit, bcm_port_t port, bcm_port_abil_t *mask); 857 int (*speed_mix_validate)(int unit, uint32 speed_mask); 858 int (*port_cosmap_update)(int unit, pbmp_t pbm, int enable); 859 860 int (*port_attach_exec[PORT_ATTACH_EXEC__MAX])(int unit, bcm_port_t port); 861 int (*port_detach_exec[PORT_DETACH_EXEC__MAX])(int unit, bcm_port_t port); 862 863 } bcmi_xgs5_port_func_t; 864 865 /* HW Definitions */ 866 typedef struct bcmi_xgs5_port_drv_s { 867 bcmi_xgs5_port_func_t *port_calls;/* Chip programming */ 868 bcmi_xgs5_dev_info_t *dev_info[SOC_MAX_NUM_DEVICES];/* Device info */ 869 } bcmi_xgs5_port_drv_t; 870 871 #ifdef BCM_XGS5_SWITCH_PORT_SUPPORT 872 extern int 873 bcmi_xgs5_port_fn_drv_init(int unit, bcm_esw_port_drv_t *drv, 874 bcmi_xgs5_port_drv_t *bcmi_drv, 875 bcmi_xgs5_port_hw_defs_t *hw_defs); 876 877 extern int 878 bcmi_xgs5_port_addressable_local_get(int unit, 879 bcm_port_t port, bcm_port_t *local_port); 880 extern int 881 bcmi_xgs5_port_resource_set(int unit, 882 bcm_gport_t port, bcm_port_resource_t *resource); 883 extern int 884 bcmi_xgs5_port_resource_get(int unit, 885 bcm_gport_t port, bcm_port_resource_t *resource); 886 extern int 887 bcmi_xgs5_port_resource_multi_set(int unit, 888 int nport, bcm_port_resource_t *resource); 889 extern int 890 bcmi_xgs5_port_resource_traverse(int unit, 891 bcm_port_resource_traverse_cb trav_fn, 892 void *user_data); 893 extern int 894 bcmi_xgs5_port_lanes_set(int unit, bcm_port_t port, int lanes); 895 896 extern int 897 bcmi_xgs5_port_lanes_get(int unit, bcm_port_t port, int *lanes); 898 899 extern int 900 bcmi_xgs5_port_speed_set(int unit, bcm_port_t port, int speed); 901 902 extern int 903 bcmi_xgs5_port_resource_status_update(int unit, 904 int nport, 905 bcm_port_resource_t *resource); 906 907 extern int 908 bcmi_xgs5_port_resource_speed_multi_set(int unit, 909 int nport, 910 bcm_port_resource_t *resource); 911 912 /* 913 * Port attach 914 */ 915 extern int 916 bcmi_xgs5_port_attach_dscp(int unit, bcm_port_t port); 917 918 extern int 919 bcmi_xgs5_port_attach_dscp(int unit, bcm_port_t port); 920 921 extern int 922 bcmi_xgs5_port_attach_software(int unit, bcm_port_t port); 923 924 extern int 925 bcmi_xgs5_port_attach_egr_vlan_action(int unit, bcm_port_t port); 926 927 extern int 928 bcmi_xgs5_port_cfg_init(int unit, bcm_port_t port); 929 930 extern int 931 bcmi_xgs5_port_attach_port_probe(int unit, bcm_port_t port); 932 933 extern int 934 bcmi_xgs5_port_attach_frame_length_check(int unit, bcm_port_t port); 935 936 extern int 937 bcmi_xgs5_port_attach_rcpu_mtu(int unit, bcm_port_t port); 938 939 extern int 940 bcmi_xgs5_port_attach_outer_tpid(int unit, bcm_port_t port); 941 942 extern int 943 bcmi_xgs5_port_egr_block_profile_init(int unit, bcm_port_t port); 944 945 extern int 946 bcmi_xgs5_port_attach_vlan_protocol(int unit, bcm_port_t port); 947 948 extern int 949 bcmi_xgs5_port_attach_eee(int unit, bcm_port_t port); 950 951 extern int 952 bcmi_xgs5_port_attach_higig(int unit, bcm_port_t port); 953 954 extern int 955 bcmi_xgs5_port_attach_port_info_cfg(int unit, bcm_port_t port); 956 957 extern int 958 bcmi_xgs5_port_attach_egr_link_delay(int unit, bcm_port_t port); 959 960 extern int 961 bcmi_xgs5_port_attach_stg(int unit, bcm_port_t port); 962 963 extern int 964 bcmi_xgs5_port_attach_vlan(int unit, bcm_port_t port); 965 966 extern int 967 bcmi_xgs5_port_attach_trunk(int unit, bcm_port_t port); 968 969 extern int 970 bcmi_xgs5_port_attach_linkscan(int unit, bcm_port_t port); 971 972 extern int 973 bcmi_xgs5_port_attach_stat(int unit, bcm_port_t port); 974 975 extern int 976 bcmi_xgs5_port_attach_stack(int unit, bcm_port_t port); 977 978 extern int 979 bcmi_xgs5_port_attach_rate(int unit, bcm_port_t port); 980 981 extern int 982 bcmi_xgs5_port_attach_field(int unit, bcm_port_t port); 983 984 extern int 985 bcmi_xgs5_port_attach_mirror(int unit, bcm_port_t port); 986 987 extern int 988 bcmi_xgs5_port_attach_l3(int unit, bcm_port_t port); 989 990 extern int 991 bcmi_xgs5_port_attach_ipmc(int unit, bcm_port_t port); 992 993 extern int 994 bcmi_xgs5_port_attach_mpls(int unit, bcm_port_t port); 995 996 extern int 997 bcmi_xgs5_port_attach_mim(int unit, bcm_port_t port); 998 999 /* 1000 * Port Detach 1001 */ 1002 extern int 1003 bcmi_xgs5_port_detach_dscp(int unit, bcm_port_t port); 1004 1005 extern int 1006 bcmi_xgs5_port_detach_software(int unit, bcm_port_t port); 1007 1008 extern int 1009 bcmi_xgs5_port_detach_egr_vlan_action(int unit, bcm_port_t port); 1010 1011 extern int 1012 bcmi_xgs5_port_detach_phy(int unit, bcm_port_t port); 1013 1014 extern int 1015 bcmi_xgs5_port_detach_vlan_protocol(int unit, bcm_port_t port); 1016 1017 extern int 1018 bcmi_xgs5_port_detach_eee(int unit, bcm_port_t port); 1019 1020 extern int 1021 bcmi_xgs5_port_detach_higig(int unit, bcm_port_t port); 1022 1023 extern int 1024 bcmi_xgs5_port_detach_egr_link_delay(int unit, bcm_port_t port); 1025 1026 extern int 1027 bcmi_xgs5_port_detach_stg(int unit, bcm_port_t port); 1028 1029 extern int 1030 bcmi_xgs5_port_detach_vlan(int unit, bcm_port_t port); 1031 1032 extern int 1033 bcmi_xgs5_port_detach_trunk(int unit, bcm_port_t port); 1034 1035 extern int 1036 bcmi_xgs5_port_detach_stat(int unit, bcm_port_t port); 1037 1038 extern int 1039 bcmi_xgs5_port_detach_stack(int unit, bcm_port_t port); 1040 1041 extern int 1042 bcmi_xgs5_port_detach_rate(int unit, bcm_port_t port); 1043 1044 extern int 1045 bcmi_xgs5_port_detach_field(int unit, bcm_port_t port); 1046 1047 extern int 1048 bcmi_xgs5_port_detach_mirror(int unit, bcm_port_t port); 1049 1050 extern int 1051 bcmi_xgs5_port_detach_l3(int unit, bcm_port_t port); 1052 1053 extern int 1054 bcmi_xgs5_port_detach_ipmc(int unit, bcm_port_t port); 1055 1056 extern int 1057 bcmi_xgs5_port_detach_mpls(int unit, bcm_port_t port); 1058 1059 extern int 1060 bcmi_xgs5_port_detach_mim(int unit, bcm_port_t port); 1061 1062 extern int 1063 bcmi_xgs5_port_enable_set(int unit, bcm_port_t port, int enable); 1064 1065 extern int 1066 bcmi_xgs5_flexport_based_speed_ability_get(int unit, bcm_port_t port, 1067 bcm_port_abil_t *mask); 1068 1069 extern int 1070 bcmi_xgs5_port_encap_speed_check(int unit, bcm_port_t port, int encap, 1071 int speed); 1072 1073 extern void 1074 bcmi_esw_port_redirect_config_t_init( 1075 bcm_port_redirect_config_t *redirect_config); 1076 1077 extern int 1078 bcmi_xgs5_port_redirect_config_set(int unit, bcm_gport_t port, 1079 bcm_port_redirect_config_t *redirect_config); 1080 1081 extern int 1082 bcmi_xgs5_port_redirect_config_get(int unit, bcm_gport_t port, 1083 bcm_port_redirect_config_t *redirect_config); 1084 extern int 1085 bcmi_xgs5_port_force_lb_set(int unit); 1086 1087 extern int 1088 bcmi_xgs5_port_force_lb_check(int unit, int port, int loopback); 1089 1090 /* Debug functions for Flexport */ 1091 extern int 1092 bcmi_xgs5_num_tsc(int unit, int *num); 1093 1094 extern int 1095 bcmi_xgs5_phy_to_pipe(int unit, int phy_port, int *pipe); 1096 1097 extern int 1098 bcmi_xgs5_port_range(int unit, int pipe, int *port_start, int *port_end); 1099 1100 extern int 1101 bcmi_xgs5_speed_to_lanes(int unit, int lane_max, int *speed, int *lanes); 1102 1103 #endif /* BCM_XGS5_SWITCH_PORT_SUPPORT */ 1104 1105 #if defined (BCM_EP_REDIRECT_VERSION_2) 1106 extern int 1107 bcmi_xgs5_rx_CopyToCpu_config_add(int unit, uint32 options, 1108 bcm_rx_CopyToCpu_config_t *copyToCpu_config); 1109 1110 extern int 1111 bcmi_xgs5_rx_CopyToCpu_config_get(int unit, int index, 1112 bcm_rx_CopyToCpu_config_t *copyToCpu_config); 1113 1114 extern int 1115 bcmi_xgs5_rx_CopyToCpu_config_delete(int unit, int index); 1116 1117 extern int 1118 bcmi_xgs5_rx_CopyToCpu_config_get_all(int unit, int entries_max, 1119 bcm_rx_CopyToCpu_config_t *copyToCpu_config, 1120 int *entries_count); 1121 extern int 1122 bcmi_xgs5_rx_CopyToCpu_config_delete_all(int unit); 1123 1124 extern int 1125 bcmi_rx_copyToCpu_drop_reason_field_get(int unit, 1126 bcm_pkt_drop_reason_t drop_reason, 1127 soc_field_t *drop_reason_field); 1128 #endif 1129 typedef enum _bcmi_mpls_entry_format_fields_e { 1130 bcmiMplsLabel, 1131 bcmiMplsPushAction, 1132 bcmiMplsExpSelect, 1133 bcmiMplsExpMappingPtr, 1134 bcmiNewCfi, 1135 bcmiNewPri, 1136 bcmiMplsExp, 1137 bcmiLabelSelect, 1138 bcmiMplsTtl, 1139 bcmiSpecialLabelPushType, 1140 bcmiExpMappingTableSelect, 1141 bcmiPktEcnToExpMappingPtr, 1142 bcmiPktEcnToExpPriority, 1143 bcmiEgrFlexCtrActionSet, 1144 bcmiFlexCtrBaseCounterIdx, 1145 bcmiFlexCtrPoolNumber, 1146 bcmiRsvdFlexCtrPoolNumber, 1147 bcmiFlexCtrOffsetMode, 1148 bcmiEcnMappingEnable, 1149 bcmiEcnMappingTableSelect, 1150 bcmiMplsEntryFormatReserved 1151 1152 }_bcmi_mpls_entry_format_fields_t; 1153 1154 extern int 1155 bcmi_egr_ip_tnl_mpls_entry_format_set(int unit, int field_type, void *tnl_buf, 1156 int lbl_offset, uint32 *retbuf, 1157 int set_value); 1158 1159 extern int 1160 bcmi_egr_ip_tnl_mpls_entry_format_get(int unit, void *tnl_buf, int lbl_offset, 1161 uint32 *inbuf, int field_type, 1162 uint32 *retval); 1163 1164 extern void 1165 bcm_td3_ip_tnl_mpls_label_info_get(int unit, void *tnl_buf, int type, 1166 int offset, int *val); 1167 1168 extern int 1169 bcmi_egress_tnl_label_entry_get(int unit, void *tnl_buf, 1170 int offset, uint32 *data_buf); 1171 1172 extern int 1173 bcmi_egress_tnl_label_entry_set(int unit, void *tnl_buf, 1174 int offset, uint32 *data_buf); 1175 1176 #if defined(INCLUDE_FLOWTRACKER) 1177 /* Flowtracker functions */ 1178 extern int bcm_xgs5_ft_eapp_init(int unit); 1179 extern int bcm_xgs5_ft_eapp_detach(int unit); 1180 1181 extern int 1182 _bcm_xgs5_ft_template_list_template_add(int unit, 1183 bcm_flowtracker_export_template_t template_id, 1184 _bcm_int_ft_export_template_info_t *template_int_info); 1185 extern int 1186 _bcm_xgs5_ft_template_list_template_delete (int unit, 1187 bcm_flowtracker_export_template_t template_id); 1188 extern int 1189 _bcm_xgs5_ft_template_list_template_modify( 1190 int unit, 1191 bcm_flowtracker_export_template_t template_id, 1192 _bcm_int_ft_export_template_info_t *template_info); 1193 1194 extern int 1195 _bcm_xgs5_ft_template_list_template_get (int unit, 1196 bcm_flowtracker_export_template_t template_id, 1197 _bcm_int_ft_export_template_info_t *template_info); 1198 extern int 1199 _bcm_xgs5_ft_template_list_destroy (int unit); 1200 1201 extern int 1202 _bcm_xgs5_ft_collector_list_collector_add(int unit, 1203 bcm_flowtracker_collector_t collector_id, 1204 bcm_flowtracker_collector_info_t *collector_info); 1205 extern int 1206 _bcm_xgs5_ft_collector_list_collector_delete (int unit, 1207 bcm_flowtracker_collector_t collector_id); 1208 extern int 1209 _bcm_xgs5_ft_collector_list_collector_modify(int unit, 1210 bcm_flowtracker_collector_t collector_id, 1211 bcm_flowtracker_collector_info_t *collector_info); 1212 extern int 1213 _bcm_xgs5_ft_collector_list_collector_get (int unit, 1214 bcm_flowtracker_collector_t collector_id, 1215 _bcm_int_ft_collector_info_t *collector_info); 1216 extern int 1217 _bcm_xgs5_ft_collector_list_destroy (int unit); 1218 1219 extern int 1220 _bcm_xgs5_ft_v2_collector_list_collector_add(int unit, 1221 bcm_collector_t collector_id, 1222 int coll_int_id); 1223 extern int 1224 _bcm_xgs5_ft_v2_collector_list_collector_delete(int unit, 1225 bcm_collector_t collector_id); 1226 extern int 1227 _bcm_xgs5_ft_v2_collector_list_collector_get(int unit, 1228 bcm_collector_t collector_id, 1229 int *coll_int_id); 1230 extern void 1231 _bcm_xgs5_ft_v2_collector_list_collector_in_use(int unit, 1232 bcm_collector_t collector_id, 1233 int *in_use); 1234 extern int 1235 _bcm_xgs5_ft_v2_collector_list_export_profile_add(int unit, 1236 int export_profile_id, 1237 int export_profile_int_id); 1238 extern int 1239 _bcm_xgs5_ft_v2_collector_list_export_profile_delete(int unit, 1240 int export_profile_id); 1241 1242 extern int 1243 _bcm_xgs5_ft_v2_collector_list_export_profile_get(int unit, 1244 int export_profile, 1245 int *export_profile_int_id); 1246 extern void 1247 _bcm_xgs5_ft_v2_collector_list_export_profile_in_use(int unit, 1248 int export_profile_id, 1249 int *in_use); 1250 1251 extern int 1252 _bcm_xgs5_ft_flow_group_list_flow_group_add(int unit, 1253 bcm_flowtracker_group_t flow_group_id); 1254 extern int 1255 _bcm_xgs5_ft_flow_group_list_flow_group_delete (int unit, 1256 bcm_flowtracker_group_t flow_group_id); 1257 extern int 1258 _bcm_xgs5_ft_flow_group_list_flow_group_modify(int unit, 1259 bcm_flowtracker_group_t flow_group_id, 1260 _bcm_int_ft_flow_group_info_t *flow_group_int_info); 1261 extern int 1262 _bcm_xgs5_ft_flow_group_list_flow_group_get (int unit, 1263 bcm_flowtracker_group_t flow_group_id, 1264 _bcm_int_ft_flow_group_info_t *flow_group_int_info); 1265 extern int 1266 _bcm_xgs5_ft_flow_group_list_destroy (int unit); 1267 extern int 1268 _bcm_xgs5_ft_flow_group_list_collector_in_use_check(int unit, 1269 bcm_flowtracker_collector_t collector_id); 1270 extern int 1271 _bcm_xgs5_ft_flow_group_list_template_in_use_check(int unit, 1272 bcm_flowtracker_export_template_t template_id); 1273 extern int 1274 _bcm_xgs5_ft_flow_group_list_elph_profile_in_use_check( 1275 int unit, 1276 bcm_flowtracker_export_template_t profile_id); 1277 extern int 1278 _bcm_xgs5_ft_flow_group_list_get_all_ids( 1279 int unit, 1280 bcm_flowtracker_group_t *flow_group_id_list, 1281 int *num_flow_groups); 1282 1283 extern int _bcm_xgs5_ft_eapp_send_elph_profile_delete_msg (int unit, 1284 int profile_id); 1285 1286 extern int _bcm_xgs5_ft_eapp_send_flow_group_create_msg (int unit, 1287 bcm_flowtracker_group_t flow_group_id); 1288 extern int _bcm_xgs5_ft_eapp_send_flow_group_delete_msg (int unit, 1289 bcm_flowtracker_group_t flow_group_id); 1290 extern int _bcm_xgs5_ft_eapp_send_flow_group_update_msg (int unit, 1291 bcm_flowtracker_group_t flow_group_id, 1292 uint32 update_flags, uint32 update_value); 1293 extern int _bcm_xgs5_ft_eapp_send_flow_group_get_msg (int unit, 1294 bcm_flowtracker_group_t flow_group_id, 1295 uint32 *flow_count); 1296 extern int _bcm_xgs5_ft_eapp_send_template_create_msg (int unit, 1297 bcm_flowtracker_export_template_t template_id); 1298 extern int _bcm_xgs5_ft_eapp_send_template_delete_msg (int unit, 1299 bcm_flowtracker_export_template_t template_id); 1300 extern int _bcm_xgs5_ft_eapp_send_collector_create_msg (int unit, 1301 int collector_id, 1302 int export_profile_id); 1303 extern int _bcm_xgs5_ft_eapp_send_collector_delete_msg (int unit, 1304 uint16 collector_id); 1305 extern int _bcm_xgs5_ft_eapp_send_em_key_format_msg (int unit, 1306 shr_ft_msg_ctrl_em_key_format_t *em_key_format); 1307 1308 extern int 1309 _bcm_xgs5_ft_eapp_send_em_group_create_msg(int unit, 1310 shr_ft_msg_ctrl_em_group_create_t *msg); 1311 1312 extern int 1313 _bcm_xgs5_ft_eapp_send_em_group_delete_msg(int unit, 1314 int em_group_id); 1315 1316 extern int 1317 _bcm_xgs5_ft_eapp_send_flow_group_flow_data_get_msg( 1318 int unit, 1319 bcm_flowtracker_group_t flow_group_id, 1320 bcm_flowtracker_flow_key_t *flow_key, 1321 bcm_flowtracker_flow_data_t *flow_data); 1322 extern int 1323 _bcm_xgs5_ft_eapp_send_ser_event_msg(int unit, int pipe, soc_mem_t mem, int index); 1324 1325 extern int 1326 _bcm_xgs5_ft_eapp_send_template_xmit_start(int unit, 1327 bcm_flowtracker_export_template_t template_id, 1328 bcm_flowtracker_collector_t collector_id); 1329 1330 extern int 1331 _bcm_xgs5_ft_eapp_send_group_actions_set_msg(int unit, 1332 shr_ft_msg_ctrl_group_actions_set_t *msg); 1333 1334 extern int 1335 _bcm_xgs5_ft_elph_profile_list_add(int unit, 1336 bcm_flowtracker_elephant_profile_t id, 1337 bcm_flowtracker_elephant_profile_info_t *profile); 1338 1339 extern int 1340 _bcm_xgs5_ft_eapp_send_elph_profile_create_msg(int unit, int profile_id); 1341 1342 extern int 1343 _bcm_xgs5_ft_eapp_send_export_interval_update_msg (int unit, 1344 uint32 export_interval); 1345 1346 extern int 1347 _bcm_xgs5_ft_elph_profile_list_get(int unit, 1348 bcm_flowtracker_elephant_profile_t id, 1349 _bcm_int_ft_elph_profile_info_t *profile); 1350 1351 extern int 1352 _bcm_xgs5_ft_elph_profile_list_delete(int unit, 1353 bcm_flowtracker_elephant_profile_t id); 1354 1355 extern void _bcm_xgs5_flowtracker_sw_dump(int unit); 1356 extern void _bcm_xgs5_flowtracker_dump_stats_learn(int unit); 1357 extern void _bcm_xgs5_flowtracker_dump_stats_export(int unit); 1358 extern void _bcm_xgs5_flowtracker_dump_stats_age(int unit); 1359 extern void _bcm_xgs5_flowtracker_dump_stats_elephant(int unit); 1360 extern void _bcm_xgs5_qcm_sw_dump(int unit); 1361 extern void _bcm_xgs5_qcm_stats_enable(int unit, uint8 enable); 1362 extern void _bcm_xgs5_qcm_dump_stats_learn(int unit); 1363 extern void _bcm_xgs5_qcm_dump_stats_export(int unit); 1364 extern void _bcm_xgs5_qcm_dump_stats_age(int unit); 1365 extern void _bcm_xgs5_qcm_dump_stats_scan(int unit); 1366 1367 extern int _bcm_xgs5_ft_qcm_eapp_cfg_init_set(int unit, 1368 _bcm_esw_ft_qcm_init_cfg_t cfg_init); 1369 1370 extern int _bcm_xgs5_ft_qcm_eapp_host_buf_set(int unit, 1371 uint32 host_mem_size, uint32 share_mem_add); 1372 extern int _bcm_xgs5_ft_qcm_eapp_host_buf_get(int unit, 1373 uint32 *host_mem_size, uint32 **host_mem_add); 1374 1375 extern int _bcm_xgs5_ft_qcm_eapp_config_set(int unit, 1376 int num_gports, _bcm_esw_ft_qcm_port_cfg_t *cfg_info); 1377 extern int _bcm_xgs5_ft_qcm_eapp_config_get(int unit, 1378 int max_gports, bcm_gport_t *gport_list, int *num_gports); 1379 1380 extern int _bcm_xgs5_ft_qcm_eapp_flow_view_cfg_set(int unit, uint32 options, 1381 bcm_cosq_burst_monitor_flow_view_info_t *flow_view_data); 1382 extern int _bcm_xgs5_ft_qcm_eapp_flow_view_cfg_get(int unit, 1383 bcm_cosq_burst_monitor_flow_view_info_t *flow_view_data); 1384 1385 extern int _bcm_xgs5_ft_qcm_eapp_flow_view_data_clear(int unit); 1386 extern int _bcm_xgs5_ft_qcm_eapp_flow_view_data_get(int unit, 1387 uint32 usr_mem_size, uint8 *usr_mem_add); 1388 1389 extern int _bcm_xgs5_ft_qcm_eapp_get_current_time(int unit, uint64 *time_usecs); 1390 extern int _bcm_xgs5_ft_qcm_eapp_view_summary_get(int unit, uint32 mem_size, 1391 uint8 *mem_addr, int max_num_views, int *num_views); 1392 extern int _bcm_xgs5_ft_qcm_eapp_flow_view_stats_get(int unit, uint32 mem_size, 1393 uint8 *mem_addr, int max_num_flows, int view_id, uint32 flags, 1394 int *num_flows); 1395 1396 extern int _bcm_xgs5_ft_qcm_eapp_send_em_group_create_msg(int unit, 1397 shr_ft_qcm_msg_ctrl_em_key_format_t *msg); 1398 1399 extern int _bcm_xgs5_ft_qcm_eapp_send_flow_group_flow_data_get_msg( 1400 int unit, 1401 bcm_flowtracker_group_t flow_group_id, 1402 bcm_flowtracker_flow_key_t *flow_key); 1403 #endif /* INCLUDE_FLOWTRACKER */ 1404 1405 #if defined(INCLUDE_IFA) 1406 /* IFA module APIs */ 1407 extern int bcm_xgs5_ifa_eapp_init(int unit); 1408 extern int bcm_xgs5_ifa_eapp_detach(int unit); 1409 extern int bcm_xgs5_ifa_collector_set(int unit, 1410 bcm_ifa_collector_info_t *ifa_collector_info); 1411 extern int bcm_xgs5_ifa_collector_get(int unit, 1412 bcm_ifa_collector_info_t *ifa_collector_info); 1413 extern int bcm_xgs5_ifa_collector_modify(int unit, 1414 bcm_ifa_collector_info_t *ifa_collector_info); 1415 extern int bcm_xgs5_ifa_eapp_collector_set_msg(int unit, 1416 bcm_ifa_collector_info_t *ifa_collector_info); 1417 extern int bcm_xgs5_ifa_config_set(int unit, 1418 bcm_ifa_config_info_t *ifa_config_info); 1419 extern int bcm_xgs5_ifa_config_get(int unit, 1420 bcm_ifa_config_info_t *ifa_config_info); 1421 extern int bcm_xgs5_ifa_config_modify(int unit, 1422 bcm_ifa_config_info_t *ifa_config_info); 1423 extern int bcm_xgs5_ifa_eapp_config_info_msg(int unit, 1424 bcm_ifa_config_info_t *ifa_config_info); 1425 extern int bcm_xgs5_ifa_eapp_collector_info_get_msg(int unit, 1426 bcm_ifa_collector_info_t *ifa_collector_info); 1427 extern int bcm_xgs5_ifa_eapp_config_info_get_msg(int unit, 1428 bcm_ifa_config_info_t *config_info); 1429 extern int bcm_xgs5_ifa_eapp_stat_info_get_msg(int unit, 1430 bcm_ifa_stat_info_t *stat_data); 1431 extern int bcm_xgs5_ifa_eapp_stat_info_set_msg(int unit, 1432 bcm_ifa_stat_info_t *stat_data); 1433 1434 /* IFAv2 APIs. */ 1435 extern int _bcm_xgs5_ifa2_init(int unit, uint8 *success); 1436 extern int _bcm_xgs5_ifa2_detach(int unit); 1437 extern int _bcm_xgs5_ifa2_config_info_set(int unit, 1438 bcm_ifa_config_info_t *cfg_info); 1439 extern int _bcm_xgs5_ifa2_config_info_get(int unit, 1440 bcm_ifa_config_info_t *cfg_info); 1441 extern int _bcm_xgs5_ifa2_stat_info_set(int unit, bcm_ifa_stat_info_t *stats); 1442 extern int _bcm_xgs5_ifa2_stat_info_get(int unit, bcm_ifa_stat_info_t *stats); 1443 extern int _bcm_xgs5_ifa2_collector_attach(int unit, 1444 bcm_collector_t collector_id, 1445 int export_profile_id, 1446 bcm_ifa_export_template_t template_id); 1447 extern int _bcm_xgs5_ifa2_collector_attach_get(int unit, 1448 bcm_collector_t *collector_id, 1449 int *export_profile_id, 1450 bcm_ifa_export_template_t *template_id); 1451 extern int _bcm_xgs5_ifa2_collector_detach(int unit, 1452 bcm_collector_t collector_id, 1453 int export_profile_id, 1454 bcm_ifa_export_template_t template_id); 1455 extern int _bcm_xgs5_ifa2_export_template_create(int unit, 1456 uint32 options, 1457 bcm_ifa_export_template_t *id, 1458 uint16 set_id, 1459 int num_export_elements, 1460 bcm_ifa_export_element_info_t *list_of_export_elements); 1461 1462 extern int _bcm_xgs5_ifa2_export_template_get(int unit, 1463 bcm_ifa_export_template_t id, 1464 uint16 *set_id, 1465 int max_size, 1466 bcm_ifa_export_element_info_t *list_of_export_elements, 1467 int *list_size); 1468 1469 extern int _bcm_xgs5_ifa2_export_template_destroy(int unit, 1470 bcm_ifa_export_template_t id); 1471 1472 extern int _bcm_xgs5_ifa2_template_transmit_config_set(int unit, 1473 bcm_ifa_export_template_t template_id, 1474 bcm_collector_t collector_id, 1475 bcm_ifa_template_transmit_config_t *config); 1476 1477 extern int _bcm_xgs5_ifa2_template_transmit_config_get(int unit, 1478 bcm_ifa_export_template_t template_id, 1479 bcm_collector_t collector_id, 1480 bcm_ifa_template_transmit_config_t *config); 1481 1482 extern int _bcm_xgs5_ifa2_sync(int unit); 1483 extern int _bcm_xgs5_ifa2_appl_callback(int unit, int uC, 1484 soc_cmic_uc_shutdown_stage_t stage, 1485 void *user_data); 1486 #endif /* INCLUDE_IFA */ 1487 #endif /* _BCM_INT_XGS5_H_ */