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

cosq_thd.h (5659B)


      1 /*
      2  * DO NOT EDIT THIS FILE!
      3  * This file is auto-generated.
      4  * Edits to this file will be lost when it is regenerated.
      5  *
      6  * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file.
      7  * 
      8  * Copyright 2007-2020 Broadcom Inc. All rights reserved.
      9  */
     10 
     11 #ifndef BCMI_LTSW_COSQ_THD_H
     12 #define BCMI_LTSW_COSQ_THD_H
     13 
     14 #include <bcm/types.h>
     15 #include <bcm/cosq.h>
     16 
     17 #include <sal/sal_types.h>
     18 
     19 /*!
     20  * \brief Initialize the cosq_thd module.
     21  *
     22  * \param [in] unit Unit Number.
     23  *
     24  * \retval SHR_E_NONE No errors.
     25  * \retval !SHR_E_NONE Failure.
     26  */
     27 extern int
     28 bcmi_ltsw_cosq_thd_init(int unit);
     29 
     30 /*!
     31  * \brief Detach the cosq_thd module.
     32  *
     33  * \param [in] unit Unit Number.
     34  *
     35  * \retval SHR_E_NONE No errors.
     36  * \retval !SHR_E_NONE Failure.
     37  */
     38 extern int
     39 bcmi_ltsw_cosq_thd_detach(int unit);
     40 
     41 /*!
     42  * \brief Set the profile for Input priortty to PG mapping for a port.
     43  *
     44  * \param [in] unit Unit Number.
     45  * \param [in] port Port Number.
     46  * \param [in] profile_id Profile index.
     47  *
     48  * \retval SHR_E_NONE No errors.
     49  * \retval !SHR_E_NONE Failure.
     50  */
     51 extern int
     52 bcmi_ltsw_cosq_thd_port_inppri_profile_set(
     53     int unit,
     54     bcm_port_t port,
     55     int profile_id);
     56 
     57 /*!
     58  * \brief Get the profile for Input priortty to PG mapping for a port.
     59  *
     60  * \param [in] unit Unit Number.
     61  * \param [in] port Port Number.
     62  * \param [out] profile_id Profile index.
     63  *
     64  * \retval SHR_E_NONE No errors.
     65  * \retval !SHR_E_NONE Failure.
     66  */
     67 extern int
     68 bcmi_ltsw_cosq_thd_port_inppri_profile_get(
     69     int unit,
     70     bcm_port_t port,
     71     int *profile_id);
     72 
     73 /*!
     74  * \brief Set the profile for PG to SPID/HPID/PFCPRI mapping for a port.
     75  *
     76  * \param [in] unit Unit Number.
     77  * \param [in] port Port Number.
     78  * \param [in] profile_id Profile index.
     79  *
     80  * \retval SHR_E_NONE No errors.
     81  * \retval !SHR_E_NONE Failure.
     82  */
     83 extern int
     84 bcmi_ltsw_cosq_thd_port_pg_profile_set(
     85     int unit,
     86     bcm_port_t port,
     87     int profile_id);
     88 
     89 /*!
     90  * \brief Get the profile for PG to SPID/HPID/PFCPRI mapping for a port.
     91  *
     92  * \param [in] unit Unit Number.
     93  * \param [in] port Port Number.
     94  * \param [out] profile_id Profile index.
     95  *
     96  * \retval SHR_E_NONE No errors.
     97  * \retval !SHR_E_NONE Failure.
     98  */
     99 extern int
    100 bcmi_ltsw_cosq_thd_port_pg_profile_get(
    101     int unit,
    102     bcm_port_t port,
    103     int *profile_id);
    104 
    105 /*!
    106  * \brief Get the pool per PG for a port.
    107  *
    108  * \param [in] unit Unit Number.
    109  * \param [in] gport Gport Number.
    110  * \param [in] prigroup Priority group.
    111  * \param [in] type Feature.
    112  * \param [out] arg Feature value.
    113  *
    114  * \retval SHR_E_NONE No errors.
    115  * \retval !SHR_E_NONE Failure.
    116  */
    117 extern int
    118 bcmi_ltsw_cosq_thd_ing_pg_pool_get(
    119     int unit,
    120     bcm_gport_t gport,
    121     bcm_cos_t prigroup,
    122     bcm_cosq_control_t type,
    123     int *arg);
    124 
    125 /*!
    126  * \brief Get the egress pool for a gport.
    127  *
    128  * \param [in] unit Unit Number.
    129  * \param [in] gport Gport Number.
    130  * \param [in] cosq cosq.
    131  * \param [in] type Feature.
    132  * \param [out] arg Feature value.
    133  *
    134  * \retval SHR_E_NONE No errors.
    135  * \retval !SHR_E_NONE Failure.
    136  */
    137 extern int
    138 bcmi_ltsw_cosq_thd_egress_pool_get(
    139     int unit,
    140     bcm_gport_t gport,
    141     bcm_cos_t cosq,
    142     bcm_cosq_control_t type,
    143     int *arg);
    144 
    145 /*!
    146  * \brief TM db shared limit get.
    147  *
    148  * \param [in] unit Unit Number.
    149  * \param [in] itm itm.
    150  * \param [in] spid ing service pool id.
    151  * \param [out] shared_limit shared limit value.
    152  *
    153  * \retval SHR_E_NONE No errors.
    154  * \retval !SHR_E_NONE Failure.
    155  */
    156 extern int
    157 bcmi_ltsw_cosq_thd_shared_limit_get(
    158     int unit,
    159     int itm,
    160     int spid,
    161     int *shared_limit);
    162 
    163 /*!
    164  * \brief Port UC service pool id get.
    165  *
    166  * \param [in] unit Unit Number.
    167  * \param [in] port Port Number.
    168  * \param [in] queue queue id.
    169  * \param [out] spid pool id.
    170  * \param [out] use_qgroup_min true/false.
    171  *
    172  * \retval SHR_E_NONE No errors.
    173  * \retval !SHR_E_NONE Failure.
    174  */
    175 extern int
    176 bcmi_ltsw_cosq_thd_port_uc_spid_get(
    177     int unit,
    178     bcm_port_t port,
    179     int queue,
    180     int *spid,
    181     int *use_qgroup_min);
    182 
    183 /*!
    184  * \brief Reset the guarantee of priority group, uc queue, mc queue to the default.
    185  *
    186  * \param [in] unit Unit Number.
    187  * \param [in] port Port Number.
    188  *
    189  * \retval SHR_E_NONE No errors.
    190  * \retval !SHR_E_NONE Failure.
    191  */
    192 extern int
    193 bcmi_ltsw_cosq_thd_port_guarantee_reset(
    194     int unit,
    195     bcm_port_t port);
    196 
    197 /*!
    198  * \brief Convert BCM enum alpha value to LT enum value.
    199  *
    200  * \param [in] unit Unit Number.
    201  * \param [in] arg BCM Alpha value.
    202  * \param [out] alpha LT Alpha value.
    203  *
    204  * \retval SHR_E_NONE No errors.
    205  * \retval !SHR_E_NONE Failure.
    206  */
    207 extern int
    208 bcmi_ltsw_cosq_thd_alpha_bcm_to_lt_convert(
    209     int unit,
    210     int arg,
    211     const char **alpha);
    212 
    213 /*!
    214  * \brief Convert LT enum alpha value to BCM enum value.
    215  *
    216  * \param [in] unit Unit Number.
    217  * \param [in] alpha LT Alpha value.
    218  * \param [out] arg BCM Alpha value.
    219  *
    220  * \retval SHR_E_NONE No errors.
    221  * \retval !SHR_E_NONE Failure.
    222  */
    223 extern int
    224 bcmi_ltsw_cosq_thd_alpha_lt_to_bcm_convert(
    225     int unit,
    226     const char *alpha,
    227     int *arg);
    228 
    229 /*!
    230  * \brief Convert byte to cell.
    231  *
    232  * \param [in] unit Unit Number.
    233  * \param [in] bytes bytes.
    234  * \param [out] cells cells.
    235  *
    236  * \retval SHR_E_NONE No errors.
    237  * \retval !SHR_E_NONE Failure.
    238  */
    239 extern int
    240 bcmi_ltsw_cosq_thd_byte_to_cell(
    241     int unit,
    242     uint32_t bytes,
    243     int *cells);
    244 
    245 /*!
    246  * \brief Convert cell to byte.
    247  *
    248  * \param [in] unit Unit Number.
    249  * \param [in] cells cells.
    250  * \param [out] bytes bytes.
    251  *
    252  * \retval SHR_E_NONE No errors.
    253  * \retval !SHR_E_NONE Failure.
    254  */
    255 extern int
    256 bcmi_ltsw_cosq_thd_cell_to_byte(
    257     int unit,
    258     uint32_t cells,
    259     int *bytes);
    260 
    261 #endif /* BCMI_LTSW_COSQ_THD_H */