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

hash_output_selection.h (22500B)


      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_HASH_OUTPUT_SELECTION_H
     12 #define BCMINT_LTSW_MBCM_HASH_OUTPUT_SELECTION_H
     13 
     14 #include <bcm_int/ltsw/hash_output_selection_int.h>
     15 #include <bcm_int/ltsw/hash_output_selection.h>
     16 
     17 #include <sal/sal_types.h>
     18 
     19 /*!
     20  * \brief Get information of hash output selection functionalities.
     21  *
     22  * \param [in] unit Unit Number.
     23  * \param [in] info The hash output selection information.
     24  * \param [out] value The hash output selection information value.
     25  *
     26  * \retval SHR_E_NONE No errors.
     27  * \retval !SHR_E_NONE Failure.
     28  */
     29 typedef int (*hos_info_get_f)(
     30     int unit,
     31     bcmint_hos_info_t info,
     32     int *value);
     33 
     34 /*!
     35  * \brief Validate the hash output selection profile parameters.
     36  *
     37  * \param [in] unit Unit Number.
     38  * \param [in] profile_id Profile identifier.
     39  * \param [in] type The hash output selection type.
     40  * \param [in] array_size Array size.
     41  * \param [in] ctrl_type The hash output selection profile control type.
     42  * \param [in] value The hash output selection profile control value.
     43  *
     44  * \retval SHR_E_NONE No errors.
     45  * \retval !SHR_E_NONE Failure.
     46  */
     47 typedef int (*hos_validate_profile_params_f)(
     48     int unit,
     49     int profile_id,
     50     bcmi_ltsw_hos_type_t type,
     51     int array_size,
     52     bcmi_ltsw_hos_profile_control_t *ctrl_type,
     53     int *value);
     54 
     55 /*!
     56  * \brief Validate the hash output selection instance parameters.
     57  *
     58  * \param [in] unit Unit Number.
     59  * \param [in] type The hash output selection type.
     60  * \param [in] inst_id Instance identifier.
     61  * \param [in] flow_id Flow identifier.
     62  * \param [in] array_size Array size.
     63  * \param [in] ctrl_type The hash output selection instance control type.
     64  * \param [in] value The hash output selection control value.
     65  *
     66  * \retval SHR_E_NONE No errors.
     67  * \retval !SHR_E_NONE Failure.
     68  */
     69 typedef int (*hos_validate_instance_params_f)(
     70     int unit,
     71     bcmi_ltsw_hos_type_t type,
     72     int inst_id,
     73     int flow_id,
     74     int array_size,
     75     bcmi_ltsw_hos_instance_control_t *ctrl_type,
     76     int *value);
     77 
     78 /*!
     79  * \brief Insert a hash output selection profile to logical table.
     80  *
     81  * \param [in] unit Unit Number.
     82  * \param [in] option Profile created option.
     83  * \param [inout] profile_id Profile identifier.
     84  *
     85  * \retval SHR_E_NONE No errors.
     86  * \retval !SHR_E_NONE Failure.
     87  */
     88 typedef int (*hos_profile_create_f)(
     89     int unit,
     90     uint32_t option,
     91     int *profile_id);
     92 
     93 /*!
     94  * \brief Delete a hash output selection profile from logical table.
     95  *
     96  * \param [in] unit Unit Number.
     97  * \param [in] profile_id Profile identifier.
     98  *
     99  * \retval SHR_E_NONE No errors.
    100  * \retval !SHR_E_NONE Failure.
    101  */
    102 typedef int (*hos_profile_destroy_f)(
    103     int unit,
    104     int profile_id);
    105 
    106 /*!
    107  * \brief Check whether this hash output selection profile is configured or not.
    108  *
    109  * \param [in] unit Unit Number.
    110  * \param [in] profile_id Profile identifier.
    111  *
    112  * \retval SHR_E_NONE No errors.
    113  * \retval !SHR_E_NONE Failure.
    114  */
    115 typedef int (*hos_profile_configured_f)(
    116     int unit,
    117     int profile_id);
    118 
    119 /*!
    120  * \brief Multi-control the hash output selection profile.
    121  *
    122  * \param [in] unit Unit Number.
    123  * \param [in] profile_id Profile identifier.
    124  * \param [in] type The hash output selection type.
    125  * \param [in] array_size controlling configuration array size.
    126  * \param [in] ctrl_type The hash output selection profile control type array.
    127  * \param [in] value The hash output selection profile control value array.
    128  *
    129  * \retval SHR_E_NONE No errors.
    130  * \retval !SHR_E_NONE Failure.
    131  */
    132 typedef int (*hos_profile_set_f)(
    133     int unit,
    134     int profile_id,
    135     bcmi_ltsw_hos_type_t type,
    136     int array_size,
    137     bcmi_ltsw_hos_profile_control_t *ctrl_type,
    138     int *value);
    139 
    140 /*!
    141  * \brief Get the hash output selection profile configuration.
    142  *
    143  * \param [in] unit Unit Number.
    144  * \param [in] profile_id Profile identifier.
    145  * \param [in] type The hash output selection type.
    146  * \param [in] ctrl_type The hash output selection profile control type.
    147  * \param [out] value The hash output selection profile control value.
    148  *
    149  * \retval SHR_E_NONE No errors.
    150  * \retval !SHR_E_NONE Failure.
    151  */
    152 typedef int (*hos_profile_get_f)(
    153     int unit,
    154     int profile_id,
    155     bcmi_ltsw_hos_type_t type,
    156     bcmi_ltsw_hos_profile_control_t ctrl_type,
    157     int *value);
    158 
    159 /*!
    160  * \brief Get the hash output selection instance information.
    161  *
    162  * \param [in] unit Unit Number.
    163  * \param [in] type The hash output selection type.
    164  * \param [out] inst_count Instance identifier count.
    165  * \param [out] flow_id_count Flow identifier count.
    166  *
    167  * \retval SHR_E_NONE No errors.
    168  * \retval !SHR_E_NONE Failure.
    169  */
    170 typedef int (*hos_instance_info_get_f)(
    171     int unit,
    172     bcmi_ltsw_hos_type_t type,
    173     int *inst_count,
    174     int *flow_id_count);
    175 
    176 /*!
    177  * \brief Get the maximum of hashing value offset.
    178  *
    179  * \param [in] unit Unit Number.
    180  * \param [in] type The hash output selection type.
    181  * \param [in] concat Concatenation mode.
    182  * \param [out] max_offset The maximum of hashing value offset.
    183  *
    184  * \retval SHR_E_NONE No errors.
    185  * \retval !SHR_E_NONE Failure.
    186  */
    187 typedef int (*hos_instance_offset_max_get_f)(
    188     int unit,
    189     bcmi_ltsw_hos_type_t type,
    190     int concat,
    191     int *max_offset);
    192 
    193 /*!
    194  * \brief Instance offset decode.
    195  *
    196  * \param [in] unit Unit Number.
    197  * \param [in] type The hash output selection type.
    198  * \param [in] concat Concatenation mode.
    199  * \param [in] offset Hashing value offset.
    200  * \param [out] sub_sel The sub-selection of hashing value offset.
    201  * \param [out] sub_offset The sub-offset of hashing value offset.
    202  *
    203  * \retval SHR_E_NONE No errors.
    204  * \retval !SHR_E_NONE Failure.
    205  */
    206 typedef int (*hos_instance_offset_decode_f)(
    207     int unit,
    208     bcmi_ltsw_hos_type_t type,
    209     int concat,
    210     int offset,
    211     int *sub_sel,
    212     int *sub_offset);
    213 
    214 /*!
    215  * \brief Instance offset encode.
    216  *
    217  * \param [in] unit Unit Number.
    218  * \param [in] type The hash output selection type.
    219  * \param [in] concat Concatenation mode.
    220  * \param [in] sub_sel The sub-selection of hashing value offset.
    221  * \param [in] sub_offset The sub-offset of hashing value offset.
    222  * \param [out] offset Hashing value offset.
    223  *
    224  * \retval SHR_E_NONE No errors.
    225  * \retval !SHR_E_NONE Failure.
    226  */
    227 typedef int (*hos_instance_offset_encode_f)(
    228     int unit,
    229     bcmi_ltsw_hos_type_t type,
    230     int concat,
    231     int sub_sel,
    232     int sub_offset,
    233     int *offset);
    234 
    235 /*!
    236  * \brief Set hash output selection instance subsel and offset through random seed.
    237  *
    238  * \param [in] unit Unit Number.
    239  * \param [in] type The hash output selection type.
    240  * \param [in] inst_id Instance identifier.
    241  * \param [in] concat Concatenation mode.
    242  * \param [in] seed Random seed
    243  *
    244  * \retval SHR_E_NONE No errors.
    245  * \retval !SHR_E_NONE Failure.
    246  */
    247 typedef int (*hos_instance_offset_seed_set_f)(
    248     int unit,
    249     bcmi_ltsw_hos_type_t type,
    250     int inst_id,
    251     int concat,
    252     uint32_t seed);
    253 
    254 /*!
    255  * \brief Set hash output selection instance subsel and offset through min, max and stride.
    256  *
    257  * \param [in] unit Unit Number.
    258  * \param [in] type The hash output selection type.
    259  * \param [in] inst_id Instance identifier.
    260  * \param [in] concat Concatenation mode.
    261  * \param [in] min The minimum of offset.
    262  * \param [in] max The maximum of offset.
    263  * \param [in] stride The stride of offset.
    264  *
    265  * \retval SHR_E_NONE No errors.
    266  * \retval !SHR_E_NONE Failure.
    267  */
    268 typedef int (*hos_instance_offset_stride_set_f)(
    269     int unit,
    270     bcmi_ltsw_hos_type_t type,
    271     int inst_id,
    272     int concat,
    273     int min,
    274     int max,
    275     int stride);
    276 
    277 /*!
    278  * \brief Multi-control the hash output selection instance.
    279  *
    280  * \param [in] unit Unit Number.
    281  * \param [in] type The hash output selection type.
    282  * \param [in] inst_id Instance identifier.
    283  * \param [in] flow_id Flow identifier.
    284  * \param [in] array_size Controlling configuration array size.
    285  * \param [in] ctrl_type The hash output selection instance control type array.
    286  * \param [in] value The hash output selection instance control value array.
    287  *
    288  * \retval SHR_E_NONE No errors.
    289  * \retval !SHR_E_NONE Failure.
    290  */
    291 typedef int (*hos_instance_set_f)(
    292     int unit,
    293     bcmi_ltsw_hos_type_t type,
    294     int inst_id,
    295     int flow_id,
    296     int array_size,
    297     bcmi_ltsw_hos_instance_control_t *ctrl_type,
    298     int *value);
    299 
    300 /*!
    301  * \brief Get the hash output selection instance configuration.
    302  *
    303  * \param [in] unit Unit Number.
    304  * \param [in] type The hash output selection type.
    305  * \param [in] inst_id Instance identifier.
    306  * \param [in] flow_id Flow identifier.
    307  * \param [in] array_size Controlling configuration array size.
    308  * \param [in] ctrl_type The hash output selection instance control type.
    309  * \param [out] value The hash output selection instance control value.
    310  *
    311  * \retval SHR_E_NONE No errors.
    312  * \retval !SHR_E_NONE Failure.
    313  */
    314 typedef int (*hos_instance_get_f)(
    315     int unit,
    316     bcmi_ltsw_hos_type_t type,
    317     int inst_id,
    318     int flow_id,
    319     int array_size,
    320     bcmi_ltsw_hos_instance_control_t *ctrl_type,
    321     int *value);
    322 
    323 /*!
    324  * \brief Initialize the hash output selection chip-based database.
    325  *
    326  * \param [in] unit Unit Number.
    327  * \param [in] warm The warmboot state.
    328  *
    329  * \retval SHR_E_NONE No errors.
    330  * \retval !SHR_E_NONE Failure.
    331  */
    332 typedef int (*hos_db_init_f)(
    333     int unit,
    334     int warm);
    335 
    336 /*!
    337  * \brief De-initialize the hash output selection chip-based database.
    338  *
    339  * \param [in] unit Unit Number.
    340  *
    341  * \retval SHR_E_NONE No errors.
    342  * \retval !SHR_E_NONE Failure.
    343  */
    344 typedef int (*hos_db_deinit_f)(int unit);
    345 
    346 /*!
    347  * \brief Initialize the hash output selection module.
    348  *
    349  * \param [in] unit Unit Number.
    350  *
    351  * \retval SHR_E_NONE No errors.
    352  * \retval !SHR_E_NONE Failure.
    353  */
    354 typedef int (*hos_init_f)(int unit);
    355 
    356 /*!
    357  * \brief De-init the hash output selection module.
    358  *
    359  * \param [in] unit Unit Number.
    360  *
    361  * \retval SHR_E_NONE No errors.
    362  * \retval !SHR_E_NONE Failure.
    363  */
    364 typedef int (*hos_deinit_f)(int unit);
    365 
    366 /*!
    367  * \brief Hos driver structure.
    368  */
    369 typedef struct mbcm_ltsw_hos_drv_s {
    370 
    371     /*! Get information of hash output selection functionalities. */
    372     hos_info_get_f hos_info_get;
    373 
    374     /*! Validate the hash output selection profile parameters. */
    375     hos_validate_profile_params_f hos_validate_profile_params;
    376 
    377     /*! Validate the hash output selection instance parameters. */
    378     hos_validate_instance_params_f hos_validate_instance_params;
    379 
    380     /*! Insert a hash output selection profile to logical table. */
    381     hos_profile_create_f hos_profile_create;
    382 
    383     /*! Delete a hash output selection profile from logical table. */
    384     hos_profile_destroy_f hos_profile_destroy;
    385 
    386     /*! Check whether this hash output selection profile is configured or not. */
    387     hos_profile_configured_f hos_profile_configured;
    388 
    389     /*! Multi-control the hash output selection profile. */
    390     hos_profile_set_f hos_profile_set;
    391 
    392     /*! Get the hash output selection profile configuration. */
    393     hos_profile_get_f hos_profile_get;
    394 
    395     /*! Get the hash output selection instance information. */
    396     hos_instance_info_get_f hos_instance_info_get;
    397 
    398     /*! Get the maximum of hashing value offset. */
    399     hos_instance_offset_max_get_f hos_instance_offset_max_get;
    400 
    401     /*! Instance offset decode. */
    402     hos_instance_offset_decode_f hos_instance_offset_decode;
    403 
    404     /*! Instance offset encode. */
    405     hos_instance_offset_encode_f hos_instance_offset_encode;
    406 
    407     /*! Set hash output selection instance subsel and offset through random seed. */
    408     hos_instance_offset_seed_set_f hos_instance_offset_seed_set;
    409 
    410     /*! Set hash output selection instance subsel and offset through min, max and stride. */
    411     hos_instance_offset_stride_set_f hos_instance_offset_stride_set;
    412 
    413     /*! Multi-control the hash output selection instance. */
    414     hos_instance_set_f hos_instance_set;
    415 
    416     /*! Get the hash output selection instance configuration. */
    417     hos_instance_get_f hos_instance_get;
    418 
    419     /*! Initialize the hash output selection chip-based database. */
    420     hos_db_init_f hos_db_init;
    421 
    422     /*! De-initialize the hash output selection chip-based database. */
    423     hos_db_deinit_f hos_db_deinit;
    424 
    425     /*! Initialize the hash output selection module. */
    426     hos_init_f hos_init;
    427 
    428     /*! De-init the hash output selection module. */
    429     hos_deinit_f hos_deinit;
    430 
    431 } mbcm_ltsw_hos_drv_t;
    432 
    433 /*!
    434  * \brief Set the HOS driver of the device.
    435  *
    436  * \param [in] unit Unit Number.
    437  * \param [in] drv Hos driver to set.
    438  *
    439  * \retval SHR_E_NONE No errors.
    440  * \retval !SHR_E_NONE Failure.
    441  */
    442 extern int
    443 mbcm_ltsw_hos_drv_set(
    444     int unit,
    445     mbcm_ltsw_hos_drv_t *drv);
    446 
    447 /*!
    448  * \brief Get information of hash output selection functionalities.
    449  *
    450  * \param [in] unit Unit Number.
    451  * \param [in] info The hash output selection information.
    452  * \param [out] value The hash output selection information value.
    453  *
    454  * \retval SHR_E_NONE No errors.
    455  * \retval !SHR_E_NONE Failure.
    456  */
    457 extern int
    458 mbcm_ltsw_hos_info_get(
    459     int unit,
    460     bcmint_hos_info_t info,
    461     int *value);
    462 
    463 /*!
    464  * \brief Validate the hash output selection profile parameters.
    465  *
    466  * \param [in] unit Unit Number.
    467  * \param [in] profile_id Profile identifier.
    468  * \param [in] type The hash output selection type.
    469  * \param [in] array_size Array size.
    470  * \param [in] ctrl_type The hash output selection profile control type.
    471  * \param [in] value The hash output selection profile control value.
    472  *
    473  * \retval SHR_E_NONE No errors.
    474  * \retval !SHR_E_NONE Failure.
    475  */
    476 extern int
    477 mbcm_ltsw_hos_validate_profile_params(
    478     int unit,
    479     int profile_id,
    480     bcmi_ltsw_hos_type_t type,
    481     int array_size,
    482     bcmi_ltsw_hos_profile_control_t *ctrl_type,
    483     int *value);
    484 
    485 /*!
    486  * \brief Validate the hash output selection instance parameters.
    487  *
    488  * \param [in] unit Unit Number.
    489  * \param [in] type The hash output selection type.
    490  * \param [in] inst_id Instance identifier.
    491  * \param [in] flow_id Flow identifier.
    492  * \param [in] array_size Array size.
    493  * \param [in] ctrl_type The hash output selection instance control type.
    494  * \param [in] value The hash output selection control value.
    495  *
    496  * \retval SHR_E_NONE No errors.
    497  * \retval !SHR_E_NONE Failure.
    498  */
    499 extern int
    500 mbcm_ltsw_hos_validate_instance_params(
    501     int unit,
    502     bcmi_ltsw_hos_type_t type,
    503     int inst_id,
    504     int flow_id,
    505     int array_size,
    506     bcmi_ltsw_hos_instance_control_t *ctrl_type,
    507     int *value);
    508 
    509 /*!
    510  * \brief Insert a hash output selection profile to logical table.
    511  *
    512  * \param [in] unit Unit Number.
    513  * \param [in] option Profile created option.
    514  * \param [inout] profile_id Profile identifier.
    515  *
    516  * \retval SHR_E_NONE No errors.
    517  * \retval !SHR_E_NONE Failure.
    518  */
    519 extern int
    520 mbcm_ltsw_hos_profile_create(
    521     int unit,
    522     uint32_t option,
    523     int *profile_id);
    524 
    525 /*!
    526  * \brief Delete a hash output selection profile from logical table.
    527  *
    528  * \param [in] unit Unit Number.
    529  * \param [in] profile_id Profile identifier.
    530  *
    531  * \retval SHR_E_NONE No errors.
    532  * \retval !SHR_E_NONE Failure.
    533  */
    534 extern int
    535 mbcm_ltsw_hos_profile_destroy(
    536     int unit,
    537     int profile_id);
    538 
    539 /*!
    540  * \brief Check whether this hash output selection profile is configured or not.
    541  *
    542  * \param [in] unit Unit Number.
    543  * \param [in] profile_id Profile identifier.
    544  *
    545  * \retval SHR_E_NONE No errors.
    546  * \retval !SHR_E_NONE Failure.
    547  */
    548 extern int
    549 mbcm_ltsw_hos_profile_configured(
    550     int unit,
    551     int profile_id);
    552 
    553 /*!
    554  * \brief Multi-control the hash output selection profile.
    555  *
    556  * \param [in] unit Unit Number.
    557  * \param [in] profile_id Profile identifier.
    558  * \param [in] type The hash output selection type.
    559  * \param [in] array_size controlling configuration array size.
    560  * \param [in] ctrl_type The hash output selection profile control type array.
    561  * \param [in] value The hash output selection profile control value array.
    562  *
    563  * \retval SHR_E_NONE No errors.
    564  * \retval !SHR_E_NONE Failure.
    565  */
    566 extern int
    567 mbcm_ltsw_hos_profile_set(
    568     int unit,
    569     int profile_id,
    570     bcmi_ltsw_hos_type_t type,
    571     int array_size,
    572     bcmi_ltsw_hos_profile_control_t *ctrl_type,
    573     int *value);
    574 
    575 /*!
    576  * \brief Get the hash output selection profile configuration.
    577  *
    578  * \param [in] unit Unit Number.
    579  * \param [in] profile_id Profile identifier.
    580  * \param [in] type The hash output selection type.
    581  * \param [in] ctrl_type The hash output selection profile control type.
    582  * \param [out] value The hash output selection profile control value.
    583  *
    584  * \retval SHR_E_NONE No errors.
    585  * \retval !SHR_E_NONE Failure.
    586  */
    587 extern int
    588 mbcm_ltsw_hos_profile_get(
    589     int unit,
    590     int profile_id,
    591     bcmi_ltsw_hos_type_t type,
    592     bcmi_ltsw_hos_profile_control_t ctrl_type,
    593     int *value);
    594 
    595 /*!
    596  * \brief Get the hash output selection instance information.
    597  *
    598  * \param [in] unit Unit Number.
    599  * \param [in] type The hash output selection type.
    600  * \param [out] inst_count Instance identifier count.
    601  * \param [out] flow_id_count Flow identifier count.
    602  *
    603  * \retval SHR_E_NONE No errors.
    604  * \retval !SHR_E_NONE Failure.
    605  */
    606 extern int
    607 mbcm_ltsw_hos_instance_info_get(
    608     int unit,
    609     bcmi_ltsw_hos_type_t type,
    610     int *inst_count,
    611     int *flow_id_count);
    612 
    613 /*!
    614  * \brief Get the maximum of hashing value offset.
    615  *
    616  * \param [in] unit Unit Number.
    617  * \param [in] type The hash output selection type.
    618  * \param [in] concat Concatenation mode.
    619  * \param [out] max_offset The maximum of hashing value offset.
    620  *
    621  * \retval SHR_E_NONE No errors.
    622  * \retval !SHR_E_NONE Failure.
    623  */
    624 extern int
    625 mbcm_ltsw_hos_instance_offset_max_get(
    626     int unit,
    627     bcmi_ltsw_hos_type_t type,
    628     int concat,
    629     int *max_offset);
    630 
    631 /*!
    632  * \brief Instance offset decode.
    633  *
    634  * \param [in] unit Unit Number.
    635  * \param [in] type The hash output selection type.
    636  * \param [in] concat Concatenation mode.
    637  * \param [in] offset Hashing value offset.
    638  * \param [out] sub_sel The sub-selection of hashing value offset.
    639  * \param [out] sub_offset The sub-offset of hashing value offset.
    640  *
    641  * \retval SHR_E_NONE No errors.
    642  * \retval !SHR_E_NONE Failure.
    643  */
    644 extern int
    645 mbcm_ltsw_hos_instance_offset_decode(
    646     int unit,
    647     bcmi_ltsw_hos_type_t type,
    648     int concat,
    649     int offset,
    650     int *sub_sel,
    651     int *sub_offset);
    652 
    653 /*!
    654  * \brief Instance offset encode.
    655  *
    656  * \param [in] unit Unit Number.
    657  * \param [in] type The hash output selection type.
    658  * \param [in] concat Concatenation mode.
    659  * \param [in] sub_sel The sub-selection of hashing value offset.
    660  * \param [in] sub_offset The sub-offset of hashing value offset.
    661  * \param [out] offset Hashing value offset.
    662  *
    663  * \retval SHR_E_NONE No errors.
    664  * \retval !SHR_E_NONE Failure.
    665  */
    666 extern int
    667 mbcm_ltsw_hos_instance_offset_encode(
    668     int unit,
    669     bcmi_ltsw_hos_type_t type,
    670     int concat,
    671     int sub_sel,
    672     int sub_offset,
    673     int *offset);
    674 
    675 /*!
    676  * \brief Set hash output selection instance subsel and offset through random seed.
    677  *
    678  * \param [in] unit Unit Number.
    679  * \param [in] type The hash output selection type.
    680  * \param [in] inst_id Instance identifier.
    681  * \param [in] concat Concatenation mode.
    682  * \param [in] seed Random seed
    683  *
    684  * \retval SHR_E_NONE No errors.
    685  * \retval !SHR_E_NONE Failure.
    686  */
    687 extern int
    688 mbcm_ltsw_hos_instance_offset_seed_set(
    689     int unit,
    690     bcmi_ltsw_hos_type_t type,
    691     int inst_id,
    692     int concat,
    693     uint32_t seed);
    694 
    695 /*!
    696  * \brief Set hash output selection instance subsel and offset through min, max and stride.
    697  *
    698  * \param [in] unit Unit Number.
    699  * \param [in] type The hash output selection type.
    700  * \param [in] inst_id Instance identifier.
    701  * \param [in] concat Concatenation mode.
    702  * \param [in] min The minimum of offset.
    703  * \param [in] max The maximum of offset.
    704  * \param [in] stride The stride of offset.
    705  *
    706  * \retval SHR_E_NONE No errors.
    707  * \retval !SHR_E_NONE Failure.
    708  */
    709 extern int
    710 mbcm_ltsw_hos_instance_offset_stride_set(
    711     int unit,
    712     bcmi_ltsw_hos_type_t type,
    713     int inst_id,
    714     int concat,
    715     int min,
    716     int max,
    717     int stride);
    718 
    719 /*!
    720  * \brief Multi-control the hash output selection instance.
    721  *
    722  * \param [in] unit Unit Number.
    723  * \param [in] type The hash output selection type.
    724  * \param [in] inst_id Instance identifier.
    725  * \param [in] flow_id Flow identifier.
    726  * \param [in] array_size Controlling configuration array size.
    727  * \param [in] ctrl_type The hash output selection instance control type array.
    728  * \param [in] value The hash output selection instance control value array.
    729  *
    730  * \retval SHR_E_NONE No errors.
    731  * \retval !SHR_E_NONE Failure.
    732  */
    733 extern int
    734 mbcm_ltsw_hos_instance_set(
    735     int unit,
    736     bcmi_ltsw_hos_type_t type,
    737     int inst_id,
    738     int flow_id,
    739     int array_size,
    740     bcmi_ltsw_hos_instance_control_t *ctrl_type,
    741     int *value);
    742 
    743 /*!
    744  * \brief Get the hash output selection instance configuration.
    745  *
    746  * \param [in] unit Unit Number.
    747  * \param [in] type The hash output selection type.
    748  * \param [in] inst_id Instance identifier.
    749  * \param [in] flow_id Flow identifier.
    750  * \param [in] array_size Controlling configuration array size.
    751  * \param [in] ctrl_type The hash output selection instance control type.
    752  * \param [out] value The hash output selection instance control value.
    753  *
    754  * \retval SHR_E_NONE No errors.
    755  * \retval !SHR_E_NONE Failure.
    756  */
    757 extern int
    758 mbcm_ltsw_hos_instance_get(
    759     int unit,
    760     bcmi_ltsw_hos_type_t type,
    761     int inst_id,
    762     int flow_id,
    763     int array_size,
    764     bcmi_ltsw_hos_instance_control_t *ctrl_type,
    765     int *value);
    766 
    767 /*!
    768  * \brief Initialize the hash output selection chip-based database.
    769  *
    770  * \param [in] unit Unit Number.
    771  * \param [in] warm The warmboot state.
    772  *
    773  * \retval SHR_E_NONE No errors.
    774  * \retval !SHR_E_NONE Failure.
    775  */
    776 extern int
    777 mbcm_ltsw_hos_db_init(
    778     int unit,
    779     int warm);
    780 
    781 /*!
    782  * \brief De-initialize the hash output selection chip-based database.
    783  *
    784  * \param [in] unit Unit Number.
    785  *
    786  * \retval SHR_E_NONE No errors.
    787  * \retval !SHR_E_NONE Failure.
    788  */
    789 extern int
    790 mbcm_ltsw_hos_db_deinit(int unit);
    791 
    792 /*!
    793  * \brief Initialize the hash output selection module.
    794  *
    795  * \param [in] unit Unit Number.
    796  *
    797  * \retval SHR_E_NONE No errors.
    798  * \retval !SHR_E_NONE Failure.
    799  */
    800 extern int
    801 mbcm_ltsw_hos_init(int unit);
    802 
    803 /*!
    804  * \brief De-init the hash output selection module.
    805  *
    806  * \param [in] unit Unit Number.
    807  *
    808  * \retval SHR_E_NONE No errors.
    809  * \retval !SHR_E_NONE Failure.
    810  */
    811 extern int
    812 mbcm_ltsw_hos_deinit(int unit);
    813 
    814 #endif /* BCMINT_LTSW_MBCM_HASH_OUTPUT_SELECTION_H */