openbcm

Git mirror of https://github.com/Broadcom-Network-Switching-Software/OpenBCM
git clone git://git.finwo.net/mirror/broadcom/openbcm
Log | Files | Refs | README

katana.h (25366B)


      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:        katana.h
      8  * Purpose:     Function declarations for Trident  bcm functions
      9  */
     10 
     11 #ifndef _BCM_INT_KATANA_H_
     12 #define _BCM_INT_KATANA_H_
     13 #if defined(BCM_KATANA_SUPPORT)
     14 #include <bcm_int/esw/firebolt.h>
     15 #include <bcm_int/esw/mbcm.h>
     16 #include <bcm_int/esw/oam.h>
     17 #include <bcm_int/esw/field.h>
     18 #include <soc/tnl_term.h>
     19 #include <bcm/qos.h>
     20 #include <bcm/trill.h>
     21 #include <bcm/field.h>
     22 #include <bcm_int/esw/bfd.h>
     23 #if defined(INCLUDE_PTP)
     24 #include <bcm_int/esw/ptp.h>
     25 #endif
     26 
     27 typedef enum {
     28     _BCM_KT_COSQ_NODE_LEVEL_ROOT,
     29     _BCM_KT_COSQ_NODE_LEVEL_L0,
     30     _BCM_KT_COSQ_NODE_LEVEL_L1,
     31     _BCM_KT_COSQ_NODE_LEVEL_L2,
     32     _BCM_KT_COSQ_NODE_LEVEL_MAX
     33 }_bcm_kt_cosq_node_level_t;
     34 
     35 typedef enum {
     36     _BCM_KT_NODE_UNKNOWN = 0,
     37     _BCM_KT_NODE_SUBSCRIBER_GPORT_ID
     38 } _bcm_kt_node_type_e;
     39 
     40 typedef struct _bcm_kt_cosq_node_s{
     41     struct _bcm_kt_cosq_node_s *parent;
     42     struct _bcm_kt_cosq_node_s *sibling;
     43     struct _bcm_kt_cosq_node_s *child;
     44     bcm_gport_t gport;
     45     SHR_BITDCL *cosq_map;
     46     int in_use;
     47     int wrr_in_use;
     48     int base_index;
     49     int numq;
     50     int hw_index;
     51     _bcm_kt_cosq_node_level_t level;
     52     int cosq_attached_to;
     53     int num_child;
     54     int first_child;
     55     _bcm_kt_node_type_e type;
     56 
     57 }_bcm_kt_cosq_node_t;
     58 
     59 extern int bcm_kt_port_downsizer_chk_reinit(int unit);
     60 extern int bcm_kt_cosq_port_pps_set(int unit, bcm_port_t port,
     61                                     bcm_cos_queue_t cosq, int pps);
     62 extern int bcm_kt_cosq_port_pps_get(int unit, bcm_port_t port,
     63                                     bcm_cos_queue_t cosq, int *pps);
     64 extern int bcm_kt_cosq_port_burst_set(int unit, bcm_port_t port,
     65                                     bcm_cos_queue_t cosq, int burst);
     66 extern int bcm_kt_cosq_port_burst_get(int unit, bcm_port_t port,
     67                                       bcm_cos_queue_t cosq, int *burst);
     68 extern int
     69 bcm_kt_cosq_subscriber_qid_set(int unit,
     70          bcm_gport_t *gport,
     71          int queue_id);
     72 
     73 extern int 
     74 bcm_kt_sw_hw_queue(int unit, int *queue_array);
     75 extern int
     76 _bcm_kt_intf_ref_cnt_increment(int unit, uint32 queue_id, int count);
     77 extern int
     78 _bcm_kt_intf_ref_cnt_decrement(int unit, uint32 queue_id, int count);
     79 #if defined(BCM_FIELD_SUPPORT)
     80 extern int _bcm_field_katana_init(int unit, _field_control_t *fc);
     81 #endif /* BCM_FIELD_SUPPORT */
     82 
     83 #ifdef INCLUDE_L3
     84 extern int bcm_kt_mpls_tunnel_switch_traverse(int unit,
     85                                    bcm_mpls_tunnel_switch_traverse_cb cb,
     86                                    void *user_data);
     87 extern int bcm_kt_mpls_tunnel_switch_get(int unit, bcm_mpls_tunnel_switch_t *info);
     88 extern int bcm_kt_mpls_tunnel_switch_delete_all(int unit);
     89 extern  int bcm_kt_mpls_tunnel_switch_delete(int unit, bcm_mpls_tunnel_switch_t *info);
     90 extern int bcm_kt_mpls_tunnel_switch_add(int unit, bcm_mpls_tunnel_switch_t *info);
     91 
     92 extern bcm_error_t bcm_kt_mpls_port_stat_attach(
     93                    int         unit,
     94                    bcm_vpn_t   vpn,
     95                    bcm_gport_t port,
     96                    uint32      stat_counter_id);
     97 extern bcm_error_t bcm_kt_mpls_port_stat_detach(
     98                    int         unit, 
     99                    bcm_vpn_t   vpn,
    100                    bcm_gport_t port);
    101 extern bcm_error_t bcm_kt_mpls_port_stat_counter_get(
    102                    int                  unit,
    103                    int                  sync_mode,
    104                    bcm_vpn_t            vpn,
    105                    bcm_gport_t          port,
    106                    bcm_mpls_stat_t      stat,
    107                    uint32               num_entries,
    108                    uint32               *counter_indexes,
    109                    bcm_stat_value_t     *counter_values);
    110 extern bcm_error_t bcm_kt_mpls_port_stat_counter_set(
    111                    int                  unit,
    112                    bcm_vpn_t            vpn,
    113                    bcm_gport_t          port,
    114                    bcm_mpls_stat_t      stat,
    115                    uint32               num_entries,
    116                    uint32               *counter_indexes,
    117                    bcm_stat_value_t     *counter_values);
    118 extern bcm_error_t bcm_kt_mpls_port_stat_id_get(
    119                    int                  unit,
    120                    bcm_vpn_t            vpn,
    121                    bcm_gport_t          port,
    122                    bcm_mpls_stat_t      stat,
    123                    uint32               *stat_counter_id);
    124 extern bcm_error_t bcm_kt_mpls_label_stat_attach(
    125                    int              unit,
    126                    bcm_mpls_label_t label,
    127                    bcm_gport_t      port,
    128                    uint32           stat_counter_id);
    129 extern bcm_error_t bcm_kt_mpls_label_stat_detach(
    130                    int              unit,
    131                    bcm_mpls_label_t label,
    132                    bcm_gport_t      port);
    133 extern bcm_error_t bcm_kt_mpls_label_stat_counter_get(
    134                    int                  unit,
    135                    int                  sync_mode,
    136                    bcm_mpls_label_t     label,
    137                    bcm_gport_t          port,
    138                    bcm_mpls_stat_t      stat,
    139                    uint32               num_entries,
    140                    uint32               *counter_indexes,
    141                    bcm_stat_value_t     *counter_values);
    142 extern bcm_error_t bcm_kt_mpls_label_stat_counter_set(
    143                    int                  unit,
    144                    bcm_mpls_label_t     label,
    145                    bcm_gport_t          port,
    146                    bcm_mpls_stat_t      stat,
    147                    uint32               num_entries,
    148                    uint32               *counter_indexes,
    149                    bcm_stat_value_t     *counter_values);
    150 extern bcm_error_t bcm_kt_mpls_label_stat_id_get(
    151                    int                  unit,
    152                    bcm_mpls_label_t     label,
    153                    bcm_gport_t          port,
    154                    bcm_mpls_stat_t      stat,
    155                    uint32               *stat_counter_id);
    156 extern int bcm_kt_mpls_label_stat_enable_set(
    157            int              unit,
    158            bcm_mpls_label_t label,
    159            bcm_gport_t      port,
    160            int              enable);
    161 extern int bcm_kt_mpls_label_stat_get(
    162            int              unit, 
    163            int              sync_mode,
    164            bcm_mpls_label_t label, 
    165            bcm_gport_t      port,
    166            bcm_mpls_stat_t  stat,
    167            uint64           *val);
    168 extern int bcm_kt_mpls_label_stat_get32(
    169            int              unit,
    170            int              sync_mode,
    171            bcm_mpls_label_t label, 
    172            bcm_gport_t      port, 
    173            bcm_mpls_stat_t  stat,
    174            uint32           *val);
    175 extern int bcm_kt_mpls_label_stat_clear(
    176            int              unit,
    177            bcm_mpls_label_t label, 
    178            bcm_gport_t      port, 
    179            bcm_mpls_stat_t  stat);
    180 extern int _bcm_kt_egress_object_p2mp_set(
    181           int             unit,
    182           bcm_multicast_t mc_group,
    183           int             flag,
    184           uint32          value);
    185 
    186 #endif /* INCLUDE_L3 */
    187 
    188 typedef enum {
    189     _BCM_KT_COSQ_INDEX_STYLE_BUCKET,
    190     _BCM_KT_COSQ_INDEX_STYLE_WRED,
    191     _BCM_KT_COSQ_INDEX_STYLE_SCHEDULER,
    192     _BCM_KT_COSQ_INDEX_STYLE_UCAST_QUEUE,
    193     _BCM_KT_COSQ_INDEX_STYLE_PERQ_XMT,
    194     _BCM_KT_COSQ_INDEX_STYLE_QUEUE_REPLICATION
    195 }_bcm_kt_cosq_index_style_t;
    196 extern int
    197 bcm_kt_is_uc_queue(int unit, int queue_id, int *is_ucq);
    198 extern int bcm_kt_cosq_init(int unit);
    199 extern int bcm_kt_cosq_detach(int unit, int software_state_only);
    200 extern int bcm_kt_cosq_config_set(int unit, int numq);
    201 extern int bcm_kt_cosq_config_get(int unit, int *numq);
    202 extern int bcm_kt_cosq_mapping_set(int unit, bcm_port_t port,
    203                                    bcm_cos_t priority, bcm_cos_queue_t cosq);
    204 extern int bcm_kt_cosq_mapping_get(int unit, bcm_port_t port,
    205                                    bcm_cos_t priority, bcm_cos_queue_t *cosq);
    206 extern int bcm_kt_cosq_port_sched_set(int unit, bcm_pbmp_t pbm,
    207                                       int mode, const int *weights, int delay);
    208 extern int bcm_kt_cosq_port_sched_get(int unit, bcm_pbmp_t pbm,
    209                                       int *mode, int *weights, int *delay);
    210 extern int bcm_kt_cosq_sched_weight_max_get(int unit, int mode,
    211                                             int *weight_max);
    212 extern int bcm_kt_cosq_port_bandwidth_set(int unit, bcm_port_t port,
    213                                           bcm_cos_queue_t cosq,
    214                                           uint32 min_quantum,
    215                                           uint32 max_quantum,
    216                                           uint32 burst_quantum,
    217                                           uint32 flags);
    218 extern int bcm_kt_cosq_port_bandwidth_get(int unit, bcm_port_t port,
    219                                           bcm_cos_queue_t cosq,
    220                                           uint32 *min_quantum,
    221                                           uint32 *max_quantum,
    222                                           uint32 *burst_quantum,
    223                                           uint32 *flags);
    224 extern int bcm_kt_cosq_discard_set(int unit, uint32 flags);
    225 extern int bcm_kt_cosq_discard_get(int unit, uint32 *flags);
    226 extern int bcm_kt_cosq_discard_port_set(int unit, bcm_port_t port,
    227                                         bcm_cos_queue_t cosq, uint32 color,
    228                                         int drop_start, int drop_slope,
    229                                         int average_time);
    230 extern int bcm_kt_cosq_discard_port_get(int unit, bcm_port_t port,
    231                                         bcm_cos_queue_t cosq, uint32 color,
    232                                         int *drop_start, int *drop_slope,
    233                                         int *average_time);
    234 extern int bcm_kt_cosq_gport_add(int unit, bcm_gport_t port, int numq,
    235                                  uint32 flags, bcm_gport_t *gport);
    236 extern int bcm_kt_cosq_gport_delete(int unit, bcm_gport_t gport);
    237 extern int bcm_kt_cosq_gport_get(int unit, bcm_gport_t gport,
    238                                  bcm_gport_t *port, int *numq, uint32 *flags);
    239 extern int bcm_kt_cosq_gport_traverse(int unit, bcm_cosq_gport_traverse_cb cb,
    240                                       void *user_data);
    241 extern int bcm_kt_cosq_gport_sched_set(int unit, bcm_gport_t gport,
    242                                        bcm_cos_queue_t cosq, int mode,
    243                                        int weight);
    244 extern int bcm_kt_cosq_gport_sched_get(int unit, bcm_gport_t gport,
    245                                        bcm_cos_queue_t cosq,
    246                                        int *mode, int *weight);
    247 extern int bcm_kt_cosq_gport_attach(int unit, bcm_gport_t sched_gport,
    248                                     bcm_gport_t input_gport,
    249                                     bcm_cos_queue_t cosq);
    250 extern int bcm_kt_cosq_gport_detach(int unit, bcm_gport_t sched_gport,
    251                                     bcm_gport_t input_gport,
    252                                     bcm_cos_queue_t cosq);
    253 extern int bcm_kt_cosq_gport_bandwidth_set(int unit, bcm_gport_t gport,
    254                                            bcm_cos_queue_t cosq,
    255                                            uint32 kbits_sec_min,
    256                                            uint32 kbits_sec_max, uint32 flags);
    257 extern int bcm_kt_cosq_gport_bandwidth_get(int unit, bcm_gport_t gport,
    258                                            bcm_cos_queue_t cosq,
    259                                            uint32 *kbits_sec_min,
    260                                            uint32 *kbits_sec_max,
    261                                            uint32 *flags);
    262 extern int bcm_kt_cosq_gport_child_node_bandwidth_set(int unit,
    263                                            bcm_gport_t gport,
    264                                            bcm_cos_queue_t cosq,
    265                                            uint32 kbits_sec_min,
    266                                            uint32 kbits_sec_max,
    267                                            uint32 flags);
    268 extern int bcm_kt_cosq_gport_child_node_bandwidth_get(int unit,
    269                                            bcm_gport_t gport,
    270                                            bcm_cos_queue_t cosq,
    271                                            uint32 *kbits_sec_min,
    272                                            uint32 *kbits_sec_max,
    273                                            uint32 *flags);
    274 extern int bcm_kt_cosq_gport_bandwidth_burst_set(int unit, bcm_gport_t gport,
    275                                                  bcm_cos_queue_t cosq,
    276                                                  uint32 kbits_burst_min,
    277                                                  uint32 kbits_burst_max);
    278 extern int bcm_kt_cosq_gport_bandwidth_burst_get(int unit, bcm_gport_t gport,
    279                                                  bcm_cos_queue_t cosq,
    280                                                  uint32 *kbits_burst_min,
    281                                                  uint32 *kbits_burst_max);
    282 extern int bcm_kt_cosq_gport_attach_get(int unit, bcm_gport_t sched_gport,
    283                                         bcm_gport_t *input_gport,
    284                                         bcm_cos_queue_t *cosq);
    285 extern int bcm_kt_cosq_gport_discard_set(int unit, bcm_gport_t gport,
    286                                          bcm_cos_queue_t cosq,
    287                                          bcm_cosq_gport_discard_t *discard);
    288 extern int bcm_kt_cosq_gport_discard_get(int unit, bcm_gport_t gport,
    289                                          bcm_cos_queue_t cosq,
    290                                          bcm_cosq_gport_discard_t *discard);
    291 extern int bcm_kt_cosq_stat_set(int unit, bcm_gport_t port, 
    292                                 bcm_cos_queue_t cosq,
    293                                 bcm_cosq_stat_t stat, uint64 value);
    294 extern int bcm_kt_cosq_stat_get(int unit, bcm_gport_t port, 
    295                                 bcm_cos_queue_t cosq, bcm_cosq_stat_t stat, 
    296                                 int sync_mode, uint64 *value);
    297 extern int bcm_kt_cosq_gport_stat_set(int unit, bcm_gport_t port, 
    298                                 bcm_cos_queue_t cosq,
    299                                 bcm_cosq_gport_stats_t stat, uint64 value);
    300 extern int bcm_kt_cosq_gport_stat_get(int unit, int sync_mode, 
    301                                       bcm_gport_t port, 
    302                                       bcm_cos_queue_t cosq, 
    303                                       bcm_cosq_gport_stats_t stat, 
    304                                       uint64 *value);
    305 extern int bcm_kt_cosq_port_get(int unit, int queue_id, bcm_port_t *port);
    306 extern int _bcm_kt_cosq_index_resolve(int unit, bcm_port_t port,
    307                            bcm_cos_queue_t cosq,
    308                            _bcm_kt_cosq_index_style_t style,
    309                            bcm_port_t *local_port, int *index, int *count);
    310 extern int bcm_kt_port_rate_egress_set(int unit, bcm_port_t port,
    311                            uint32 kbits_sec, uint32 kbits_burst, uint32 mode);
    312 extern int bcm_kt_port_rate_egress_get(int unit, bcm_port_t port,
    313                            uint32 *kbits_sec, uint32 *kbits_burst, uint32 *mode);
    314 extern int bcm_kt_port_pps_rate_egress_set(int unit, bcm_port_t port,
    315                                            uint32 pps, uint32 burst);
    316 extern int bcm_kt_cosq_drop_status_enable_set(int unit, bcm_port_t port,
    317                                               int enable);
    318 extern int bcm_kt_cosq_control_set(int unit, bcm_gport_t gport,
    319                                    bcm_cos_queue_t cosq,
    320                                    bcm_cosq_control_t type, int arg);
    321 
    322 extern int bcm_kt_cosq_control_get(int unit, bcm_gport_t gport,
    323                                    bcm_cos_queue_t cosq,
    324                                    bcm_cosq_control_t type, int *arg);
    325 extern int _bcm_kt_cosq_port_resolve(int unit, bcm_gport_t gport,
    326                                      bcm_module_t *modid, bcm_port_t *port,
    327                                      bcm_trunk_t *trunk_id, int *id,
    328                                      int *qnum);
    329 extern int bcm_kt_dump_port_lls(int unit, bcm_port_t port);
    330 
    331 #ifdef BCM_WARM_BOOT_SUPPORT
    332 extern int bcm_kt_cosq_sync(int unit);
    333 extern int _bcm_kt_ipmc_hw_queue_info_scache_size_get(int unit, uint32 *size);
    334 extern int _bcm_kt_ipmc_hw_queue_info_sync(int unit, uint8 **scache_ptr);
    335 extern int _bcm_kt_ipmc_hw_queue_info_recover(int unit, uint8 **scache_ptr);
    336 #endif /* BCM_WARM_BOOT_SUPPORT */
    337 #ifndef BCM_SW_STATE_DUMP_DISABLE
    338 extern void bcm_kt_cosq_sw_dump(int unit);
    339 #endif /* BCM_SW_STATE_DUMP_DISABLE */
    340 
    341 #if defined (INCLUDE_L3)
    342 
    343 #if defined(INCLUDE_BFD)
    344 extern int bcmi_kt_bfd_init(int unit);
    345 #ifdef BCM_WARM_BOOT_SUPPORT
    346 extern int bcmi_kt_bfd_sync(int unit);
    347 #endif /* BCM_WARM_BOOT_SUPPORT */
    348 #ifdef BCM_WARM_BOOT_SUPPORT_SW_DUMP
    349 extern void bcmi_kt_bfd_sw_dump(int unit);
    350 #endif /* BCM_WARM_BOOT_SUPPORT_SW_DUMP */
    351 #endif /* INCLUDE_BFD */
    352 
    353 #define BCM_KT_DEFIP_PAIR128_HASH_SZ            (0x6)
    354 #define BCM_KT_DEFIP_PAIR128(_unit_)             l3_kt_defip_pair128[(_unit_)]
    355 #define BCM_KT_DEFIP_PAIR128_ARR(_unit_)         BCM_KT_DEFIP_PAIR128((_unit_))->entry_array
    356 #define BCM_KT_DEFIP_PAIR128_IDX_MAX(_unit_)     BCM_KT_DEFIP_PAIR128((_unit_))->idx_max
    357 #define BCM_KT_DEFIP_PAIR128_USED_COUNT(_unit_)  BCM_KT_DEFIP_PAIR128((_unit_))->used_count
    358 #define BCM_KT_DEFIP_PAIR128_TOTAL(_unit_)       BCM_KT_DEFIP_PAIR128((_unit_))->total_count
    359 #define BCM_KT_DEFIP_PAIR128_URPF_OFFSET(_unit_) BCM_KT_DEFIP_PAIR128((_unit_))->urpf_offset
    360 #define BCM_KT_DEFIP_PAIR128_ENTRY_SET(_unit_, _idx_, _plen_, _hash_)          \
    361             BCM_KT_DEFIP_PAIR128_ARR((_unit_))[(_idx_)].prefix_len = (_plen_); \
    362             BCM_KT_DEFIP_PAIR128_ARR((_unit_))[(_idx_)].entry_hash = (_hash_)
    363 
    364 
    365 typedef struct _bcm_l3_defip_pair128_entry_s {
    366     uint8  prefix_len; /* Route entry  prefix length.*/
    367     uint8  entry_hash; /* Route entry key hash.      */
    368 } _bcm_l3_defip_pair128_entry_t;
    369 
    370 typedef struct _bcm_l3_defip_pair128_table_s {
    371     _bcm_l3_defip_pair128_entry_t *entry_array; /* Cam entries array.      */
    372     uint16 idx_max;                   /* Last cam entry index.             */
    373     uint16 used_count;                /* Used cam entry count.             */
    374     uint16 total_count;               /* Total number of available entries.*/
    375     uint16 urpf_offset;               /* Src lookup start offset.          */
    376 } _bcm_l3_defip_pair128_table_t;
    377 
    378 
    379 extern int _bcm_kt_defip_pair128_init(int unit);
    380 extern int _bcm_kt_defip_pair128_deinit(int unit);
    381 extern int _bcm_kt_defip_pair128_get(int unit, _bcm_defip_cfg_t *lpm_cfg,
    382                                   int *nh_ecmp_idx); 
    383 extern int _bcm_kt_defip_pair128_add(int unit, _bcm_defip_cfg_t *lpm_cfg,
    384                                   int nh_ecmp_idx);
    385 extern int _bcm_kt_defip_pair128_delete(int unit, _bcm_defip_cfg_t *lpm_cfg);
    386 extern int _bcm_kt_defip_pair128_update_match(int unit, _bcm_l3_trvrs_data_t *trv_data);
    387 
    388 extern int bcm_kt_ipmc_repl_detach(int unit);
    389 extern int _bcm_kt_init_check(int unit, int ipmc_id);
    390 extern int _bcm_kt_ipmc_subscriber_egress_intf_set(int unit, int mc_index,
    391                                        bcm_port_t port, int if_count,
    392                                        bcm_if_t *if_array,
    393                                        bcm_gport_t queue,
    394                                        int l3,
    395                                        int *queue_count,
    396                                        int *q_count_increased);
    397 extern int _bcm_kt_ipmc_subscriber_egress_intf_get(int unit, int mc_index,
    398                                        int port_count,
    399                                        bcm_gport_t *port_array,
    400                                        bcm_if_t *encap_id_array,
    401                                        bcm_gport_t *subscriber_queue_array,
    402                                        int *if_count);
    403 extern int _bcm_kt_ipmc_subscriber_egress_intf_delete(int unit, int ipmc_id,
    404                                        bcm_port_t port,
    405                                        int nh_index,
    406                                        bcm_gport_t subscriber_queue,
    407                                        int *queue_count,
    408                                        int *q_count_decreased);
    409 extern int _bcm_kt_ipmc_mmu_mc_remap_ptr(int unit, int ipmc_id,
    410                                    int *remap_id, int set);
    411 extern int _bcm_kt_ipmc_set_remap_group(int unit, int mc_index,
    412                                        bcm_port_t port_out,
    413                                        int count);
    414 extern int _bcm_kt_get_subscriber_queue_entries(int unit, int extq_ptr, 
    415                                      SHR_BITDCL *q_vec, 
    416                                      uint32  *q_repl_ptr, 
    417                                      int *q_num);
    418 extern void _bcm_kt_ipmc_port_ext_queue_count_increment(int unit,
    419                                      int ipmc_id,
    420                                      bcm_port_t port);
    421 extern void _bcm_kt_ipmc_port_ext_queue_count_decrement(int unit,
    422                                      int ipmc_id,
    423                                      bcm_port_t port);
    424 
    425 extern int _bcm_kt_defip_pair128_used_count_get(int unit);
    426 extern int _bcm_kt_l3_info_dump(int unit);
    427 extern int bcmi_kt_extended_queue_config_destroy(int unit, bcm_if_t intf);
    428 extern int _bcm_kt_ipmc_subscriber_egress_intf_delete_all(int unit, int ipmc_id, 
    429                                                  int port_count,
    430                                                  bcm_port_t *port_array,
    431                                                  int *encap_array,
    432                                                  bcm_if_t *q_array,
    433                                                  int *q_count_decreased);
    434 
    435 extern int _bcm_kt_hw_to_sw_queue(int unit, int *queue_array, bcm_port_t *port);
    436 extern void _bcm_kt_sw_to_hw_queue_clear(int unit);
    437 #endif
    438 
    439 #if defined(INCLUDE_PTP)
    440 extern int bcm_kt_ptp_init(int unit);
    441 extern int bcm_kt_ptp_detach(int unit);
    442 extern int bcm_kt_ptp_stack_create(int unit,
    443         bcm_ptp_stack_info_t *ptp_info);
    444 extern int bcm_kt_ptp_firmware_load(int unit,
    445     bcm_ptp_stack_id_t ptp_id);
    446 extern int bcm_kt_ptp_time_format_set( int unit,
    447     bcm_ptp_stack_id_t ptp_id,
    448     bcm_ptp_time_type_t type);
    449 extern int bcm_kt_ptp_cb_register(int unit, 
    450     bcm_ptp_cb_types_t cb_types, 
    451     bcm_ptp_cb cb, 
    452     void *user_data);
    453 extern int bcm_kt_ptp_cb_unregister(int unit, 
    454     bcm_ptp_cb_types_t cb_types, 
    455     bcm_ptp_cb cb);
    456 extern int bcm_kt_ptp_clock_create(int unit, 
    457     bcm_ptp_stack_id_t ptp_id, 
    458     bcm_ptp_clock_info_t *clock_info);
    459 
    460 #endif
    461 
    462 extern int _bcm_field_kt_qualify_PacketRes(int               unit,
    463                                             bcm_field_entry_t entry,
    464                                             uint32            *data,
    465                                             uint32            *mask
    466                                             );
    467 extern int _bcm_field_kt_qualify_PacketRes_get(int               unit,
    468                                                 bcm_field_entry_t entry,
    469                                                 uint32            *data,
    470                                                 uint32            *mask
    471                                                 );
    472 /*
    473  * Function:
    474  *     _bcm_field_fabricQueue_action_node_increment_ref_Count
    475  * Purpose:
    476  *     Increment the referecne count of the fabric node if it is existing
    477  * Parameters:
    478  *     unit           - (IN) BCM device number
    479  *     queue_index    - (IN) cosq queue index
    480  *     profile_indexx - (IN) QoS map profile index
    481  * Returns:
    482  *     BCM_E_XXX
    483  */
    484 extern int _bcm_field_fabricQueue_action_node_increment_ref_Count (int unit,
    485                           uint32 queue_index, uint32 profile_index);
    486 /*
    487  * Function:
    488  *     _bcm_field_fabricQueue_action_node_add
    489  * Purpose:
    490  *     add the fabric node to the linked list
    491  * Parameters:
    492  *     unit           - (IN) BCM device number
    493  *     queue_index    - (IN) cosq queue index
    494  *     profile_indexx - (IN) QoS map profile index
    495  * Returns:
    496  *     BCM_E_XXX
    497  */
    498 extern int _bcm_field_fabricQueue_action_node_add (int unit,
    499                             uint32 queue_index, uint32 profile_index);
    500 /*
    501  * Function:
    502  *     _bcm_field_fabricQueue_action_node_delete
    503  * Purpose:
    504  *     delete the node from linkedlist if reference count is
    505  *     1. else decrement the reference count.
    506  * Parameters:
    507  *     unit           - (IN) BCM device number
    508  *     queue_index    - (IN) cosq queue index
    509  *     profile_indexx - (IN) QoS map profile index
    510  *     referenceCount - (OUT) reference count of the node
    511  * Returns:
    512  *     BCM_E_XXX
    513  */
    514 extern int _bcm_field_fabricQueue_action_node_delete (int unit,
    515                           uint32 queue_index, uint32 profile_index,
    516                           int *referenceCount);
    517 extern int _bcm_kt_extended_queue_config(int unit, uint32 options,
    518                                          uint32 flags, int queue_id,
    519                                          int profile_index, bcm_if_t *intf);
    520 extern int _bcm_kt_extended_queue_qos_profile_get(int unit,
    521                                                   bcm_if_t intf,
    522                                                   int *profile_index);
    523 #endif /* BCM_KATANA_SUPPORT */
    524 #endif  /* !_BCM_INT_KATANA_H_ */
    525