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

dlb.h (19938B)


      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_DLB_H
     12 #define BCMI_LTSW_DLB_H
     13 
     14 #include <bcm/types.h>
     15 
     16 #include <sal/sal_types.h>
     17 
     18 /*!
     19  * \brief Application type of DLB for a specific device.
     20  */
     21 typedef enum bcmi_ltsw_dlb_type_s {
     22 
     23     /*! For Link Aggregate Group application. */
     24     bcmi_dlb_type_fp_trunk = 0,
     25 
     26     /*! For fabric trunk application. */
     27     bcmi_dlb_type_fabric_trunk = 1,
     28 
     29     /*! For ECMP application. */
     30     bcmi_dlb_type_ecmp = 2,
     31 
     32     /*! DLB application type count. */
     33     bcmi_dlb_type_count = 3
     34 
     35 } bcmi_ltsw_dlb_type_t;
     36 
     37 #define BCMI_LTSW_DLB_TYPE_STR \
     38 { \
     39     "fp_trunk", \
     40     "fabric_trunk", \
     41     "ecmp" \
     42 }
     43 
     44 /*!
     45  * \brief Application controlling type of DLB for a specific device.
     46  */
     47 typedef enum bcmi_ltsw_dlb_control_type_s {
     48 
     49     /*! Number of times historical member load and queued bytes are computed in a second. */
     50     bcmiDlbControlTypeSampleRate = 0,
     51 
     52     /*! The minimum threshold, in mbps, used to quantize historical member load. */
     53     bcmiDlbControlTypeEgressBytesMinThreshold = 1,
     54 
     55     /*! The maximum threshold, in mbps, used to quantize historical member load. */
     56     bcmiDlbControlTypeEgressBytesMaxThreshold = 2,
     57 
     58     /*! The minimum threshold, in bytes, used to quantize historical member queued bytes. */
     59     bcmiDlbControlTypeQueuedBytesMinThreshold = 3,
     60 
     61     /*! The maximum threshold, in bytes, used to quantize historical member queued bytes. */
     62     bcmiDlbControlTypeQueuedBytesMaxThreshold = 4,
     63 
     64     /*! The minimum threshold, in bytes, used to quantize historical member bytes in physical queue. */
     65     bcmiDlbControlTypePhysicalQueuedBytesMinThreshold = 5,
     66 
     67     /*! The maximum threshold, in bytes, used to quantize historical member bytes in physical queue. */
     68     bcmiDlbControlTypePhysicalQueuedBytesMaxThreshold = 6,
     69 
     70     /*! The exponent used in the calculation of exponentially weighted moving average of historical member load. */
     71     bcmiDlbControlTypeEgressBytesExponent = 7,
     72 
     73     /*! The exponent used in the calculation of exponentially weighted moving average of historical member queued bytes. */
     74     bcmiDlbControlTypeQueuedBytesExponent = 8,
     75 
     76     /*! The exponent used in the calculation of exponentially weighted moving average of historical member bytes in physical queue. */
     77     bcmiDlbControlTypePhysicalQueuedBytesExponent = 9,
     78 
     79     /*! If set, the historical member load is reset to the instantaneous value if the latter is smaller. */
     80     bcmiDlbControlTypeEgressBytesDecreaseReset = 10,
     81 
     82     /*! If set, the historical member queued bytes is updated with the instantaneous value if the latter is smaller. */
     83     bcmiDlbControlTypeQueuedBytesDecreaseReset = 11,
     84 
     85     /*! If set, the historical member bytes in physical queue is updated with the instantaneous value if the latter is smaller. */
     86     bcmiDlbControlTypePhysicalQueuedBytesDecreaseReset = 12,
     87 
     88     /*! Seed for RNG used in Dynamic Load Balancing. */
     89     bcmiDlbControlTypeRandomSeed = 13,
     90 
     91     /*! Set RNG seed for DLB flow monitoring for IFP. */
     92     bcmiDlbControlTypeMonitorIngressFieldRandomSeed = 14,
     93 
     94     /*! Set RNG seed for DLB flow monitoring. */
     95     bcmiDlbControlTypeMonitorIngressRandomSeed = 15,
     96 
     97     /*! Offset in ECMP_GROUP pointer for DLB. */
     98     bcmiDlbControlTypeBaseEcmpId = 16,
     99 
    100     /*! DLB application controlling type count. */
    101     bcmiDlbControlTypeCount = 17
    102 
    103 } bcmi_ltsw_dlb_control_type_t;
    104 
    105 #define BCMI_LTSW_DLB_CONTROL_TYPE_STR \
    106 { \
    107     "SampleRate", \
    108     "EgressBytesMinThreshold", \
    109     "EgressBytesMaxThreshold", \
    110     "QueuedBytesMinThreshold", \
    111     "QueuedBytesMaxThreshold", \
    112     "PhysicalQueuedBytesMinThreshold", \
    113     "PhysicalQueuedBytesMaxThreshold", \
    114     "EgressBytesExponent", \
    115     "QueuedBytesExponent", \
    116     "PhysicalQueuedBytesExponent", \
    117     "EgressBytesDecreaseReset", \
    118     "QueuedBytesDecreaseReset", \
    119     "PhysicalQueuedBytesDecreaseReset", \
    120     "RandomSeed", \
    121     "MonitorIngressFieldRandomSeed", \
    122     "MonitorIngressRandomSeed", \
    123     "BaseEcmpId" \
    124 }
    125 
    126 /*!
    127  * \brief Type-based Trunk Id.
    128  */
    129 typedef int bcmi_ltsw_dlb_id_t;
    130 
    131 /*!
    132  * \brief DLB supported features.
    133  */
    134 /*! DLB supports for front panel trunk application. */
    135 #define BCMI_LTSW_DLB_F_FP_TRUNK (1 << 0)
    136 
    137 /*! DLB supports for fabric trunk application. */
    138 #define BCMI_LTSW_DLB_F_FABRIC_TRUNK (1 << 1)
    139 
    140 /*! DLB supports for equal cost multi-path application. */
    141 #define BCMI_LTSW_DLB_F_ECMP (1 << 2)
    142 
    143 /*! DLB trunk supports Dynamic Group Multipath. */
    144 #define BCMI_LTSW_DLB_F_TRUNK_DGM (1 << 3)
    145 
    146 /*! DLB trunk supports Dynamic Group Multipath. */
    147 #define BCMI_LTSW_DLB_F_ECMP_DGM (1 << 4)
    148 
    149 /*! DLB trunk resources are shared between front panel trunk and fabric trunk. */
    150 #define BCMI_LTSW_DLB_F_TRUNK_SHARED (1 << 5)
    151 
    152 /*!
    153  * \brief Option to control DLB id allocation.
    154  */
    155 /*! Use input DLB Id instead of allocating one. */
    156 #define BCMI_LTSW_DLB_O_WITH_ID (1 << 0)
    157 
    158 /*!
    159  * \brief DLB assignment mode.
    160  */
    161 /*! Reassignment to aggregate members whenever the flow set is idle for a time which exceeds or equal to inactivity duration. */
    162 #define BCMI_LTSW_DLB_ASSIGNMENT_MODE_TIME_ELIGIBILITY 0
    163 
    164 /*! Fixed assignment of port per flow. */
    165 #define BCMI_LTSW_DLB_ASSIGNMENT_MODE_FIXED 1
    166 
    167 /*! Reassignment to new member for every packet. */
    168 #define BCMI_LTSW_DLB_ASSIGNMENT_MODE_PACKET_SPRAY 2
    169 
    170 /*! Invalid value for dynamic_scaling_factor. */
    171 #define BCMI_LTSW_DLB_SCALING_FACTOR_INVALID (-1)
    172 
    173 /*! Invalid value for dynamic_load_weight. */
    174 #define BCMI_LTSW_DLB_LOAD_WEIGHT_INVALID (-1)
    175 
    176 /*! Invalid value for dynamic_queue_size_weight. */
    177 #define BCMI_LTSW_DLB_QUEUE_SIZE_WEIGHT_INVALID (-1)
    178 
    179 /*!
    180  * \brief DLB member link status.
    181  */
    182 /*! Force down the DLB member link status. */
    183 #define BCMI_LTSW_DLB_MEMBER_STATUS_FORCE_DOWN 0
    184 
    185 /*! Force up the DLB member link status. */
    186 #define BCMI_LTSW_DLB_MEMBER_STATUS_FORCE_UP 1
    187 
    188 /*! Let HW determine the member link status. */
    189 #define BCMI_LTSW_DLB_MEMBER_STATUS_HW 2
    190 
    191 /*! HW indicates the link down status. */
    192 #define BCMI_LTSW_DLB_MEMBER_STATUS_HW_DOWN 3
    193 
    194 /*! HW indicates the link up status. */
    195 #define BCMI_LTSW_DLB_MEMBER_STATUS_HW_UP 4
    196 
    197 /*!
    198  * \brief DLB monitoring actions.
    199  */
    200 /*! Do not perform monitoring actions. */
    201 #define BCMI_LTSW_DLB_MON_ACTION_NONE 0
    202 
    203 /*! Perform copy to cpu action. */
    204 #define BCMI_LTSW_DLB_MON_COPY_TO_CPU 1
    205 
    206 /*! Perform mirroring action. */
    207 #define BCMI_LTSW_DLB_MON_MIRROR 2
    208 
    209 /*! Perform copy to cpu and mirroring action. */
    210 #define BCMI_LTSW_DLB_MON_COPY_TO_CPU_AND_MIRROR 3
    211 
    212 /*! Perform trace action. */
    213 #define BCMI_LTSW_DLB_MON_TRACE 4
    214 
    215 /*!
    216  * \brief Type-based capability of Dynamic Load Balance.
    217  */
    218 typedef struct bcmi_ltsw_dlb_capability_s {
    219 
    220     /*! The min value of DLB group identifier. */
    221     int id_min;
    222 
    223     /*! The max value of DLB group identifier. */
    224     int id_max;
    225 
    226     /*! Max groups. */
    227     int max_groups;
    228 
    229     /*! Max members per group. */
    230     int max_members_per_group;
    231 
    232     /*! Max alternate members per group. */
    233     int max_alt_members_per_group;
    234 
    235 } bcmi_ltsw_dlb_capability_t;
    236 
    237 /*!
    238  * \brief The member of Dynamic Load Balance.
    239  */
    240 typedef struct bcmi_ltsw_dlb_member_s {
    241 
    242     /*! Port Number. */
    243     int port_id;
    244 
    245     /*! Next Hop Index, only for ECMP. */
    246     int nhop_id;
    247 
    248 } bcmi_ltsw_dlb_member_t;
    249 
    250 /*!
    251  * \brief The member port attribute of Dynamic Load Balance.
    252  */
    253 typedef struct bcmi_ltsw_dlb_member_attribute_s {
    254 
    255     /*! Threshold scaling factor. */
    256     int scaling_factor;
    257 
    258     /*! Weighting of load in determining member quality. */
    259     int load_weight;
    260 
    261     /*! Weighting of total qsize in determining member quality. */
    262     int qsize_weight;
    263 
    264 } bcmi_ltsw_dlb_member_attribute_t;
    265 
    266 /*!
    267  * \brief The statistics of Dynamic Load Balance.
    268  */
    269 typedef struct bcmi_ltsw_dlb_stat_s {
    270 
    271     /*! Fail count. */
    272     uint64_t fail_count;
    273 
    274     /*! Port reassignment count. */
    275     uint64_t port_reassignment_count;
    276 
    277     /*! Member reassignment count for ECMP only. */
    278     uint64_t member_reassignment_count;
    279 
    280 } bcmi_ltsw_dlb_stat_t;
    281 
    282 /*!
    283  * \brief DLB configuration flags.
    284  */
    285 /*! DGM is enabled on this DLB Id. */
    286 #define BCMI_LTSW_DLB_CF_DGM_ENABLED (1 << 0)
    287 
    288 /*!
    289  * \brief The alternate path configuration of Dynamic Load Balance.
    290  */
    291 typedef struct bcmi_ltsw_dlb_alternate_config_s {
    292 
    293     /*! Primary path threshold. */
    294     uint32_t primary_path_threshold;
    295 
    296     /*! Alternate path cost. */
    297     uint32_t alternate_path_cost;
    298 
    299     /*! Alternate path bias. */
    300     uint32_t alternate_path_bias;
    301 
    302 } bcmi_ltsw_dlb_alternate_config_t;
    303 
    304 /*!
    305  * \brief Generic configurations of Dynamic Load Balance.
    306  */
    307 typedef struct bcmi_ltsw_dlb_config_s {
    308 
    309     /*! DLB configuration flags. See BCMI_LTSW_DLB_CF_xxx. */
    310     uint32_t flags;
    311 
    312     /*! Inactivity duration, in microseconds. */
    313     int inactivity_time;
    314 
    315     /*! Assignment mode. */
    316     int assignment_mode;
    317 
    318     /*! Number of flowset for Dynamic Load Balance. */
    319     int flowset_size;
    320 
    321     /*! DLB group primary path member size. */
    322     int num_paths;
    323 
    324     /*! DLB member array. */
    325     bcmi_ltsw_dlb_member_t *member;
    326 
    327     /*! DLB group primary path member max size. Used for get function only. */
    328     int max_num_paths;
    329 
    330     /*! DLB group alternate path configurations. */
    331     bcmi_ltsw_dlb_alternate_config_t alternate_config;
    332 
    333     /*! DLB group alternate path member size. */
    334     int alternate_num_paths;
    335 
    336     /*! DLB alternate member array. */
    337     bcmi_ltsw_dlb_member_t *alternate_member;
    338 
    339     /*! DLB group alternate path member max size. Used for get function only. */
    340     int max_alternate_num_paths;
    341 
    342 } bcmi_ltsw_dlb_config_t;
    343 
    344 /*!
    345  * \brief The statistics of Dynamic Load Balance.
    346  */
    347 typedef struct bcmi_ltsw_dlb_monitor_s {
    348 
    349     /*! Enable monitoring for a specified DLB Id. */
    350     int enable;
    351 
    352     /*! Dlb monitoring actions. */
    353     int action;
    354 
    355     /*! DLB monitor sampling rate. */
    356     uint64_t sample_rate;
    357 
    358 } bcmi_ltsw_dlb_monitor_t;
    359 
    360 /*!
    361  * \brief Create a dlb Id for a specific application type
    362  *
    363  * \param [in] unit Unit Number.
    364  * \param [in] option DLB create option, See BCMI_LTSW_DLB_O_XXX.
    365  * \param [in] dlb_type Dynamic Load Balance type.
    366  * \param [out] dlb_id Dynamic Load Balance Id.
    367  *
    368  * \retval SHR_E_NONE No errors.
    369  * \retval !SHR_E_NONE Failure.
    370  */
    371 extern int
    372 bcmi_ltsw_dlb_id_create(
    373     int unit,
    374     uint32_t option,
    375     bcmi_ltsw_dlb_type_t dlb_type,
    376     bcmi_ltsw_dlb_id_t *dlb_id);
    377 
    378 /*!
    379  * \brief Destroy a dlb Id for a specific application type.
    380  *
    381  * \param [in] unit Unit Number.
    382  * \param [in] dlb_type Dynamic Load Balance type.
    383  * \param [in] dlb_id Dynamic Load Balance Id.
    384  *
    385  * \retval SHR_E_NONE No errors.
    386  * \retval !SHR_E_NONE Failure.
    387  */
    388 extern int
    389 bcmi_ltsw_dlb_id_destroy(
    390     int unit,
    391     bcmi_ltsw_dlb_type_t dlb_type,
    392     bcmi_ltsw_dlb_id_t dlb_id);
    393 
    394 /*!
    395  * \brief Validate the DLB id is configured or not.
    396  *
    397  * \param [in] unit Unit Number.
    398  * \param [in] dlb_type Dynamic Load Balance type.
    399  * \param [in] dlb_id Dynamic Load Balance Id.
    400  *
    401  * \retval true The DLB Id is configured.
    402  * \retval false The DLB Id is not configured.
    403  */
    404 extern bool
    405 bcmi_ltsw_dlb_id_configured(
    406     int unit,
    407     bcmi_ltsw_dlb_type_t dlb_type,
    408     bcmi_ltsw_dlb_id_t dlb_id);
    409 
    410 /*!
    411  * \brief Set DLB member port attributes.
    412  *
    413  * \param [in] unit Unit Number.
    414  * \param [in] port Port Number.
    415  * \param [in] dlb_type Dynamic Load Balance type.
    416  * \param [in] attribute Type-based DLB member port attribute.
    417  *
    418  * \retval SHR_E_NONE No errors.
    419  * \retval !SHR_E_NONE Failure.
    420  */
    421 extern int
    422 bcmi_ltsw_dlb_member_attribute_set(
    423     int unit,
    424     bcm_port_t port,
    425     bcmi_ltsw_dlb_type_t dlb_type,
    426     bcmi_ltsw_dlb_member_attribute_t *attribute);
    427 
    428 /*!
    429  * \brief Get DLB member port attributes.
    430  *
    431  * \param [in] unit Unit Number.
    432  * \param [in] port Port Number.
    433  * \param [in] dlb_type Dynamic Load Balance type.
    434  * \param [out] attribute Type-based DLB member port attribute.
    435  *
    436  * \retval SHR_E_NONE No errors.
    437  * \retval !SHR_E_NONE Failure.
    438  */
    439 extern int
    440 bcmi_ltsw_dlb_member_attribute_get(
    441     int unit,
    442     bcm_port_t port,
    443     bcmi_ltsw_dlb_type_t dlb_type,
    444     bcmi_ltsw_dlb_member_attribute_t *attribute);
    445 
    446 /*!
    447  * \brief Get statistics for a DLB group.
    448  *
    449  * \param [in] unit Unit Number.
    450  * \param [in] dlb_type Dynamic Load Balance type.
    451  * \param [in] dlb_id Dynamic Load Balance Id.
    452  * \param [out] stat DLB configurations.
    453  *
    454  * \retval SHR_E_NONE No errors.
    455  * \retval !SHR_E_NONE Failure.
    456  */
    457 extern int
    458 bcmi_ltsw_dlb_stat_get(
    459     int unit,
    460     bcmi_ltsw_dlb_type_t dlb_type,
    461     bcmi_ltsw_dlb_id_t dlb_id,
    462     bcmi_ltsw_dlb_stat_t *stat);
    463 
    464 /*!
    465  * \brief Get statistics from HW for a DLB group.
    466  *
    467  * \param [in] unit Unit Number.
    468  * \param [in] dlb_type Dynamic Load Balance type.
    469  * \param [in] dlb_id Dynamic Load Balance Id.
    470  * \param [out] stat DLB configurations.
    471  *
    472  * \retval SHR_E_NONE No errors.
    473  * \retval !SHR_E_NONE Failure.
    474  */
    475 extern int
    476 bcmi_ltsw_dlb_stat_sync_get(
    477     int unit,
    478     bcmi_ltsw_dlb_type_t dlb_type,
    479     bcmi_ltsw_dlb_id_t dlb_id,
    480     bcmi_ltsw_dlb_stat_t *stat);
    481 
    482 /*!
    483  * \brief dump software information for DLB module.
    484  *
    485  * \param [in] unit Unit Number.
    486  */
    487 extern void
    488 bcmi_ltsw_dlb_sw_dump(int unit);
    489 
    490 /*!
    491  * \brief Get chip-specific sub-features for DLB.
    492  *
    493  * \param [in] unit Unit Number.
    494  * \param [out] features Trunk Type.
    495  *
    496  * \retval SHR_E_NONE No errors.
    497  * \retval !SHR_E_NONE Failure.
    498  */
    499 extern int
    500 bcmi_ltsw_dlb_feature_get(
    501     int unit,
    502     uint32_t *features);
    503 
    504 /*!
    505  * \brief Get chip-specific sub-features for DLB.
    506  *
    507  * \param [in] unit Unit Number.
    508  * \param [in] dlb_type Dynamic Load Balance type.
    509  * \param [out] cap Type-based capability for DLB.
    510  *
    511  * \retval SHR_E_NONE No errors.
    512  * \retval !SHR_E_NONE Failure.
    513  */
    514 extern int
    515 bcmi_ltsw_dlb_capability_get(
    516     int unit,
    517     bcmi_ltsw_dlb_type_t dlb_type,
    518     bcmi_ltsw_dlb_capability_t *cap);
    519 
    520 /*!
    521  * \brief Initialize the dlb module.
    522  *
    523  * \param [in] unit Unit Number.
    524  *
    525  * \retval SHR_E_NONE No errors.
    526  * \retval !SHR_E_NONE Failure.
    527  */
    528 extern int
    529 bcmi_ltsw_dlb_init(int unit);
    530 
    531 /*!
    532  * \brief De-init the dlb module.
    533  *
    534  * \param [in] unit Unit Number.
    535  *
    536  * \retval SHR_E_NONE No errors.
    537  * \retval !SHR_E_NONE Failure.
    538  */
    539 extern int
    540 bcmi_ltsw_dlb_deinit(int unit);
    541 
    542 /*!
    543  * \brief Initialize the dlb module.
    544  *
    545  * \param [in] unit Unit Number.
    546  * \param [in] dlb_type Dynamic Load Balance type.
    547  *
    548  * \retval SHR_E_NONE No errors.
    549  * \retval !SHR_E_NONE Failure.
    550  */
    551 extern int
    552 bcmi_ltsw_dlb_type_init(
    553     int unit,
    554     bcmi_ltsw_dlb_type_t dlb_type);
    555 
    556 /*!
    557  * \brief De-init the dlb module.
    558  *
    559  * \param [in] unit Unit Number.
    560  * \param [in] dlb_type Dynamic Load Balance type.
    561  *
    562  * \retval SHR_E_NONE No errors.
    563  * \retval !SHR_E_NONE Failure.
    564  */
    565 extern int
    566 bcmi_ltsw_dlb_type_deinit(
    567     int unit,
    568     bcmi_ltsw_dlb_type_t dlb_type);
    569 
    570 /*!
    571  * \brief Set configurations of a DLB group.
    572  *
    573  * \param [in] unit Unit Number.
    574  * \param [in] dlb_type Dynamic Load Balance type.
    575  * \param [in] dlb_id Dynamic Load Balance Id.
    576  * \param [in] dlb_config DLB configurations.
    577  *
    578  * \retval SHR_E_NONE No errors.
    579  * \retval !SHR_E_NONE Failure.
    580  */
    581 extern int
    582 bcmi_ltsw_dlb_config_set(
    583     int unit,
    584     bcmi_ltsw_dlb_type_t dlb_type,
    585     bcmi_ltsw_dlb_id_t dlb_id,
    586     bcmi_ltsw_dlb_config_t *dlb_config);
    587 
    588 /*!
    589  * \brief Get configurations of a DLB group.
    590  *
    591  * \param [in] unit Unit Number.
    592  * \param [in] dlb_type Dynamic Load Balance type.
    593  * \param [in] dlb_id Dynamic Load Balance Id.
    594  * \param [out] dlb_config DLB configurations.
    595  *
    596  * \retval SHR_E_NONE No errors.
    597  * \retval !SHR_E_NONE Failure.
    598  */
    599 extern int
    600 bcmi_ltsw_dlb_config_get(
    601     int unit,
    602     bcmi_ltsw_dlb_type_t dlb_type,
    603     bcmi_ltsw_dlb_id_t dlb_id,
    604     bcmi_ltsw_dlb_config_t *dlb_config);
    605 
    606 /*!
    607  * \brief Set DLB monitor.
    608  *
    609  * \param [in] unit Unit Number.
    610  * \param [in] dlb_type Dynamic Load Balance type.
    611  * \param [in] dlb_id Dynamic Load Balance Id.
    612  * \param [in] monitor DLB monitoring configurations.
    613  *
    614  * \retval SHR_E_NONE No errors.
    615  * \retval !SHR_E_NONE Failure.
    616  */
    617 extern int
    618 bcmi_ltsw_dlb_monitor_set(
    619     int unit,
    620     bcmi_ltsw_dlb_type_t dlb_type,
    621     bcmi_ltsw_dlb_id_t dlb_id,
    622     bcmi_ltsw_dlb_monitor_t *monitor);
    623 
    624 /*!
    625  * \brief Get DLB monitor configurations.
    626  *
    627  * \param [in] unit Unit Number.
    628  * \param [in] dlb_type Dynamic Load Balance type.
    629  * \param [in] dlb_id Dynamic Load Balance Id.
    630  * \param [out] monitor DLB monitoring configurations.
    631  *
    632  * \retval SHR_E_NONE No errors.
    633  * \retval !SHR_E_NONE Failure.
    634  */
    635 extern int
    636 bcmi_ltsw_dlb_monitor_get(
    637     int unit,
    638     bcmi_ltsw_dlb_type_t dlb_type,
    639     bcmi_ltsw_dlb_id_t dlb_id,
    640     bcmi_ltsw_dlb_monitor_t *monitor);
    641 
    642 /*!
    643  * \brief Set DLB member status.
    644  *
    645  * \param [in] unit Unit Number.
    646  * \param [in] port Port Number.
    647  * \param [in] dlb_type Dynamic Load Balance type.
    648  * \param [in] status Type-based DLB member status.
    649  *
    650  * \retval SHR_E_NONE No errors.
    651  * \retval !SHR_E_NONE Failure.
    652  */
    653 extern int
    654 bcmi_ltsw_dlb_member_status_set(
    655     int unit,
    656     bcm_port_t port,
    657     bcmi_ltsw_dlb_type_t dlb_type,
    658     int status);
    659 
    660 /*!
    661  * \brief Get DLB member status.
    662  *
    663  * \param [in] unit Unit Number.
    664  * \param [in] port Port Number.
    665  * \param [in] dlb_type Dynamic Load Balance type.
    666  * \param [out] status Type-based DLB member status.
    667  *
    668  * \retval SHR_E_NONE No errors.
    669  * \retval !SHR_E_NONE Failure.
    670  */
    671 extern int
    672 bcmi_ltsw_dlb_member_status_get(
    673     int unit,
    674     bcm_port_t port,
    675     bcmi_ltsw_dlb_type_t dlb_type,
    676     int *status);
    677 
    678 /*!
    679  * \brief Set DLB Eligibility Ethertype.
    680  *
    681  * \param [in] unit Unit Number.
    682  * \param [in] flags Flags.
    683  * \param [in] ethertype_count Ethertype array count.
    684  * \param [in] ethertype_array Ethertype array.
    685  *
    686  * \retval SHR_E_NONE No errors.
    687  * \retval !SHR_E_NONE Failure.
    688  */
    689 extern int
    690 bcmi_ltsw_dlb_ethertype_set(
    691     int unit,
    692     uint32_t flags,
    693     int ethertype_count,
    694     int *ethertype_array);
    695 
    696 /*!
    697  * \brief Get DLB Eligibility Ethertype.
    698  *
    699  * \param [in] unit Unit Number.
    700  * \param [in] ethertype_count_max Max ethertype array count.
    701  * \param [out] flags Flags.
    702  * \param [out] ethertype_array Ethertype array.
    703  * \param [out] ethertype_count Actual ethertype array count.
    704  *
    705  * \retval SHR_E_NONE No errors.
    706  * \retval !SHR_E_NONE Failure.
    707  */
    708 extern int
    709 bcmi_ltsw_dlb_ethertype_get(
    710     int unit,
    711     int ethertype_count_max,
    712     uint32_t *flags,
    713     int *ethertype_array,
    714     int *ethertype_count);
    715 
    716 /*!
    717  * \brief Set DLB controlling information.
    718  *
    719  * \param [in] unit Unit Number.
    720  * \param [in] dlb_type Dynamic Load Balance type.
    721  * \param [in] type Dynamic Load Balance controlling type.
    722  * \param [in] value Type-based controlling value for DLB.
    723  *
    724  * \retval SHR_E_NONE No errors.
    725  * \retval !SHR_E_NONE Failure.
    726  */
    727 extern int
    728 bcmi_ltsw_dlb_control_set(
    729     int unit,
    730     bcmi_ltsw_dlb_type_t dlb_type,
    731     bcmi_ltsw_dlb_control_type_t type,
    732     uint64_t value);
    733 
    734 /*!
    735  * \brief Get DLB controlling information.
    736  *
    737  * \param [in] unit Unit Number.
    738  * \param [in] dlb_type Dynamic Load Balance type.
    739  * \param [in] type Dynamic Load Balance controlling type.
    740  * \param [out] value Type-based controlling value for DLB.
    741  *
    742  * \retval SHR_E_NONE No errors.
    743  * \retval !SHR_E_NONE Failure.
    744  */
    745 extern int
    746 bcmi_ltsw_dlb_control_get(
    747     int unit,
    748     bcmi_ltsw_dlb_type_t dlb_type,
    749     bcmi_ltsw_dlb_control_type_t type,
    750     uint64_t *value);
    751 
    752 /*!
    753  * \brief Set statistics for a DLB group.
    754  *
    755  * \param [in] unit Unit Number.
    756  * \param [in] dlb_type Dynamic Load Balance type.
    757  * \param [in] dlb_id Dynamic Load Balance Id.
    758  * \param [in] stat DLB configurations.
    759  *
    760  * \retval SHR_E_NONE No errors.
    761  * \retval !SHR_E_NONE Failure.
    762  */
    763 extern int
    764 bcmi_ltsw_dlb_stat_set(
    765     int unit,
    766     bcmi_ltsw_dlb_type_t dlb_type,
    767     bcmi_ltsw_dlb_id_t dlb_id,
    768     bcmi_ltsw_dlb_stat_t *stat);
    769 
    770 #endif /* BCMI_LTSW_DLB_H */