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

flexdigest.h (40664B)


      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_FLEXDIGEST_H
     12 #define BCMINT_LTSW_MBCM_FLEXDIGEST_H
     13 
     14 #include <bcm/flexdigest.h>
     15 
     16 #include <bcm_int/ltsw/flexdigest_int.h>
     17 
     18 #include <sal/sal_types.h>
     19 
     20 /*!
     21  * \brief Initialize the flexdigest chip-based database.
     22  *
     23  * \param [in] unit Unit Number.
     24  * \param [in] warm The warmboot state.
     25  *
     26  * \retval SHR_E_NONE No errors.
     27  * \retval !SHR_E_NONE Failure.
     28  */
     29 typedef int (*flexdigest_db_init_f)(
     30     int unit,
     31     int warm);
     32 
     33 /*!
     34  * \brief De-initialize the flexdigest chip-based database.
     35  *
     36  * \param [in] unit Unit Number.
     37  *
     38  * \retval SHR_E_NONE No errors.
     39  * \retval !SHR_E_NONE Failure.
     40  */
     41 typedef int (*flexdigest_db_deinit_f)(int unit);
     42 
     43 /*!
     44  * \brief Initialize the flexdigest module.
     45  *
     46  * \param [in] unit Unit Number.
     47  * \param [in] warm The warmboot state.
     48  *
     49  * \retval SHR_E_NONE No errors.
     50  * \retval !SHR_E_NONE Failure.
     51  */
     52 typedef int (*flexdigest_init_f)(
     53     int unit,
     54     int warm);
     55 
     56 /*!
     57  * \brief De-initialize the flexdigest module.
     58  *
     59  * \param [in] unit Unit Number.
     60  *
     61  * \retval SHR_E_NONE No errors.
     62  * \retval !SHR_E_NONE Failure.
     63  */
     64 typedef int (*flexdigest_deinit_f)(int unit);
     65 
     66 /*!
     67  * \brief Get chip-specific sub-features for flexdigest functionalities.
     68  *
     69  * \param [in] unit Unit Number.
     70  * \param [in] functionality The flex digest functionality.
     71  * \param [out] features The flex digest functionality features.
     72  *
     73  * \retval SHR_E_NONE No errors.
     74  * \retval !SHR_E_NONE Failure.
     75  */
     76 typedef int (*flexdigest_feature_get_f)(
     77     int unit,
     78     uint32_t functionality,
     79     uint32_t *features);
     80 
     81 /*!
     82  * \brief Get information of flex digest functionalities.
     83  *
     84  * \param [in] unit Unit Number.
     85  * \param [in] info The flex digest normalization information.
     86  * \param [out] value The flex digest normalization information value.
     87  *
     88  * \retval SHR_E_NONE No errors.
     89  * \retval !SHR_E_NONE Failure.
     90  */
     91 typedef int (*flexdigest_info_get_f)(
     92     int unit,
     93     bcmint_flexdigest_info_t info,
     94     int *value);
     95 
     96 /*!
     97  * \brief validate the match criteria support or not.
     98  *
     99  * \param [in] unit Unit Number.
    100  * \param [in] match The match criteria.
    101  *
    102  * \retval SHR_E_NONE No errors.
    103  * \retval !SHR_E_NONE Failure.
    104  */
    105 typedef int (*flexdigest_validate_lkup_match_f)(
    106     int unit,
    107     bcm_flexdigest_match_t match);
    108 
    109 /*!
    110  * \brief validate the match conflicting issue.
    111  *
    112  * \param [in] unit Unit Number.
    113  * \param [in] new_match The new match.
    114  * \param [in] old_match The old match.
    115  *
    116  * \retval SHR_E_NONE No errors.
    117  * \retval !SHR_E_NONE Failure.
    118  */
    119 typedef int (*flexdigest_validate_lkup_match_conflict_f)(
    120     int unit,
    121     bcm_flexdigest_match_t new_match,
    122     bcm_flexdigest_match_t old_match);
    123 
    124 /*!
    125  * \brief validate the action configuration.
    126  *
    127  * \param [in] unit Unit Number.
    128  * \param [in] action The entry action.
    129  *
    130  * \retval SHR_E_NONE No errors.
    131  * \retval !SHR_E_NONE Failure.
    132  */
    133 typedef int (*flexdigest_validate_lkup_action_f)(
    134     int unit,
    135     bcm_flexdigest_action_t action);
    136 
    137 /*!
    138  * \brief validate the action configuration.
    139  *
    140  * \param [in] unit Unit Number.
    141  * \param [in] action The entry action.
    142  * \param [in] param0 The entry action parameter 0.
    143  * \param [in] param1 The entry action parameter 1.
    144  *
    145  * \retval SHR_E_NONE No errors.
    146  * \retval !SHR_E_NONE Failure.
    147  */
    148 typedef int (*flexdigest_validate_lkup_action_params_f)(
    149     int unit,
    150     bcm_flexdigest_action_t action,
    151     uint16_t param0,
    152     uint16_t param1);
    153 
    154 /*!
    155  * \brief validate the qualifier configuration.
    156  *
    157  * \param [in] unit Unit Number.
    158  * \param [in] qualifier The entry qualifier.
    159  * \param [in] data The entry qualifier data.
    160  * \param [in] mask The entry qualifier mask.
    161  *
    162  * \retval SHR_E_NONE No errors.
    163  * \retval !SHR_E_NONE Failure.
    164  */
    165 typedef int (*flexdigest_validate_lkup_qualifier_f)(
    166     int unit,
    167     bcm_flexdigest_qualify_t qualifier,
    168     uint16_t data,
    169     uint16_t mask);
    170 
    171 /*!
    172  * \brief validate the qualifier set configuration.
    173  *
    174  * \param [in] unit Unit Number.
    175  * \param [in] qset The presel qualifier set.
    176  *
    177  * \retval SHR_E_NONE No errors.
    178  * \retval !SHR_E_NONE Failure.
    179  */
    180 typedef int (*flexdigest_validate_lkup_group_qset_f)(
    181     int unit,
    182     bcm_flexdigest_qset_t qset);
    183 
    184 /*!
    185  * \brief Validate the flexdigest hashing profile controlling parameters.
    186  *
    187  * \param [in] unit Unit Number.
    188  * \param [in] hash_profile_id Hashing profile identifier.
    189  * \param [in] type The hashing profile control type.
    190  * \param [in] value The hashing profile control value.
    191  *
    192  * \retval SHR_E_NONE No errors.
    193  * \retval !SHR_E_NONE Failure.
    194  */
    195 typedef int (*flexdigest_validate_hash_profile_f)(
    196     int unit,
    197     int hash_profile_id,
    198     bcm_flexdigest_hash_profile_control_t type,
    199     int value);
    200 
    201 /*!
    202  * \brief Insert a flex digest normalization seed profile to logical table.
    203  *
    204  * \param [in] unit Unit Number.
    205  * \param [in] seed_profile_id Normalization seed profile identifier.
    206  *
    207  * \retval SHR_E_NONE No errors.
    208  * \retval !SHR_E_NONE Failure.
    209  */
    210 typedef int (*flexdigest_norm_seed_profile_create_f)(
    211     int unit,
    212     int seed_profile_id);
    213 
    214 /*!
    215  * \brief Delete a flex digest normalization seed profile from logical table.
    216  *
    217  * \param [in] unit Unit Number.
    218  * \param [in] seed_profile_id Normalization Seed profile identifier.
    219  *
    220  * \retval SHR_E_NONE No errors.
    221  * \retval !SHR_E_NONE Failure.
    222  */
    223 typedef int (*flexdigest_norm_seed_profile_destroy_f)(
    224     int unit,
    225     int seed_profile_id);
    226 
    227 /*!
    228  * \brief Configure the flex digest normalization seed profile.
    229  *
    230  * \param [in] unit Unit Number.
    231  * \param [in] seed_profile_id Normalization Seed profile identifier.
    232  * \param [in] type The normalization seed profile control type.
    233  * \param [in] value The normalization seed profile control value.
    234  *
    235  * \retval SHR_E_NONE No errors.
    236  * \retval !SHR_E_NONE Failure.
    237  */
    238 typedef int (*flexdigest_norm_seed_profile_set_f)(
    239     int unit,
    240     int seed_profile_id,
    241     bcm_flexdigest_norm_seed_control_t type,
    242     int value);
    243 
    244 /*!
    245  * \brief Get the flex digest normalization seed profile configuration.
    246  *
    247  * \param [in] unit Unit Number.
    248  * \param [in] seed_profile_id Normalization Seed profile identifier.
    249  * \param [in] type The normalization seed profile control type.
    250  * \param [out] value The normalization seed profile control value.
    251  *
    252  * \retval SHR_E_NONE No errors.
    253  * \retval !SHR_E_NONE Failure.
    254  */
    255 typedef int (*flexdigest_norm_seed_profile_get_f)(
    256     int unit,
    257     int seed_profile_id,
    258     bcm_flexdigest_norm_seed_control_t type,
    259     int *value);
    260 
    261 /*!
    262  * \brief Check whether this flex digest normalization seed profile is configured or not.
    263  *
    264  * \param [in] unit Unit Number.
    265  * \param [in] seed_profile_id Normalization Seed profile identifier.
    266  *
    267  * \retval SHR_E_NONE No errors.
    268  * \retval !SHR_E_NONE Failure.
    269  */
    270 typedef int (*flexdigest_norm_seed_profile_configured_f)(
    271     int unit,
    272     int seed_profile_id);
    273 
    274 /*!
    275  * \brief Insert a flex digest normalization profile to logical table.
    276  *
    277  * \param [in] unit Unit Number.
    278  * \param [in] norm_profile_id Normalization profile identifier.
    279  *
    280  * \retval SHR_E_NONE No errors.
    281  * \retval !SHR_E_NONE Failure.
    282  */
    283 typedef int (*flexdigest_norm_profile_create_f)(
    284     int unit,
    285     int norm_profile_id);
    286 
    287 /*!
    288  * \brief Delete a flex digest normalization profile from logical table.
    289  *
    290  * \param [in] unit Unit Number.
    291  * \param [in] norm_profile_id Normalization profile identifier.
    292  *
    293  * \retval SHR_E_NONE No errors.
    294  * \retval !SHR_E_NONE Failure.
    295  */
    296 typedef int (*flexdigest_norm_profile_destroy_f)(
    297     int unit,
    298     int norm_profile_id);
    299 
    300 /*!
    301  * \brief Configure the flex digest normalization profile.
    302  *
    303  * \param [in] unit Unit Number.
    304  * \param [in] norm_profile_id Normalization profile identifier.
    305  * \param [in] type The normalization profile control type.
    306  * \param [in] value The normalization profile control value.
    307  *
    308  * \retval SHR_E_NONE No errors.
    309  * \retval !SHR_E_NONE Failure.
    310  */
    311 typedef int (*flexdigest_norm_profile_set_f)(
    312     int unit,
    313     int norm_profile_id,
    314     bcm_flexdigest_norm_profile_control_t type,
    315     int value);
    316 
    317 /*!
    318  * \brief Get the flex digest normalization profile configuration.
    319  *
    320  * \param [in] unit Unit Number.
    321  * \param [in] norm_profile_id Normalization profile identifier.
    322  * \param [in] type The normalization profile control type.
    323  * \param [out] value The normalization profile control value.
    324  *
    325  * \retval SHR_E_NONE No errors.
    326  * \retval !SHR_E_NONE Failure.
    327  */
    328 typedef int (*flexdigest_norm_profile_get_f)(
    329     int unit,
    330     int norm_profile_id,
    331     bcm_flexdigest_norm_profile_control_t type,
    332     int *value);
    333 
    334 /*!
    335  * \brief Check whether the flex digest normalization profile is configured or not.
    336  *
    337  * \param [in] unit Unit Number.
    338  * \param [in] norm_profile_id Normalization profile identifier.
    339  *
    340  * \retval SHR_E_NONE No errors.
    341  * \retval !SHR_E_NONE Failure.
    342  */
    343 typedef int (*flexdigest_norm_profile_configured_f)(
    344     int unit,
    345     int norm_profile_id);
    346 
    347 /*!
    348  * \brief Allocate a entry handle.
    349  *
    350  * \param [in] unit Unit Number.
    351  * \param [inout] einfo The entry information.
    352  *
    353  * \retval SHR_E_NONE No errors.
    354  * \retval !SHR_E_NONE Failure.
    355  */
    356 typedef int (*flexdigest_lkup_entry_allocate_f)(
    357     int unit,
    358     bcmint_flexdigest_entry_info_t *einfo);
    359 
    360 /*!
    361  * \brief Free a entry handle.
    362  *
    363  * \param [in] unit Unit Number.
    364  * \param [inout] einfo The entry information.
    365  *
    366  * \retval SHR_E_NONE No errors.
    367  * \retval !SHR_E_NONE Failure.
    368  */
    369 typedef int (*flexdigest_lkup_entry_free_f)(
    370     int unit,
    371     bcmint_flexdigest_entry_info_t *einfo);
    372 
    373 /*!
    374  * \brief Set the entry priority.
    375  *
    376  * \param [in] unit Unit Number.
    377  * \param [inout] einfo The entry information.
    378  * \param [in] prio The entry priority.
    379  *
    380  * \retval SHR_E_NONE No errors.
    381  * \retval !SHR_E_NONE Failure.
    382  */
    383 typedef int (*flexdigest_lkup_entry_pri_set_f)(
    384     int unit,
    385     bcmint_flexdigest_entry_info_t *einfo,
    386     int prio);
    387 
    388 /*!
    389  * \brief Add a match to an entry.
    390  *
    391  * \param [in] unit Unit Number.
    392  * \param [inout] einfo The entry information.
    393  * \param [in] match The entry match criteria.
    394  *
    395  * \retval SHR_E_NONE No errors.
    396  * \retval !SHR_E_NONE Failure.
    397  */
    398 typedef int (*flexdigest_lkup_entry_match_add_f)(
    399     int unit,
    400     bcmint_flexdigest_entry_info_t *einfo,
    401     bcm_flexdigest_match_t match);
    402 
    403 /*!
    404  * \brief Add a qualifier to an entry.
    405  *
    406  * \param [in] unit Unit Number.
    407  * \param [inout] einfo The entry information.
    408  * \param [in] qualifier The entry qualifier.
    409  * \param [in] data The entry qualifier data.
    410  * \param [in] mask The entry qualifier mask.
    411  *
    412  * \retval SHR_E_NONE No errors.
    413  * \retval !SHR_E_NONE Failure.
    414  */
    415 typedef int (*flexdigest_lkup_entry_qualifier_add_f)(
    416     int unit,
    417     bcmint_flexdigest_entry_info_t *einfo,
    418     bcm_flexdigest_qualify_t qualifier,
    419     uint16_t data,
    420     uint16_t mask);
    421 
    422 /*!
    423  * \brief Add an action to an entry.
    424  *
    425  * \param [in] unit Unit Number.
    426  * \param [inout] einfo The entry information.
    427  * \param [in] action The entry match criteria.
    428  * \param [in] param0 The entry action param0.
    429  * \param [in] param1 The entry action param1.
    430  *
    431  * \retval SHR_E_NONE No errors.
    432  * \retval !SHR_E_NONE Failure.
    433  */
    434 typedef int (*flexdigest_lkup_entry_action_add_f)(
    435     int unit,
    436     bcmint_flexdigest_entry_info_t *einfo,
    437     bcm_flexdigest_action_t action,
    438     uint16_t param0,
    439     uint16_t param1);
    440 
    441 /*!
    442  * \brief Restore lookup mask profile from entry actions.
    443  *
    444  * \param [in] unit Unit Number.
    445  * \param [inout] einfo The entry information.
    446  *
    447  * \retval SHR_E_NONE No errors.
    448  * \retval !SHR_E_NONE Failure.
    449  */
    450 typedef int (*flexdigest_lkup_entry_mask_profile_restore_f)(
    451     int unit,
    452     bcmint_flexdigest_entry_info_t *einfo);
    453 
    454 /*!
    455  * \brief Insert an entry.
    456  *
    457  * \param [in] unit Unit Number.
    458  * \param [inout] einfo The entry information.
    459  *
    460  * \retval SHR_E_NONE No errors.
    461  * \retval !SHR_E_NONE Failure.
    462  */
    463 typedef int (*flexdigest_lkup_entry_insert_f)(
    464     int unit,
    465     bcmint_flexdigest_entry_info_t *einfo);
    466 
    467 /*!
    468  * \brief Update an entry.
    469  *
    470  * \param [in] unit Unit Number.
    471  * \param [inout] einfo The entry information.
    472  *
    473  * \retval SHR_E_NONE No errors.
    474  * \retval !SHR_E_NONE Failure.
    475  */
    476 typedef int (*flexdigest_lkup_entry_update_f)(
    477     int unit,
    478     bcmint_flexdigest_entry_info_t *einfo);
    479 
    480 /*!
    481  * \brief Lookup an entry.
    482  *
    483  * \param [in] unit Unit Number.
    484  * \param [inout] einfo The entry information.
    485  *
    486  * \retval SHR_E_NONE No errors.
    487  * \retval !SHR_E_NONE Failure.
    488  */
    489 typedef int (*flexdigest_lkup_entry_lookup_f)(
    490     int unit,
    491     bcmint_flexdigest_entry_info_t *einfo);
    492 
    493 /*!
    494  * \brief Insert an entry.
    495  *
    496  * \param [in] unit Unit Number.
    497  * \param [inout] einfo The entry information.
    498  *
    499  * \retval SHR_E_NONE No errors.
    500  * \retval !SHR_E_NONE Failure.
    501  */
    502 typedef int (*flexdigest_lkup_entry_delete_f)(
    503     int unit,
    504     bcmint_flexdigest_entry_info_t *einfo);
    505 
    506 /*!
    507  * \brief Unset an entry.
    508  *
    509  * \param [in] unit Unit Number.
    510  * \param [inout] einfo The entry information.
    511  *
    512  * \retval SHR_E_NONE No errors.
    513  * \retval !SHR_E_NONE Failure.
    514  */
    515 typedef int (*flexdigest_lkup_entry_unset_f)(
    516     int unit,
    517     bcmint_flexdigest_entry_info_t *einfo);
    518 
    519 /*!
    520  * \brief Update the lookup presel logical table.
    521  *
    522  * \param [in] unit Unit Number.
    523  * \param [in] qset The Presel Qualifier Set.
    524  *
    525  * \retval SHR_E_NONE No errors.
    526  * \retval !SHR_E_NONE Failure.
    527  */
    528 typedef int (*flexdigest_lkup_group_update_presel_f)(
    529     int unit,
    530     bcm_flexdigest_qset_t qset);
    531 
    532 /*!
    533  * \brief Insert a flex digest hashing profile to logical table.
    534  *
    535  * \param [in] unit Unit Number.
    536  * \param [in] hash_profile_id Hashing profile identifier.
    537  *
    538  * \retval SHR_E_NONE No errors.
    539  * \retval !SHR_E_NONE Failure.
    540  */
    541 typedef int (*flexdigest_hash_profile_create_f)(
    542     int unit,
    543     int hash_profile_id);
    544 
    545 /*!
    546  * \brief Delete a flex digest hashing profile from logical table.
    547  *
    548  * \param [in] unit Unit Number.
    549  * \param [in] hash_profile_id Hashing profile identifier.
    550  *
    551  * \retval SHR_E_NONE No errors.
    552  * \retval !SHR_E_NONE Failure.
    553  */
    554 typedef int (*flexdigest_hash_profile_destroy_f)(
    555     int unit,
    556     int hash_profile_id);
    557 
    558 /*!
    559  * \brief Configure the flex digest hashing profile.
    560  *
    561  * \param [in] unit Unit Number.
    562  * \param [in] hash_profile_id Hashing profile identifier.
    563  * \param [in] type The hashing profile control type.
    564  * \param [in] value The hashing profile control value.
    565  *
    566  * \retval SHR_E_NONE No errors.
    567  * \retval !SHR_E_NONE Failure.
    568  */
    569 typedef int (*flexdigest_hash_profile_set_f)(
    570     int unit,
    571     int hash_profile_id,
    572     bcm_flexdigest_hash_profile_control_t type,
    573     int value);
    574 
    575 /*!
    576  * \brief Get the flex digest hashing profile configuration.
    577  *
    578  * \param [in] unit Unit Number.
    579  * \param [in] hash_profile_id Hashing profile identifier.
    580  * \param [in] type The hashing profile control type.
    581  * \param [out] value The hashing profile control value.
    582  *
    583  * \retval SHR_E_NONE No errors.
    584  * \retval !SHR_E_NONE Failure.
    585  */
    586 typedef int (*flexdigest_hash_profile_get_f)(
    587     int unit,
    588     int hash_profile_id,
    589     bcm_flexdigest_hash_profile_control_t type,
    590     int *value);
    591 
    592 /*!
    593  * \brief Check whether the flex digest hashing profile is configured or not.
    594  *
    595  * \param [in] unit Unit Number.
    596  * \param [in] hash_profile_id Hashing profile identifier.
    597  *
    598  * \retval SHR_E_NONE No errors.
    599  * \retval !SHR_E_NONE Failure.
    600  */
    601 typedef int (*flexdigest_hash_profile_configured_f)(
    602     int unit,
    603     int hash_profile_id);
    604 
    605 /*!
    606  * \brief Configure salt for a specific hashing bin set.
    607  *
    608  * \param [in] unit Unit Number.
    609  * \param [in] bin_set Hashing bin set.
    610  * \param [in] array_size The number of Hashing bins in a bin set.
    611  * \param [in] salt_array The Hashing salt array.
    612  *
    613  * \retval SHR_E_NONE No errors.
    614  * \retval !SHR_E_NONE Failure.
    615  */
    616 typedef int (*flexdigest_hash_salt_set_f)(
    617     int unit,
    618     bcm_flexdigest_hash_bin_set_t bin_set,
    619     int array_size,
    620     uint16_t *salt_array);
    621 
    622 /*!
    623  * \brief Configure salt for a specific hashing bin set.
    624  *
    625  * \param [in] unit Unit Number.
    626  * \param [in] bin_set Hashing bin set.
    627  * \param [in] array_size The maximum number of Hashing bins array.
    628  * \param [out] salt_array The Hashing salt array.
    629  * \param [out] count The number of Hashing bins in a bin set.
    630  *
    631  * \retval SHR_E_NONE No errors.
    632  * \retval !SHR_E_NONE Failure.
    633  */
    634 typedef int (*flexdigest_hash_salt_get_f)(
    635     int unit,
    636     bcm_flexdigest_hash_bin_set_t bin_set,
    637     int array_size,
    638     uint16_t *salt_array,
    639     int *count);
    640 
    641 /*!
    642  * \brief Set a device-wide flex digest control value.
    643  *
    644  * \param [in] unit Unit Number.
    645  * \param [in] type The flex digest control type.
    646  * \param [in] arg Argument whose meaning depends on type.
    647  *
    648  * \retval SHR_E_NONE No errors.
    649  * \retval !SHR_E_NONE Failure.
    650  */
    651 typedef int (*flexdigest_control_set_f)(
    652     int unit,
    653     bcm_flexdigest_control_t type,
    654     int arg);
    655 
    656 /*!
    657  * \brief Get a device-wide flex digest control value.
    658  *
    659  * \param [in] unit Unit Number.
    660  * \param [in] type The flex digest control type.
    661  * \param [out] arg Argument whose meaning depends on type.
    662  *
    663  * \retval SHR_E_NONE No errors.
    664  * \retval !SHR_E_NONE Failure.
    665  */
    666 typedef int (*flexdigest_control_get_f)(
    667     int unit,
    668     bcm_flexdigest_control_t type,
    669     int *arg);
    670 
    671 /*!
    672  * \brief Flexdigest driver structure.
    673  */
    674 typedef struct mbcm_ltsw_flexdigest_drv_s {
    675 
    676     /*! Initialize the flexdigest chip-based database. */
    677     flexdigest_db_init_f flexdigest_db_init;
    678 
    679     /*! De-initialize the flexdigest chip-based database. */
    680     flexdigest_db_deinit_f flexdigest_db_deinit;
    681 
    682     /*! Initialize the flexdigest module. */
    683     flexdigest_init_f flexdigest_init;
    684 
    685     /*! De-initialize the flexdigest module. */
    686     flexdigest_deinit_f flexdigest_deinit;
    687 
    688     /*! Get chip-specific sub-features for flexdigest functionalities. */
    689     flexdigest_feature_get_f flexdigest_feature_get;
    690 
    691     /*! Get information of flex digest functionalities. */
    692     flexdigest_info_get_f flexdigest_info_get;
    693 
    694     /*! validate the match criteria support or not. */
    695     flexdigest_validate_lkup_match_f flexdigest_validate_lkup_match;
    696 
    697     /*! validate the match conflicting issue. */
    698     flexdigest_validate_lkup_match_conflict_f flexdigest_validate_lkup_match_conflict;
    699 
    700     /*! validate the action configuration. */
    701     flexdigest_validate_lkup_action_f flexdigest_validate_lkup_action;
    702 
    703     /*! validate the action configuration. */
    704     flexdigest_validate_lkup_action_params_f flexdigest_validate_lkup_action_params;
    705 
    706     /*! validate the qualifier configuration. */
    707     flexdigest_validate_lkup_qualifier_f flexdigest_validate_lkup_qualifier;
    708 
    709     /*! validate the qualifier set configuration. */
    710     flexdigest_validate_lkup_group_qset_f flexdigest_validate_lkup_group_qset;
    711 
    712     /*! Validate the flexdigest hashing profile controlling parameters. */
    713     flexdigest_validate_hash_profile_f flexdigest_validate_hash_profile;
    714 
    715     /*! Insert a flex digest normalization seed profile to logical table. */
    716     flexdigest_norm_seed_profile_create_f flexdigest_norm_seed_profile_create;
    717 
    718     /*! Delete a flex digest normalization seed profile from logical table. */
    719     flexdigest_norm_seed_profile_destroy_f flexdigest_norm_seed_profile_destroy;
    720 
    721     /*! Configure the flex digest normalization seed profile. */
    722     flexdigest_norm_seed_profile_set_f flexdigest_norm_seed_profile_set;
    723 
    724     /*! Get the flex digest normalization seed profile configuration. */
    725     flexdigest_norm_seed_profile_get_f flexdigest_norm_seed_profile_get;
    726 
    727     /*! Check whether this flex digest normalization seed profile is configured or not. */
    728     flexdigest_norm_seed_profile_configured_f flexdigest_norm_seed_profile_configured;
    729 
    730     /*! Insert a flex digest normalization profile to logical table. */
    731     flexdigest_norm_profile_create_f flexdigest_norm_profile_create;
    732 
    733     /*! Delete a flex digest normalization profile from logical table. */
    734     flexdigest_norm_profile_destroy_f flexdigest_norm_profile_destroy;
    735 
    736     /*! Configure the flex digest normalization profile. */
    737     flexdigest_norm_profile_set_f flexdigest_norm_profile_set;
    738 
    739     /*! Get the flex digest normalization profile configuration. */
    740     flexdigest_norm_profile_get_f flexdigest_norm_profile_get;
    741 
    742     /*! Check whether the flex digest normalization profile is configured or not. */
    743     flexdigest_norm_profile_configured_f flexdigest_norm_profile_configured;
    744 
    745     /*! Allocate a entry handle. */
    746     flexdigest_lkup_entry_allocate_f flexdigest_lkup_entry_allocate;
    747 
    748     /*! Free a entry handle. */
    749     flexdigest_lkup_entry_free_f flexdigest_lkup_entry_free;
    750 
    751     /*! Set the entry priority. */
    752     flexdigest_lkup_entry_pri_set_f flexdigest_lkup_entry_pri_set;
    753 
    754     /*! Add a match to an entry. */
    755     flexdigest_lkup_entry_match_add_f flexdigest_lkup_entry_match_add;
    756 
    757     /*! Add a qualifier to an entry. */
    758     flexdigest_lkup_entry_qualifier_add_f flexdigest_lkup_entry_qualifier_add;
    759 
    760     /*! Add an action to an entry. */
    761     flexdigest_lkup_entry_action_add_f flexdigest_lkup_entry_action_add;
    762 
    763     /*! Restore lookup mask profile from entry actions. */
    764     flexdigest_lkup_entry_mask_profile_restore_f flexdigest_lkup_entry_mask_profile_restore;
    765 
    766     /*! Insert an entry. */
    767     flexdigest_lkup_entry_insert_f flexdigest_lkup_entry_insert;
    768 
    769     /*! Update an entry. */
    770     flexdigest_lkup_entry_update_f flexdigest_lkup_entry_update;
    771 
    772     /*! Lookup an entry. */
    773     flexdigest_lkup_entry_lookup_f flexdigest_lkup_entry_lookup;
    774 
    775     /*! Insert an entry. */
    776     flexdigest_lkup_entry_delete_f flexdigest_lkup_entry_delete;
    777 
    778     /*! Unset an entry. */
    779     flexdigest_lkup_entry_unset_f flexdigest_lkup_entry_unset;
    780 
    781     /*! Update the lookup presel logical table. */
    782     flexdigest_lkup_group_update_presel_f flexdigest_lkup_group_update_presel;
    783 
    784     /*! Insert a flex digest hashing profile to logical table. */
    785     flexdigest_hash_profile_create_f flexdigest_hash_profile_create;
    786 
    787     /*! Delete a flex digest hashing profile from logical table. */
    788     flexdigest_hash_profile_destroy_f flexdigest_hash_profile_destroy;
    789 
    790     /*! Configure the flex digest hashing profile. */
    791     flexdigest_hash_profile_set_f flexdigest_hash_profile_set;
    792 
    793     /*! Get the flex digest hashing profile configuration. */
    794     flexdigest_hash_profile_get_f flexdigest_hash_profile_get;
    795 
    796     /*! Check whether the flex digest hashing profile is configured or not. */
    797     flexdigest_hash_profile_configured_f flexdigest_hash_profile_configured;
    798 
    799     /*! Configure salt for a specific hashing bin set. */
    800     flexdigest_hash_salt_set_f flexdigest_hash_salt_set;
    801 
    802     /*! Configure salt for a specific hashing bin set. */
    803     flexdigest_hash_salt_get_f flexdigest_hash_salt_get;
    804 
    805     /*! Set a device-wide flex digest control value. */
    806     flexdigest_control_set_f flexdigest_control_set;
    807 
    808     /*! Get a device-wide flex digest control value. */
    809     flexdigest_control_get_f flexdigest_control_get;
    810 
    811 } mbcm_ltsw_flexdigest_drv_t;
    812 
    813 /*!
    814  * \brief Set the FLEXDIGEST driver of the device.
    815  *
    816  * \param [in] unit Unit Number.
    817  * \param [in] drv Flexdigest driver to set.
    818  *
    819  * \retval SHR_E_NONE No errors.
    820  * \retval !SHR_E_NONE Failure.
    821  */
    822 extern int
    823 mbcm_ltsw_flexdigest_drv_set(
    824     int unit,
    825     mbcm_ltsw_flexdigest_drv_t *drv);
    826 
    827 /*!
    828  * \brief Initialize the flexdigest chip-based database.
    829  *
    830  * \param [in] unit Unit Number.
    831  * \param [in] warm The warmboot state.
    832  *
    833  * \retval SHR_E_NONE No errors.
    834  * \retval !SHR_E_NONE Failure.
    835  */
    836 extern int
    837 mbcm_ltsw_flexdigest_db_init(
    838     int unit,
    839     int warm);
    840 
    841 /*!
    842  * \brief De-initialize the flexdigest chip-based database.
    843  *
    844  * \param [in] unit Unit Number.
    845  *
    846  * \retval SHR_E_NONE No errors.
    847  * \retval !SHR_E_NONE Failure.
    848  */
    849 extern int
    850 mbcm_ltsw_flexdigest_db_deinit(int unit);
    851 
    852 /*!
    853  * \brief Initialize the flexdigest module.
    854  *
    855  * \param [in] unit Unit Number.
    856  * \param [in] warm The warmboot state.
    857  *
    858  * \retval SHR_E_NONE No errors.
    859  * \retval !SHR_E_NONE Failure.
    860  */
    861 extern int
    862 mbcm_ltsw_flexdigest_init(
    863     int unit,
    864     int warm);
    865 
    866 /*!
    867  * \brief De-initialize the flexdigest module.
    868  *
    869  * \param [in] unit Unit Number.
    870  *
    871  * \retval SHR_E_NONE No errors.
    872  * \retval !SHR_E_NONE Failure.
    873  */
    874 extern int
    875 mbcm_ltsw_flexdigest_deinit(int unit);
    876 
    877 /*!
    878  * \brief Get chip-specific sub-features for flexdigest functionalities.
    879  *
    880  * \param [in] unit Unit Number.
    881  * \param [in] functionality The flex digest functionality.
    882  * \param [out] features The flex digest functionality features.
    883  *
    884  * \retval SHR_E_NONE No errors.
    885  * \retval !SHR_E_NONE Failure.
    886  */
    887 extern int
    888 mbcm_ltsw_flexdigest_feature_get(
    889     int unit,
    890     uint32_t functionality,
    891     uint32_t *features);
    892 
    893 /*!
    894  * \brief Get information of flex digest functionalities.
    895  *
    896  * \param [in] unit Unit Number.
    897  * \param [in] info The flex digest normalization information.
    898  * \param [out] value The flex digest normalization information value.
    899  *
    900  * \retval SHR_E_NONE No errors.
    901  * \retval !SHR_E_NONE Failure.
    902  */
    903 extern int
    904 mbcm_ltsw_flexdigest_info_get(
    905     int unit,
    906     bcmint_flexdigest_info_t info,
    907     int *value);
    908 
    909 /*!
    910  * \brief validate the match criteria support or not.
    911  *
    912  * \param [in] unit Unit Number.
    913  * \param [in] match The match criteria.
    914  *
    915  * \retval SHR_E_NONE No errors.
    916  * \retval !SHR_E_NONE Failure.
    917  */
    918 extern int
    919 mbcm_ltsw_flexdigest_validate_lkup_match(
    920     int unit,
    921     bcm_flexdigest_match_t match);
    922 
    923 /*!
    924  * \brief validate the match conflicting issue.
    925  *
    926  * \param [in] unit Unit Number.
    927  * \param [in] new_match The new match.
    928  * \param [in] old_match The old match.
    929  *
    930  * \retval SHR_E_NONE No errors.
    931  * \retval !SHR_E_NONE Failure.
    932  */
    933 extern int
    934 mbcm_ltsw_flexdigest_validate_lkup_match_conflict(
    935     int unit,
    936     bcm_flexdigest_match_t new_match,
    937     bcm_flexdigest_match_t old_match);
    938 
    939 /*!
    940  * \brief validate the action configuration.
    941  *
    942  * \param [in] unit Unit Number.
    943  * \param [in] action The entry action.
    944  *
    945  * \retval SHR_E_NONE No errors.
    946  * \retval !SHR_E_NONE Failure.
    947  */
    948 extern int
    949 mbcm_ltsw_flexdigest_validate_lkup_action(
    950     int unit,
    951     bcm_flexdigest_action_t action);
    952 
    953 /*!
    954  * \brief validate the action configuration.
    955  *
    956  * \param [in] unit Unit Number.
    957  * \param [in] action The entry action.
    958  * \param [in] param0 The entry action parameter 0.
    959  * \param [in] param1 The entry action parameter 1.
    960  *
    961  * \retval SHR_E_NONE No errors.
    962  * \retval !SHR_E_NONE Failure.
    963  */
    964 extern int
    965 mbcm_ltsw_flexdigest_validate_lkup_action_params(
    966     int unit,
    967     bcm_flexdigest_action_t action,
    968     uint16_t param0,
    969     uint16_t param1);
    970 
    971 /*!
    972  * \brief validate the qualifier configuration.
    973  *
    974  * \param [in] unit Unit Number.
    975  * \param [in] qualifier The entry qualifier.
    976  * \param [in] data The entry qualifier data.
    977  * \param [in] mask The entry qualifier mask.
    978  *
    979  * \retval SHR_E_NONE No errors.
    980  * \retval !SHR_E_NONE Failure.
    981  */
    982 extern int
    983 mbcm_ltsw_flexdigest_validate_lkup_qualifier(
    984     int unit,
    985     bcm_flexdigest_qualify_t qualifier,
    986     uint16_t data,
    987     uint16_t mask);
    988 
    989 /*!
    990  * \brief validate the qualifier set configuration.
    991  *
    992  * \param [in] unit Unit Number.
    993  * \param [in] qset The presel qualifier set.
    994  *
    995  * \retval SHR_E_NONE No errors.
    996  * \retval !SHR_E_NONE Failure.
    997  */
    998 extern int
    999 mbcm_ltsw_flexdigest_validate_lkup_group_qset(
   1000     int unit,
   1001     bcm_flexdigest_qset_t qset);
   1002 
   1003 /*!
   1004  * \brief Validate the flexdigest hashing profile controlling parameters.
   1005  *
   1006  * \param [in] unit Unit Number.
   1007  * \param [in] hash_profile_id Hashing profile identifier.
   1008  * \param [in] type The hashing profile control type.
   1009  * \param [in] value The hashing profile control value.
   1010  *
   1011  * \retval SHR_E_NONE No errors.
   1012  * \retval !SHR_E_NONE Failure.
   1013  */
   1014 extern int
   1015 mbcm_ltsw_flexdigest_validate_hash_profile(
   1016     int unit,
   1017     int hash_profile_id,
   1018     bcm_flexdigest_hash_profile_control_t type,
   1019     int value);
   1020 
   1021 /*!
   1022  * \brief Insert a flex digest normalization seed profile to logical table.
   1023  *
   1024  * \param [in] unit Unit Number.
   1025  * \param [in] seed_profile_id Normalization seed profile identifier.
   1026  *
   1027  * \retval SHR_E_NONE No errors.
   1028  * \retval !SHR_E_NONE Failure.
   1029  */
   1030 extern int
   1031 mbcm_ltsw_flexdigest_norm_seed_profile_create(
   1032     int unit,
   1033     int seed_profile_id);
   1034 
   1035 /*!
   1036  * \brief Delete a flex digest normalization seed profile from logical table.
   1037  *
   1038  * \param [in] unit Unit Number.
   1039  * \param [in] seed_profile_id Normalization Seed profile identifier.
   1040  *
   1041  * \retval SHR_E_NONE No errors.
   1042  * \retval !SHR_E_NONE Failure.
   1043  */
   1044 extern int
   1045 mbcm_ltsw_flexdigest_norm_seed_profile_destroy(
   1046     int unit,
   1047     int seed_profile_id);
   1048 
   1049 /*!
   1050  * \brief Configure the flex digest normalization seed profile.
   1051  *
   1052  * \param [in] unit Unit Number.
   1053  * \param [in] seed_profile_id Normalization Seed profile identifier.
   1054  * \param [in] type The normalization seed profile control type.
   1055  * \param [in] value The normalization seed profile control value.
   1056  *
   1057  * \retval SHR_E_NONE No errors.
   1058  * \retval !SHR_E_NONE Failure.
   1059  */
   1060 extern int
   1061 mbcm_ltsw_flexdigest_norm_seed_profile_set(
   1062     int unit,
   1063     int seed_profile_id,
   1064     bcm_flexdigest_norm_seed_control_t type,
   1065     int value);
   1066 
   1067 /*!
   1068  * \brief Get the flex digest normalization seed profile configuration.
   1069  *
   1070  * \param [in] unit Unit Number.
   1071  * \param [in] seed_profile_id Normalization Seed profile identifier.
   1072  * \param [in] type The normalization seed profile control type.
   1073  * \param [out] value The normalization seed profile control value.
   1074  *
   1075  * \retval SHR_E_NONE No errors.
   1076  * \retval !SHR_E_NONE Failure.
   1077  */
   1078 extern int
   1079 mbcm_ltsw_flexdigest_norm_seed_profile_get(
   1080     int unit,
   1081     int seed_profile_id,
   1082     bcm_flexdigest_norm_seed_control_t type,
   1083     int *value);
   1084 
   1085 /*!
   1086  * \brief Check whether this flex digest normalization seed profile is configured or not.
   1087  *
   1088  * \param [in] unit Unit Number.
   1089  * \param [in] seed_profile_id Normalization Seed profile identifier.
   1090  *
   1091  * \retval SHR_E_NONE No errors.
   1092  * \retval !SHR_E_NONE Failure.
   1093  */
   1094 extern int
   1095 mbcm_ltsw_flexdigest_norm_seed_profile_configured(
   1096     int unit,
   1097     int seed_profile_id);
   1098 
   1099 /*!
   1100  * \brief Insert a flex digest normalization profile to logical table.
   1101  *
   1102  * \param [in] unit Unit Number.
   1103  * \param [in] norm_profile_id Normalization profile identifier.
   1104  *
   1105  * \retval SHR_E_NONE No errors.
   1106  * \retval !SHR_E_NONE Failure.
   1107  */
   1108 extern int
   1109 mbcm_ltsw_flexdigest_norm_profile_create(
   1110     int unit,
   1111     int norm_profile_id);
   1112 
   1113 /*!
   1114  * \brief Delete a flex digest normalization profile from logical table.
   1115  *
   1116  * \param [in] unit Unit Number.
   1117  * \param [in] norm_profile_id Normalization profile identifier.
   1118  *
   1119  * \retval SHR_E_NONE No errors.
   1120  * \retval !SHR_E_NONE Failure.
   1121  */
   1122 extern int
   1123 mbcm_ltsw_flexdigest_norm_profile_destroy(
   1124     int unit,
   1125     int norm_profile_id);
   1126 
   1127 /*!
   1128  * \brief Configure the flex digest normalization profile.
   1129  *
   1130  * \param [in] unit Unit Number.
   1131  * \param [in] norm_profile_id Normalization profile identifier.
   1132  * \param [in] type The normalization profile control type.
   1133  * \param [in] value The normalization profile control value.
   1134  *
   1135  * \retval SHR_E_NONE No errors.
   1136  * \retval !SHR_E_NONE Failure.
   1137  */
   1138 extern int
   1139 mbcm_ltsw_flexdigest_norm_profile_set(
   1140     int unit,
   1141     int norm_profile_id,
   1142     bcm_flexdigest_norm_profile_control_t type,
   1143     int value);
   1144 
   1145 /*!
   1146  * \brief Get the flex digest normalization profile configuration.
   1147  *
   1148  * \param [in] unit Unit Number.
   1149  * \param [in] norm_profile_id Normalization profile identifier.
   1150  * \param [in] type The normalization profile control type.
   1151  * \param [out] value The normalization profile control value.
   1152  *
   1153  * \retval SHR_E_NONE No errors.
   1154  * \retval !SHR_E_NONE Failure.
   1155  */
   1156 extern int
   1157 mbcm_ltsw_flexdigest_norm_profile_get(
   1158     int unit,
   1159     int norm_profile_id,
   1160     bcm_flexdigest_norm_profile_control_t type,
   1161     int *value);
   1162 
   1163 /*!
   1164  * \brief Check whether the flex digest normalization profile is configured or not.
   1165  *
   1166  * \param [in] unit Unit Number.
   1167  * \param [in] norm_profile_id Normalization profile identifier.
   1168  *
   1169  * \retval SHR_E_NONE No errors.
   1170  * \retval !SHR_E_NONE Failure.
   1171  */
   1172 extern int
   1173 mbcm_ltsw_flexdigest_norm_profile_configured(
   1174     int unit,
   1175     int norm_profile_id);
   1176 
   1177 /*!
   1178  * \brief Allocate a entry handle.
   1179  *
   1180  * \param [in] unit Unit Number.
   1181  * \param [inout] einfo The entry information.
   1182  *
   1183  * \retval SHR_E_NONE No errors.
   1184  * \retval !SHR_E_NONE Failure.
   1185  */
   1186 extern int
   1187 mbcm_ltsw_flexdigest_lkup_entry_allocate(
   1188     int unit,
   1189     bcmint_flexdigest_entry_info_t *einfo);
   1190 
   1191 /*!
   1192  * \brief Free a entry handle.
   1193  *
   1194  * \param [in] unit Unit Number.
   1195  * \param [inout] einfo The entry information.
   1196  *
   1197  * \retval SHR_E_NONE No errors.
   1198  * \retval !SHR_E_NONE Failure.
   1199  */
   1200 extern int
   1201 mbcm_ltsw_flexdigest_lkup_entry_free(
   1202     int unit,
   1203     bcmint_flexdigest_entry_info_t *einfo);
   1204 
   1205 /*!
   1206  * \brief Set the entry priority.
   1207  *
   1208  * \param [in] unit Unit Number.
   1209  * \param [inout] einfo The entry information.
   1210  * \param [in] prio The entry priority.
   1211  *
   1212  * \retval SHR_E_NONE No errors.
   1213  * \retval !SHR_E_NONE Failure.
   1214  */
   1215 extern int
   1216 mbcm_ltsw_flexdigest_lkup_entry_pri_set(
   1217     int unit,
   1218     bcmint_flexdigest_entry_info_t *einfo,
   1219     int prio);
   1220 
   1221 /*!
   1222  * \brief Add a match to an entry.
   1223  *
   1224  * \param [in] unit Unit Number.
   1225  * \param [inout] einfo The entry information.
   1226  * \param [in] match The entry match criteria.
   1227  *
   1228  * \retval SHR_E_NONE No errors.
   1229  * \retval !SHR_E_NONE Failure.
   1230  */
   1231 extern int
   1232 mbcm_ltsw_flexdigest_lkup_entry_match_add(
   1233     int unit,
   1234     bcmint_flexdigest_entry_info_t *einfo,
   1235     bcm_flexdigest_match_t match);
   1236 
   1237 /*!
   1238  * \brief Add a qualifier to an entry.
   1239  *
   1240  * \param [in] unit Unit Number.
   1241  * \param [inout] einfo The entry information.
   1242  * \param [in] qualifier The entry qualifier.
   1243  * \param [in] data The entry qualifier data.
   1244  * \param [in] mask The entry qualifier mask.
   1245  *
   1246  * \retval SHR_E_NONE No errors.
   1247  * \retval !SHR_E_NONE Failure.
   1248  */
   1249 extern int
   1250 mbcm_ltsw_flexdigest_lkup_entry_qualifier_add(
   1251     int unit,
   1252     bcmint_flexdigest_entry_info_t *einfo,
   1253     bcm_flexdigest_qualify_t qualifier,
   1254     uint16_t data,
   1255     uint16_t mask);
   1256 
   1257 /*!
   1258  * \brief Add an action to an entry.
   1259  *
   1260  * \param [in] unit Unit Number.
   1261  * \param [inout] einfo The entry information.
   1262  * \param [in] action The entry match criteria.
   1263  * \param [in] param0 The entry action param0.
   1264  * \param [in] param1 The entry action param1.
   1265  *
   1266  * \retval SHR_E_NONE No errors.
   1267  * \retval !SHR_E_NONE Failure.
   1268  */
   1269 extern int
   1270 mbcm_ltsw_flexdigest_lkup_entry_action_add(
   1271     int unit,
   1272     bcmint_flexdigest_entry_info_t *einfo,
   1273     bcm_flexdigest_action_t action,
   1274     uint16_t param0,
   1275     uint16_t param1);
   1276 
   1277 /*!
   1278  * \brief Restore lookup mask profile from entry actions.
   1279  *
   1280  * \param [in] unit Unit Number.
   1281  * \param [inout] einfo The entry information.
   1282  *
   1283  * \retval SHR_E_NONE No errors.
   1284  * \retval !SHR_E_NONE Failure.
   1285  */
   1286 extern int
   1287 mbcm_ltsw_flexdigest_lkup_entry_mask_profile_restore(
   1288     int unit,
   1289     bcmint_flexdigest_entry_info_t *einfo);
   1290 
   1291 /*!
   1292  * \brief Insert an entry.
   1293  *
   1294  * \param [in] unit Unit Number.
   1295  * \param [inout] einfo The entry information.
   1296  *
   1297  * \retval SHR_E_NONE No errors.
   1298  * \retval !SHR_E_NONE Failure.
   1299  */
   1300 extern int
   1301 mbcm_ltsw_flexdigest_lkup_entry_insert(
   1302     int unit,
   1303     bcmint_flexdigest_entry_info_t *einfo);
   1304 
   1305 /*!
   1306  * \brief Update an entry.
   1307  *
   1308  * \param [in] unit Unit Number.
   1309  * \param [inout] einfo The entry information.
   1310  *
   1311  * \retval SHR_E_NONE No errors.
   1312  * \retval !SHR_E_NONE Failure.
   1313  */
   1314 extern int
   1315 mbcm_ltsw_flexdigest_lkup_entry_update(
   1316     int unit,
   1317     bcmint_flexdigest_entry_info_t *einfo);
   1318 
   1319 /*!
   1320  * \brief Lookup an entry.
   1321  *
   1322  * \param [in] unit Unit Number.
   1323  * \param [inout] einfo The entry information.
   1324  *
   1325  * \retval SHR_E_NONE No errors.
   1326  * \retval !SHR_E_NONE Failure.
   1327  */
   1328 extern int
   1329 mbcm_ltsw_flexdigest_lkup_entry_lookup(
   1330     int unit,
   1331     bcmint_flexdigest_entry_info_t *einfo);
   1332 
   1333 /*!
   1334  * \brief Insert an entry.
   1335  *
   1336  * \param [in] unit Unit Number.
   1337  * \param [inout] einfo The entry information.
   1338  *
   1339  * \retval SHR_E_NONE No errors.
   1340  * \retval !SHR_E_NONE Failure.
   1341  */
   1342 extern int
   1343 mbcm_ltsw_flexdigest_lkup_entry_delete(
   1344     int unit,
   1345     bcmint_flexdigest_entry_info_t *einfo);
   1346 
   1347 /*!
   1348  * \brief Unset an entry.
   1349  *
   1350  * \param [in] unit Unit Number.
   1351  * \param [inout] einfo The entry information.
   1352  *
   1353  * \retval SHR_E_NONE No errors.
   1354  * \retval !SHR_E_NONE Failure.
   1355  */
   1356 extern int
   1357 mbcm_ltsw_flexdigest_lkup_entry_unset(
   1358     int unit,
   1359     bcmint_flexdigest_entry_info_t *einfo);
   1360 
   1361 /*!
   1362  * \brief Update the lookup presel logical table.
   1363  *
   1364  * \param [in] unit Unit Number.
   1365  * \param [in] qset The Presel Qualifier Set.
   1366  *
   1367  * \retval SHR_E_NONE No errors.
   1368  * \retval !SHR_E_NONE Failure.
   1369  */
   1370 extern int
   1371 mbcm_ltsw_flexdigest_lkup_group_update_presel(
   1372     int unit,
   1373     bcm_flexdigest_qset_t qset);
   1374 
   1375 /*!
   1376  * \brief Insert a flex digest hashing profile to logical table.
   1377  *
   1378  * \param [in] unit Unit Number.
   1379  * \param [in] hash_profile_id Hashing profile identifier.
   1380  *
   1381  * \retval SHR_E_NONE No errors.
   1382  * \retval !SHR_E_NONE Failure.
   1383  */
   1384 extern int
   1385 mbcm_ltsw_flexdigest_hash_profile_create(
   1386     int unit,
   1387     int hash_profile_id);
   1388 
   1389 /*!
   1390  * \brief Delete a flex digest hashing profile from logical table.
   1391  *
   1392  * \param [in] unit Unit Number.
   1393  * \param [in] hash_profile_id Hashing profile identifier.
   1394  *
   1395  * \retval SHR_E_NONE No errors.
   1396  * \retval !SHR_E_NONE Failure.
   1397  */
   1398 extern int
   1399 mbcm_ltsw_flexdigest_hash_profile_destroy(
   1400     int unit,
   1401     int hash_profile_id);
   1402 
   1403 /*!
   1404  * \brief Configure the flex digest hashing profile.
   1405  *
   1406  * \param [in] unit Unit Number.
   1407  * \param [in] hash_profile_id Hashing profile identifier.
   1408  * \param [in] type The hashing profile control type.
   1409  * \param [in] value The hashing profile control value.
   1410  *
   1411  * \retval SHR_E_NONE No errors.
   1412  * \retval !SHR_E_NONE Failure.
   1413  */
   1414 extern int
   1415 mbcm_ltsw_flexdigest_hash_profile_set(
   1416     int unit,
   1417     int hash_profile_id,
   1418     bcm_flexdigest_hash_profile_control_t type,
   1419     int value);
   1420 
   1421 /*!
   1422  * \brief Get the flex digest hashing profile configuration.
   1423  *
   1424  * \param [in] unit Unit Number.
   1425  * \param [in] hash_profile_id Hashing profile identifier.
   1426  * \param [in] type The hashing profile control type.
   1427  * \param [out] value The hashing profile control value.
   1428  *
   1429  * \retval SHR_E_NONE No errors.
   1430  * \retval !SHR_E_NONE Failure.
   1431  */
   1432 extern int
   1433 mbcm_ltsw_flexdigest_hash_profile_get(
   1434     int unit,
   1435     int hash_profile_id,
   1436     bcm_flexdigest_hash_profile_control_t type,
   1437     int *value);
   1438 
   1439 /*!
   1440  * \brief Check whether the flex digest hashing profile is configured or not.
   1441  *
   1442  * \param [in] unit Unit Number.
   1443  * \param [in] hash_profile_id Hashing profile identifier.
   1444  *
   1445  * \retval SHR_E_NONE No errors.
   1446  * \retval !SHR_E_NONE Failure.
   1447  */
   1448 extern int
   1449 mbcm_ltsw_flexdigest_hash_profile_configured(
   1450     int unit,
   1451     int hash_profile_id);
   1452 
   1453 /*!
   1454  * \brief Configure salt for a specific hashing bin set.
   1455  *
   1456  * \param [in] unit Unit Number.
   1457  * \param [in] bin_set Hashing bin set.
   1458  * \param [in] array_size The number of Hashing bins in a bin set.
   1459  * \param [in] salt_array The Hashing salt array.
   1460  *
   1461  * \retval SHR_E_NONE No errors.
   1462  * \retval !SHR_E_NONE Failure.
   1463  */
   1464 extern int
   1465 mbcm_ltsw_flexdigest_hash_salt_set(
   1466     int unit,
   1467     bcm_flexdigest_hash_bin_set_t bin_set,
   1468     int array_size,
   1469     uint16_t *salt_array);
   1470 
   1471 /*!
   1472  * \brief Configure salt for a specific hashing bin set.
   1473  *
   1474  * \param [in] unit Unit Number.
   1475  * \param [in] bin_set Hashing bin set.
   1476  * \param [in] array_size The maximum number of Hashing bins array.
   1477  * \param [out] salt_array The Hashing salt array.
   1478  * \param [out] count The number of Hashing bins in a bin set.
   1479  *
   1480  * \retval SHR_E_NONE No errors.
   1481  * \retval !SHR_E_NONE Failure.
   1482  */
   1483 extern int
   1484 mbcm_ltsw_flexdigest_hash_salt_get(
   1485     int unit,
   1486     bcm_flexdigest_hash_bin_set_t bin_set,
   1487     int array_size,
   1488     uint16_t *salt_array,
   1489     int *count);
   1490 
   1491 /*!
   1492  * \brief Set a device-wide flex digest control value.
   1493  *
   1494  * \param [in] unit Unit Number.
   1495  * \param [in] type The flex digest control type.
   1496  * \param [in] arg Argument whose meaning depends on type.
   1497  *
   1498  * \retval SHR_E_NONE No errors.
   1499  * \retval !SHR_E_NONE Failure.
   1500  */
   1501 extern int
   1502 mbcm_ltsw_flexdigest_control_set(
   1503     int unit,
   1504     bcm_flexdigest_control_t type,
   1505     int arg);
   1506 
   1507 /*!
   1508  * \brief Get a device-wide flex digest control value.
   1509  *
   1510  * \param [in] unit Unit Number.
   1511  * \param [in] type The flex digest control type.
   1512  * \param [out] arg Argument whose meaning depends on type.
   1513  *
   1514  * \retval SHR_E_NONE No errors.
   1515  * \retval !SHR_E_NONE Failure.
   1516  */
   1517 extern int
   1518 mbcm_ltsw_flexdigest_control_get(
   1519     int unit,
   1520     bcm_flexdigest_control_t type,
   1521     int *arg);
   1522 
   1523 #endif /* BCMINT_LTSW_MBCM_FLEXDIGEST_H */