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

ebst.h (11599B)


      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 BCMINT_LTSW_MBCM_EBST_H
     12 #define BCMINT_LTSW_MBCM_EBST_H
     13 
     14 #include <bcm/cosq.h>
     15 
     16 /*!
     17  * \brief Get a EBST threshold profile for a given BST stat Id.
     18  *
     19  * \param [in] unit Unit Number.
     20  * \param [in] object_id Integrated cosq index.
     21  * \param [in] bid BST stat ID to identify the COSQ resource/object.
     22  * \param [out] profile EBST profile configuration.
     23  *
     24  * \retval SHR_E_NONE No errors.
     25  * \retval !SHR_E_NONE Failure.
     26  */
     27 typedef int (*cosq_ebst_threshold_profile_get_f)(
     28     int unit,
     29     bcm_cosq_object_id_t *object_id,
     30     bcm_bst_stat_id_t bid,
     31     bcm_cosq_ebst_threshold_profile_t *profile);
     32 
     33 /*!
     34  * \brief Set a EBST threshold profile for a given BST stat Id.
     35  *
     36  * \param [in] unit Unit Number.
     37  * \param [in] object_id Integrated cosq index.
     38  * \param [in] bid BST stat ID to identify the COSQ resource/object.
     39  * \param [in] profile EBST profile configuration.
     40  *
     41  * \retval SHR_E_NONE No errors.
     42  * \retval !SHR_E_NONE Failure.
     43  */
     44 typedef int (*cosq_ebst_threshold_profile_set_f)(
     45     int unit,
     46     bcm_cosq_object_id_t *object_id,
     47     bcm_bst_stat_id_t bid,
     48     bcm_cosq_ebst_threshold_profile_t *profile);
     49 
     50 /*!
     51  * \brief To get EBST scan round scan mode and enable mode.
     52  *
     53  * \param [in] unit Unit Number.
     54  * \param [in] type Ebst control type.
     55  * \param [out] arg arg.
     56  *
     57  * \retval SHR_E_NONE No errors.
     58  * \retval !SHR_E_NONE Failure.
     59  */
     60 typedef int (*cosq_ebst_control_get_f)(
     61     int unit,
     62     bcm_cosq_ebst_control_t type,
     63     int *arg);
     64 
     65 /*!
     66  * \brief To set EBST scan round scan mode and enable mode.
     67  *
     68  * \param [in] unit Unit Number.
     69  * \param [in] type Ebst control type.
     70  * \param [in] arg arg.
     71  *
     72  * \retval SHR_E_NONE No errors.
     73  * \retval !SHR_E_NONE Failure.
     74  */
     75 typedef int (*cosq_ebst_control_set_f)(
     76     int unit,
     77     bcm_cosq_ebst_control_t type,
     78     int arg);
     79 
     80 /*!
     81  * \brief To get monitor info for a given BST Stat ID.
     82  *
     83  * \param [in] unit Unit Number.
     84  * \param [in] object_id Integrated cosq index.
     85  * \param [in] bid BST stat ID to identify the COSQ resource/object.
     86  * \param [out] monitor EBST monitor info structure.
     87  *
     88  * \retval SHR_E_NONE No errors.
     89  * \retval !SHR_E_NONE Failure.
     90  */
     91 typedef int (*cosq_ebst_monitor_get_f)(
     92     int unit,
     93     bcm_cosq_object_id_t *object_id,
     94     bcm_bst_stat_id_t bid,
     95     bcm_cosq_ebst_monitor_t *monitor);
     96 
     97 /*!
     98  * \brief To set monitor info for a given BST Stat ID.
     99  *
    100  * \param [in] unit Unit Number.
    101  * \param [in] object_id Integrated cosq index.
    102  * \param [in] bid BST stat ID to identify the COSQ resource/object.
    103  * \param [in] monitor EBST monitor info structure.
    104  *
    105  * \retval SHR_E_NONE No errors.
    106  * \retval !SHR_E_NONE Failure.
    107  */
    108 typedef int (*cosq_ebst_monitor_set_f)(
    109     int unit,
    110     bcm_cosq_object_id_t *object_id,
    111     bcm_bst_stat_id_t bid,
    112     bcm_cosq_ebst_monitor_t *monitor);
    113 
    114 /*!
    115  * \brief To get max number entries and available number entries of  EBST data buffer.
    116  *
    117  * \param [in] unit Unit Number.
    118  * \param [in] object_id Integrated cosq index.
    119  * \param [out] info EBST data buffer info structure.
    120  *
    121  * \retval SHR_E_NONE No errors.
    122  * \retval !SHR_E_NONE Failure.
    123  */
    124 typedef int (*cosq_ebst_data_stat_info_get_f)(
    125     int unit,
    126     bcm_cosq_object_id_t *object_id,
    127     bcm_cosq_ebst_data_stat_info_t *info);
    128 
    129 /*!
    130  * \brief To get an identical EBST stat for a given BST Stat ID
    131  *
    132  * \param [in] unit Unit Number.
    133  * \param [in] object_id Integrated cosq index.
    134  * \param [in] bid BST stat ID to identify the COSQ resource/object.
    135  * \param [in] array_size array size.
    136  * \param [out] entry_array entry array.
    137  * \param [out] count Count.
    138  *
    139  * \retval SHR_E_NONE No errors.
    140  * \retval !SHR_E_NONE Failure.
    141  */
    142 typedef int (*cosq_ebst_data_get_f)(
    143     int unit,
    144     bcm_cosq_object_id_t *object_id,
    145     bcm_bst_stat_id_t bid,
    146     int array_size,
    147     bcm_cosq_ebst_data_entry_t *entry_array,
    148     int *count);
    149 
    150 /*!
    151  * \brief To enable EBST tracking.
    152  *
    153  * \param [in] unit Unit Number.
    154  * \param [in] enable Enable EBST tracking.
    155  *
    156  * \retval SHR_E_NONE No errors.
    157  * \retval !SHR_E_NONE Failure.
    158  */
    159 typedef int (*cosq_ebst_enable_set_f)(
    160     int unit,
    161     int enable);
    162 
    163 /*!
    164  * \brief To get EBST feature enable status.
    165  *
    166  * \param [in] unit Unit Number.
    167  * \param [out] enable Enable EBST tracking status.
    168  *
    169  * \retval SHR_E_NONE No errors.
    170  * \retval !SHR_E_NONE Failure.
    171  */
    172 typedef int (*cosq_ebst_enable_get_f)(
    173     int unit,
    174     int *enable);
    175 
    176 /*!
    177  * \brief Initialize the ebst module.
    178  *
    179  * \param [in] unit Unit Number.
    180  *
    181  * \retval SHR_E_NONE No errors.
    182  * \retval !SHR_E_NONE Failure.
    183  */
    184 typedef int (*cosq_ebst_init_f)(int unit);
    185 
    186 /*!
    187  * \brief Detach the ebst module.
    188  *
    189  * \param [in] unit Unit Number.
    190  *
    191  * \retval SHR_E_NONE No errors.
    192  * \retval !SHR_E_NONE Failure.
    193  */
    194 typedef int (*cosq_ebst_detach_f)(int unit);
    195 
    196 /*!
    197  * \brief Cosq_ebst driver structure.
    198  */
    199 typedef struct mbcm_ltsw_cosq_ebst_drv_s {
    200 
    201     /*! Get a EBST threshold profile for a given BST stat Id. */
    202     cosq_ebst_threshold_profile_get_f cosq_ebst_threshold_profile_get;
    203 
    204     /*! Set a EBST threshold profile for a given BST stat Id. */
    205     cosq_ebst_threshold_profile_set_f cosq_ebst_threshold_profile_set;
    206 
    207     /*! To get EBST scan round scan mode and enable mode. */
    208     cosq_ebst_control_get_f cosq_ebst_control_get;
    209 
    210     /*! To set EBST scan round scan mode and enable mode. */
    211     cosq_ebst_control_set_f cosq_ebst_control_set;
    212 
    213     /*! To get monitor info for a given BST Stat ID. */
    214     cosq_ebst_monitor_get_f cosq_ebst_monitor_get;
    215 
    216     /*! To set monitor info for a given BST Stat ID. */
    217     cosq_ebst_monitor_set_f cosq_ebst_monitor_set;
    218 
    219     /*! To get max number entries and available number entries of  EBST data buffer. */
    220     cosq_ebst_data_stat_info_get_f cosq_ebst_data_stat_info_get;
    221 
    222     /*! To get an identical EBST stat for a given BST Stat ID */
    223     cosq_ebst_data_get_f cosq_ebst_data_get;
    224 
    225     /*! To enable EBST tracking. */
    226     cosq_ebst_enable_set_f cosq_ebst_enable_set;
    227 
    228     /*! To get EBST feature enable status. */
    229     cosq_ebst_enable_get_f cosq_ebst_enable_get;
    230 
    231     /*! Initialize the ebst module. */
    232     cosq_ebst_init_f cosq_ebst_init;
    233 
    234     /*! Detach the ebst module. */
    235     cosq_ebst_detach_f cosq_ebst_detach;
    236 
    237 } mbcm_ltsw_cosq_ebst_drv_t;
    238 
    239 /*!
    240  * \brief Set the COSQ_EBST driver of the device.
    241  *
    242  * \param [in] unit Unit Number.
    243  * \param [in] drv Cosq_ebst driver to set.
    244  *
    245  * \retval SHR_E_NONE No errors.
    246  * \retval !SHR_E_NONE Failure.
    247  */
    248 extern int
    249 mbcm_ltsw_cosq_ebst_drv_set(
    250     int unit,
    251     mbcm_ltsw_cosq_ebst_drv_t *drv);
    252 
    253 /*!
    254  * \brief Get a EBST threshold profile for a given BST stat Id.
    255  *
    256  * \param [in] unit Unit Number.
    257  * \param [in] object_id Integrated cosq index.
    258  * \param [in] bid BST stat ID to identify the COSQ resource/object.
    259  * \param [out] profile EBST profile configuration.
    260  *
    261  * \retval SHR_E_NONE No errors.
    262  * \retval !SHR_E_NONE Failure.
    263  */
    264 extern int
    265 mbcm_ltsw_cosq_ebst_threshold_profile_get(
    266     int unit,
    267     bcm_cosq_object_id_t *object_id,
    268     bcm_bst_stat_id_t bid,
    269     bcm_cosq_ebst_threshold_profile_t *profile);
    270 
    271 /*!
    272  * \brief Set a EBST threshold profile for a given BST stat Id.
    273  *
    274  * \param [in] unit Unit Number.
    275  * \param [in] object_id Integrated cosq index.
    276  * \param [in] bid BST stat ID to identify the COSQ resource/object.
    277  * \param [in] profile EBST profile configuration.
    278  *
    279  * \retval SHR_E_NONE No errors.
    280  * \retval !SHR_E_NONE Failure.
    281  */
    282 extern int
    283 mbcm_ltsw_cosq_ebst_threshold_profile_set(
    284     int unit,
    285     bcm_cosq_object_id_t *object_id,
    286     bcm_bst_stat_id_t bid,
    287     bcm_cosq_ebst_threshold_profile_t *profile);
    288 
    289 /*!
    290  * \brief To get EBST scan round scan mode and enable mode.
    291  *
    292  * \param [in] unit Unit Number.
    293  * \param [in] type Ebst control type.
    294  * \param [out] arg arg.
    295  *
    296  * \retval SHR_E_NONE No errors.
    297  * \retval !SHR_E_NONE Failure.
    298  */
    299 extern int
    300 mbcm_ltsw_cosq_ebst_control_get(
    301     int unit,
    302     bcm_cosq_ebst_control_t type,
    303     int *arg);
    304 
    305 /*!
    306  * \brief To set EBST scan round scan mode and enable mode.
    307  *
    308  * \param [in] unit Unit Number.
    309  * \param [in] type Ebst control type.
    310  * \param [in] arg arg.
    311  *
    312  * \retval SHR_E_NONE No errors.
    313  * \retval !SHR_E_NONE Failure.
    314  */
    315 extern int
    316 mbcm_ltsw_cosq_ebst_control_set(
    317     int unit,
    318     bcm_cosq_ebst_control_t type,
    319     int arg);
    320 
    321 /*!
    322  * \brief To get monitor info for a given BST Stat ID.
    323  *
    324  * \param [in] unit Unit Number.
    325  * \param [in] object_id Integrated cosq index.
    326  * \param [in] bid BST stat ID to identify the COSQ resource/object.
    327  * \param [out] monitor EBST monitor info structure.
    328  *
    329  * \retval SHR_E_NONE No errors.
    330  * \retval !SHR_E_NONE Failure.
    331  */
    332 extern int
    333 mbcm_ltsw_cosq_ebst_monitor_get(
    334     int unit,
    335     bcm_cosq_object_id_t *object_id,
    336     bcm_bst_stat_id_t bid,
    337     bcm_cosq_ebst_monitor_t *monitor);
    338 
    339 /*!
    340  * \brief To set monitor info for a given BST Stat ID.
    341  *
    342  * \param [in] unit Unit Number.
    343  * \param [in] object_id Integrated cosq index.
    344  * \param [in] bid BST stat ID to identify the COSQ resource/object.
    345  * \param [in] monitor EBST monitor info structure.
    346  *
    347  * \retval SHR_E_NONE No errors.
    348  * \retval !SHR_E_NONE Failure.
    349  */
    350 extern int
    351 mbcm_ltsw_cosq_ebst_monitor_set(
    352     int unit,
    353     bcm_cosq_object_id_t *object_id,
    354     bcm_bst_stat_id_t bid,
    355     bcm_cosq_ebst_monitor_t *monitor);
    356 
    357 /*!
    358  * \brief To get max number entries and available number entries of  EBST data buffer.
    359  *
    360  * \param [in] unit Unit Number.
    361  * \param [in] object_id Integrated cosq index.
    362  * \param [out] info EBST data buffer info structure.
    363  *
    364  * \retval SHR_E_NONE No errors.
    365  * \retval !SHR_E_NONE Failure.
    366  */
    367 extern int
    368 mbcm_ltsw_cosq_ebst_data_stat_info_get(
    369     int unit,
    370     bcm_cosq_object_id_t *object_id,
    371     bcm_cosq_ebst_data_stat_info_t *info);
    372 
    373 /*!
    374  * \brief To get an identical EBST stat for a given BST Stat ID
    375  *
    376  * \param [in] unit Unit Number.
    377  * \param [in] object_id Integrated cosq index.
    378  * \param [in] bid BST stat ID to identify the COSQ resource/object.
    379  * \param [in] array_size array size.
    380  * \param [out] entry_array entry array.
    381  * \param [out] count Count.
    382  *
    383  * \retval SHR_E_NONE No errors.
    384  * \retval !SHR_E_NONE Failure.
    385  */
    386 extern int
    387 mbcm_ltsw_cosq_ebst_data_get(
    388     int unit,
    389     bcm_cosq_object_id_t *object_id,
    390     bcm_bst_stat_id_t bid,
    391     int array_size,
    392     bcm_cosq_ebst_data_entry_t *entry_array,
    393     int *count);
    394 
    395 /*!
    396  * \brief To enable EBST tracking.
    397  *
    398  * \param [in] unit Unit Number.
    399  * \param [in] enable Enable EBST tracking.
    400  *
    401  * \retval SHR_E_NONE No errors.
    402  * \retval !SHR_E_NONE Failure.
    403  */
    404 extern int
    405 mbcm_ltsw_cosq_ebst_enable_set(
    406     int unit,
    407     int enable);
    408 
    409 /*!
    410  * \brief To get EBST feature enable status.
    411  *
    412  * \param [in] unit Unit Number.
    413  * \param [out] enable Enable EBST tracking status.
    414  *
    415  * \retval SHR_E_NONE No errors.
    416  * \retval !SHR_E_NONE Failure.
    417  */
    418 extern int
    419 mbcm_ltsw_cosq_ebst_enable_get(
    420     int unit,
    421     int *enable);
    422 
    423 /*!
    424  * \brief Initialize the ebst module.
    425  *
    426  * \param [in] unit Unit Number.
    427  *
    428  * \retval SHR_E_NONE No errors.
    429  * \retval !SHR_E_NONE Failure.
    430  */
    431 extern int
    432 mbcm_ltsw_cosq_ebst_init(int unit);
    433 
    434 /*!
    435  * \brief Detach the ebst module.
    436  *
    437  * \param [in] unit Unit Number.
    438  *
    439  * \retval SHR_E_NONE No errors.
    440  * \retval !SHR_E_NONE Failure.
    441  */
    442 extern int
    443 mbcm_ltsw_cosq_ebst_detach(int unit);
    444 
    445 #endif /* BCMINT_LTSW_MBCM_EBST_H */