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


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