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

flow.h (52431B)


      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_FLOW_H
     12 #define BCMINT_LTSW_MBCM_FLOW_H
     13 
     14 #include <bcm/types.h>
     15 #include <bcm/flow.h>
     16 #include <bcm/switch.h>
     17 #include <bcm/flexctr.h>
     18 
     19 #include <bcm_int/ltsw/flow_int.h>
     20 
     21 #include <sal/sal_types.h>
     22 
     23 /*!
     24  * \brief Initialize flow module.
     25  *
     26  * \param [in] unit Unit Number.
     27  *
     28  * \retval SHR_E_NONE No errors.
     29  * \retval !SHR_E_NONE Failure.
     30  */
     31 typedef int (*flow_init_f)(int unit);
     32 
     33 /*!
     34  * \brief Get LT database.
     35  *
     36  * \param [in] unit Unit Number.
     37  * \param [in] lt_db LT database.
     38  */
     39 typedef int (*flow_lt_db_get_f)(
     40     int unit,
     41     bcmint_flow_lt_db_t *lt_db);
     42 
     43 /*!
     44  * \brief De-initialize flow module.
     45  *
     46  * \param [in] unit Unit Number.
     47  *
     48  * \retval SHR_E_NONE No errors.
     49  * \retval !SHR_E_NONE Failure.
     50  */
     51 typedef int (*flow_detach_f)(int unit);
     52 
     53 /*!
     54  * \brief Get mapping info of given type.
     55  *
     56  * \param [in] unit Unit Number.
     57  * \param [in] info_type Info type from ltsw_flow_mapping_info_type_t.
     58  * \param [out] info_ptr Info pointer.
     59  * \param [out] rec_num Number of records.
     60  *
     61  * \retval SHR_E_NONE No errors.
     62  * \retval !SHR_E_NONE Failure.
     63  */
     64 typedef int (*flow_mapping_info_get_f)(
     65     int unit,
     66     bcmint_flow_mapping_info_type_t info_type,
     67     uint8_t **info_ptr,
     68     uint32_t *rec_num);
     69 
     70 /*!
     71  * \brief Update HW table for given VPN.
     72  *
     73  * \param [in] unit Unit Number.
     74  * \param [in] opt Opt type from ltsw_flow_hw_opt_type_t.
     75  * \param [in] vpn VPN ID.
     76  * \param [in-out] info VPN configuration structure.
     77  *
     78  * \retval SHR_E_NONE No errors.
     79  * \retval !SHR_E_NONE Failure.
     80  */
     81 typedef int (*flow_vpn_hw_opt_f)(
     82     int unit,
     83     bcmint_flow_hw_opt_type_t opt,
     84     bcm_vpn_t vpn,
     85     bcm_flow_vpn_config_t *info);
     86 
     87 /*!
     88  * \brief Update HW table for given VP.
     89  *
     90  * \param [in] unit Unit Number.
     91  * \param [in] opt Opt type from ltsw_flow_hw_opt_type_t.
     92  * \param [in-out] flow_port Flow port information.
     93  *
     94  * \retval SHR_E_NONE No errors.
     95  * \retval !SHR_E_NONE Failure.
     96  */
     97 typedef int (*flow_vp_hw_opt_f)(
     98     int unit,
     99     bcmint_flow_hw_opt_type_t opt,
    100     bcm_flow_port_t *flow_port);
    101 
    102 /*!
    103  * \brief Update HW table based on match criteria.
    104  *
    105  * \param [in] unit Unit Number.
    106  * \param [in] opt Opt type from ltsw_flow_hw_opt_type_t.
    107  * \param [in-out] info Flow match information.
    108  *
    109  * \retval SHR_E_NONE No errors.
    110  * \retval !SHR_E_NONE Failure.
    111  */
    112 typedef int (*flow_match_hw_opt_f)(
    113     int unit,
    114     bcmint_flow_hw_opt_type_t opt,
    115     bcm_flow_match_config_t *info);
    116 
    117 /*!
    118  * \brief Traverse HW table based on match criteria.
    119  *
    120  * \param [in] unit Unit Number.
    121  * \param [in] cb User callback function.
    122  * \param [in] user_data User context data.
    123  *
    124  * \retval SHR_E_NONE No errors.
    125  * \retval !SHR_E_NONE Failure.
    126  */
    127 typedef int (*flow_match_traverse_f)(
    128     int unit,
    129     bcm_flow_match_traverse_cb cb,
    130     void *user_data);
    131 
    132 /*!
    133  * \brief Update HW table based on encap criteria.
    134  *
    135  * \param [in] unit Unit Number.
    136  * \param [in] opt Opt type from ltsw_flow_hw_opt_type_t.
    137  * \param [in-out] info Flow encap information.
    138  * \param [in] num_of_fields Number of logical fields.
    139  * \param [in] field Logical field array.
    140  *
    141  * \retval SHR_E_NONE No errors.
    142  * \retval !SHR_E_NONE Failure.
    143  */
    144 typedef int (*flow_encap_hw_opt_f)(
    145     int unit,
    146     bcmint_flow_hw_opt_type_t opt,
    147     bcm_flow_encap_config_t *info,
    148     uint32_t num_of_fields,
    149     bcm_flow_logical_field_t *field);
    150 
    151 /*!
    152  * \brief Traverse HW table based on encap criteria.
    153  *
    154  * \param [in] unit Unit Number.
    155  * \param [in] cb User callback function.
    156  * \param [in] user_data User context data.
    157  *
    158  * \retval SHR_E_NONE No errors.
    159  * \retval !SHR_E_NONE Failure.
    160  */
    161 typedef int (*flow_encap_traverse_f)(
    162     int unit,
    163     bcm_flow_encap_traverse_cb cb,
    164     void *user_data);
    165 
    166 /*!
    167  * \brief Update HW table based on VP attributes.
    168  *
    169  * \param [in] unit Unit Number.
    170  * \param [in] opt Opt type from ltsw_flow_hw_opt_type_t.
    171  * \param [in-out] info Flow  port encap information.
    172  *
    173  * \retval SHR_E_NONE No errors.
    174  * \retval !SHR_E_NONE Failure.
    175  */
    176 typedef int (*flow_port_encap_hw_opt_f)(
    177     int unit,
    178     bcmint_flow_hw_opt_type_t opt,
    179     bcm_flow_port_encap_t *info);
    180 
    181 /*!
    182  * \brief Get flow port from L2 interface.
    183  *
    184  * \param [in] unit Unit Number.
    185  * \param [in] l2_if L2 interface.
    186  * \param [out] port Port Number.
    187  *
    188  * \retval SHR_E_NONE No errors.
    189  * \retval !SHR_E_NONE Failure.
    190  */
    191 typedef int (*flow_l2_if_to_port_f)(
    192     int unit,
    193     int l2_if,
    194     bcm_port_t *port);
    195 
    196 /*!
    197  * \brief Get L2 interface from flow gport.
    198  *
    199  * \param [in] unit Unit Number.
    200  * \param [in] port Port Number.
    201  * \param [out] l2_if L2 interface.
    202  *
    203  * \retval SHR_E_NONE No errors.
    204  * \retval !SHR_E_NONE Failure.
    205  */
    206 typedef int (*flow_port_to_l2_if_f)(
    207     int unit,
    208     bcm_port_t port,
    209     int *l2_if);
    210 
    211 /*!
    212  * \brief Update HW table based on tunnel terminator.
    213  *
    214  * \param [in] unit Unit Number.
    215  * \param [in] opt Opt type from ltsw_flow_hw_opt_type_t.
    216  * \param [in-out] info Flow tunnel terminator information.
    217  *
    218  * \retval SHR_E_NONE No errors.
    219  * \retval !SHR_E_NONE Failure.
    220  */
    221 typedef int (*flow_tunnel_term_hw_opt_f)(
    222     int unit,
    223     bcmint_flow_hw_opt_type_t opt,
    224     bcm_flow_tunnel_terminator_t *info);
    225 
    226 /*!
    227  * \brief Traverse HW table based on tunnel terminator.
    228  *
    229  * \param [in] unit Unit Number.
    230  * \param [in] cb User callback function.
    231  * \param [in] user_data User context data.
    232  *
    233  * \retval SHR_E_NONE No errors.
    234  * \retval !SHR_E_NONE Failure.
    235  */
    236 typedef int (*flow_tunnel_term_traverse_f)(
    237     int unit,
    238     bcm_flow_tunnel_terminator_traverse_cb cb,
    239     void *user_data);
    240 
    241 /*!
    242  * \brief Update HW table based on tunnel initiator.
    243  *
    244  * \param [in] unit Unit Number.
    245  * \param [in] opt Opt type from ltsw_flow_hw_opt_type_t.
    246  * \param [in-out] info Flow tunnel initiator information.
    247  *
    248  * \retval SHR_E_NONE No errors.
    249  * \retval !SHR_E_NONE Failure.
    250  */
    251 typedef int (*flow_tunnel_initiator_hw_opt_f)(
    252     int unit,
    253     bcmint_flow_hw_opt_type_t opt,
    254     bcm_flow_tunnel_initiator_t *info);
    255 
    256 /*!
    257  * \brief Traverse HW table based on tunnel initiator.
    258  *
    259  * \param [in] unit Unit Number.
    260  * \param [in] cb User callback function.
    261  * \param [in] user_data User context data.
    262  *
    263  * \retval SHR_E_NONE No errors.
    264  * \retval !SHR_E_NONE Failure.
    265  */
    266 typedef int (*flow_tunnel_initiator_traverse_f)(
    267     int unit,
    268     bcm_flow_tunnel_initiator_traverse_cb cb,
    269     void *user_data);
    270 
    271 /*!
    272  * \brief Attach counter to the given table.
    273  *
    274  * \param [in] unit Unit Number.
    275  * \param [in] info Flow stat config structure.
    276  * \param [in] stat_counter_id Stat counter id.
    277  *
    278  * \retval SHR_E_NONE No errors.
    279  * \retval !SHR_E_NONE Failure.
    280  */
    281 typedef int (*flow_stat_attach_f)(
    282     int unit,
    283     bcm_flow_stat_info_t *info,
    284     uint32_t stat_counter_id);
    285 
    286 /*!
    287  * \brief Detach counter from the given table.
    288  *
    289  * \param [in] unit Unit Number.
    290  * \param [in] info Flow stat config structure.
    291  * \param [in] stat_counter_id Stat counter id.
    292  *
    293  * \retval SHR_E_NONE No errors.
    294  * \retval !SHR_E_NONE Failure.
    295  */
    296 typedef int (*flow_stat_detach_f)(
    297     int unit,
    298     bcm_flow_stat_info_t *info,
    299     uint32_t stat_counter_id);
    300 
    301 /*!
    302  * \brief Dump device-specific FLOW S/W state.
    303  *
    304  * \param [in] unit Unit Number.
    305  */
    306 typedef void (*flow_sw_dump_f)(int unit);
    307 
    308 /*!
    309  * \brief Enable/disable EVPN functionality.
    310  *
    311  * \param [in] unit Unit Number.
    312  * \param [in] enable EVPN enable indicator. 0 : Disable EVPN, 1 : Enable EVPN.
    313  *
    314  * \retval SHR_E_NONE No errors.
    315  * \retval !SHR_E_NONE Failure.
    316  */
    317 typedef int (*flow_evpn_enable_set_f)(
    318     int unit,
    319     int enable);
    320 
    321 /*!
    322  * \brief Get the enable status of EVPN functionality.
    323  *
    324  * \param [in] unit Unit Number.
    325  * \param [in] enable EVPN enable indicator. 0 : EVPN disabled , 1 : EVPN enabled.
    326  *
    327  * \retval SHR_E_NONE No errors.
    328  * \retval !SHR_E_NONE Failure.
    329  */
    330 typedef int (*flow_evpn_enable_get_f)(
    331     int unit,
    332     int *enable);
    333 
    334 /*!
    335  * \brief Specify general switch behaviors.
    336  *
    337  * \param [in] unit Unit Number.
    338  * \param [in] type The desired configuration parameter to modify.
    339  * \param [in] arg The value with which to set the parameter.
    340  *
    341  * \retval SHR_E_NONE No errors.
    342  * \retval !SHR_E_NONE Failure.
    343  */
    344 typedef int (*flow_switch_control_set_f)(
    345     int unit,
    346     bcm_switch_control_t type,
    347     int arg);
    348 
    349 /*!
    350  * \brief Retrieve general switch behaviors.
    351  *
    352  * \param [in] unit Unit Number.
    353  * \param [in] type The desired configuration parameter to modify.
    354  * \param [in] arg Pointer to where the retrieved value will be written.
    355  *
    356  * \retval SHR_E_NONE No errors.
    357  * \retval !SHR_E_NONE Failure.
    358  */
    359 typedef int (*flow_switch_control_get_f)(
    360     int unit,
    361     bcm_switch_control_t type,
    362     int *arg);
    363 
    364 /*!
    365  * \brief Specify the filter control for the given ethernet segment identifier.
    366  *
    367  * \param [in] unit Unit Number.
    368  * \param [in] flow_port_id GPORT identifier.
    369  * \param [in] es_id ethernet segment identifier.
    370  * \param [in] flags BCM_FLOW_ES_FILTER_xxx.
    371  *
    372  * \retval SHR_E_NONE No errors.
    373  * \retval !SHR_E_NONE Failure.
    374  */
    375 typedef int (*flow_es_filter_set_f)(
    376     int unit,
    377     bcm_gport_t flow_port_id,
    378     uint32_t es_id,
    379     uint32_t flags);
    380 
    381 /*!
    382  * \brief Get the filter status for the given ethernet segment identifier.
    383  *
    384  * \param [in] unit Unit Number.
    385  * \param [in] flow_port_id GPORT identifier.
    386  * \param [in] es_id ethernet segment identifier.
    387  * \param [in] flags BCM_FLOW_ES_FILTER_xxx.
    388  *
    389  * \retval SHR_E_NONE No errors.
    390  * \retval !SHR_E_NONE Failure.
    391  */
    392 typedef int (*flow_es_filter_get_f)(
    393     int unit,
    394     bcm_gport_t flow_port_id,
    395     uint32_t es_id,
    396     uint32_t *flags);
    397 
    398 /*!
    399  * \brief Set the flex counter object value to the ethernet segment filter.
    400  *
    401  * \param [in] unit Unit Number.
    402  * \param [in] flow_port_id GPORT identifier.
    403  * \param [in] value The flex counter object value.
    404  *
    405  * \retval SHR_E_NONE No errors.
    406  * \retval !SHR_E_NONE Failure.
    407  */
    408 typedef int (*flow_es_filter_flexctr_object_set_f)(
    409     int unit,
    410     bcm_gport_t flow_port_id,
    411     uint32_t value);
    412 
    413 /*!
    414  * \brief Get the flex counter object value from the ethernet segment filter.
    415  *
    416  * \param [in] unit Unit Number.
    417  * \param [in] flow_port_id GPORT identifier.
    418  * \param [in] value The flex counter object value.
    419  *
    420  * \retval SHR_E_NONE No errors.
    421  * \retval !SHR_E_NONE Failure.
    422  */
    423 typedef int (*flow_es_filter_flexctr_object_get_f)(
    424     int unit,
    425     bcm_gport_t flow_port_id,
    426     uint32_t *value);
    427 
    428 /*!
    429  * \brief Attach counter entries to the ethernet segment filter.
    430  *
    431  * \param [in] unit Unit Number.
    432  * \param [in] flow_port_id GPORT identifier.
    433  * \param [in] stat_counter_id Stat counter ID.
    434  *
    435  * \retval SHR_E_NONE No errors.
    436  * \retval !SHR_E_NONE Failure.
    437  */
    438 typedef int (*flow_es_filter_stat_attach_f)(
    439     int unit,
    440     bcm_gport_t flow_port_id,
    441     uint32_t stat_counter_id);
    442 
    443 /*!
    444  * \brief Detach counter entries from the ethernet segment filter.
    445  *
    446  * \param [in] unit Unit Number.
    447  * \param [in] flow_port_id GPORT identifier.
    448  * \param [in] stat_counter_id Stat counter ID.
    449  *
    450  * \retval SHR_E_NONE No errors.
    451  * \retval !SHR_E_NONE Failure.
    452  */
    453 typedef int (*flow_es_filter_stat_detach_f)(
    454     int unit,
    455     bcm_gport_t flow_port_id,
    456     uint32_t stat_counter_id);
    457 
    458 /*!
    459  * \brief Get stat counter id associated from ethernet segment filter.
    460  *
    461  * \param [in] unit Unit Number.
    462  * \param [in] flow_port_id GPORT identifier.
    463  * \param [in] stat_counter_id Stat counter ID.
    464  *
    465  * \retval SHR_E_NONE No errors.
    466  * \retval !SHR_E_NONE Failure.
    467  */
    468 typedef int (*flow_es_filter_stat_id_get_f)(
    469     int unit,
    470     bcm_gport_t flow_port_id,
    471     uint32_t *stat_counter_id);
    472 
    473 /*!
    474  * \brief Attach counter entries to the given flow VPN.
    475  *
    476  * \param [in] unit Unit Number.
    477  * \param [in] vpn VPN Instance.
    478  * \param [in] stat_counter_id Stat counter ID.
    479  *
    480  * \retval SHR_E_NONE No errors.
    481  * \retval !SHR_E_NONE Failure.
    482  */
    483 typedef int (*flow_vpn_stat_attach_f)(
    484     int unit,
    485     bcm_vpn_t vpn,
    486     uint32_t stat_counter_id);
    487 
    488 /*!
    489  * \brief Detach counter entries from the given flow VPN.
    490  *
    491  * \param [in] unit Unit Number.
    492  * \param [in] vpn VPN Instance.
    493  * \param [in] stat_counter_id Stat counter ID.
    494  *
    495  * \retval SHR_E_NONE No errors.
    496  * \retval !SHR_E_NONE Failure.
    497  */
    498 typedef int (*flow_vpn_stat_detach_f)(
    499     int unit,
    500     bcm_vpn_t vpn,
    501     uint32_t stat_counter_id);
    502 
    503 /*!
    504  * \brief Get stat counter ID associated to the given flow VPN.
    505  *
    506  * \param [in] unit Unit Number.
    507  * \param [in] vpn VPN Instance.
    508  * \param [in] direction Direction.
    509  * \param [in] stat_counter_id Stat counter ID.
    510  *
    511  * \retval SHR_E_NONE No errors.
    512  * \retval !SHR_E_NONE Failure.
    513  */
    514 typedef int (*flow_vpn_stat_id_get_f)(
    515     int unit,
    516     bcm_vpn_t vpn,
    517     bcm_flexctr_direction_t direction,
    518     uint32_t *stat_counter_id);
    519 
    520 /*!
    521  * \brief Attach counter entries to the given flow port.
    522  *
    523  * \param [in] unit Unit Number.
    524  * \param [in] flow_port_id GPORT identifier.
    525  * \param [in] stat_counter_id Stat counter ID.
    526  *
    527  * \retval SHR_E_NONE No errors.
    528  * \retval !SHR_E_NONE Failure.
    529  */
    530 typedef int (*flow_port_stat_attach_f)(
    531     int unit,
    532     bcm_gport_t flow_port_id,
    533     uint32_t stat_counter_id);
    534 
    535 /*!
    536  * \brief Detach counter entries from the given flow port.
    537  *
    538  * \param [in] unit Unit Number.
    539  * \param [in] flow_port_id GPORT identifier.
    540  * \param [in] stat_counter_id Stat counter ID.
    541  *
    542  * \retval SHR_E_NONE No errors.
    543  * \retval !SHR_E_NONE Failure.
    544  */
    545 typedef int (*flow_port_stat_detach_f)(
    546     int unit,
    547     bcm_gport_t flow_port_id,
    548     uint32_t stat_counter_id);
    549 
    550 /*!
    551  * \brief Get stat counter ID associated to the given flow port.
    552  *
    553  * \param [in] unit Unit Number.
    554  * \param [in] flow_port_id GPORT identifier.
    555  * \param [in] direction Direction.
    556  * \param [in] stat_counter_id Stat counter ID.
    557  *
    558  * \retval SHR_E_NONE No errors.
    559  * \retval !SHR_E_NONE Failure.
    560  */
    561 typedef int (*flow_port_stat_id_get_f)(
    562     int unit,
    563     bcm_gport_t flow_port_id,
    564     bcm_flexctr_direction_t direction,
    565     uint32_t *stat_counter_id);
    566 
    567 /*!
    568  * \brief Attach counter entries to the flow tunnel initiator.
    569  *
    570  * \param [in] unit Unit Number.
    571  * \param [in] tunnel_id Flow tunnel initiator object ID.
    572  * \param [in] stat_counter_id Stat counter ID.
    573  *
    574  * \retval SHR_E_NONE No errors.
    575  * \retval !SHR_E_NONE Failure.
    576  */
    577 typedef int (*flow_tunnel_initiator_stat_attach_f)(
    578     int unit,
    579     bcm_gport_t tunnel_id,
    580     uint32_t stat_counter_id);
    581 
    582 /*!
    583  * \brief Detach counter entries from the flow tunnel initiator.
    584  *
    585  * \param [in] unit Unit Number.
    586  * \param [in] tunnel_id Flow tunnel initiator object ID.
    587  * \param [in] stat_counter_id Stat counter ID.
    588  *
    589  * \retval SHR_E_NONE No errors.
    590  * \retval !SHR_E_NONE Failure.
    591  */
    592 typedef int (*flow_tunnel_initiator_stat_detach_f)(
    593     int unit,
    594     bcm_gport_t tunnel_id,
    595     uint32_t stat_counter_id);
    596 
    597 /*!
    598  * \brief Get stat counter ID associated to the flow tunnel initiator.
    599  *
    600  * \param [in] unit Unit Number.
    601  * \param [in] tunnel_id Flow tunnel initiator object ID.
    602  * \param [in] stat_counter_id Stat counter ID.
    603  *
    604  * \retval SHR_E_NONE No errors.
    605  * \retval !SHR_E_NONE Failure.
    606  */
    607 typedef int (*flow_tunnel_initiator_stat_id_get_f)(
    608     int unit,
    609     bcm_gport_t tunnel_id,
    610     uint32_t *stat_counter_id);
    611 
    612 /*!
    613  * \brief Set the flex counter object value to the encap entry.
    614  *
    615  * \param [in] unit Unit Number.
    616  * \param [in] info Flow encap information.
    617  * \param [in] value The flex counter object value.
    618  *
    619  * \retval SHR_E_NONE No errors.
    620  * \retval !SHR_E_NONE Failure.
    621  */
    622 typedef int (*flow_encap_flexctr_object_set_f)(
    623     int unit,
    624     bcm_flow_encap_config_t *info,
    625     uint32_t value);
    626 
    627 /*!
    628  * \brief Get the flex counter object value from the encap entry.
    629  *
    630  * \param [in] unit Unit Number.
    631  * \param [in] info Flow encap information.
    632  * \param [in] value The flex counter object value.
    633  *
    634  * \retval SHR_E_NONE No errors.
    635  * \retval !SHR_E_NONE Failure.
    636  */
    637 typedef int (*flow_encap_flexctr_object_get_f)(
    638     int unit,
    639     bcm_flow_encap_config_t *info,
    640     uint32_t *value);
    641 
    642 /*!
    643  * \brief Attach counter entries to the encap entry.
    644  *
    645  * \param [in] unit Unit Number.
    646  * \param [in] info Flow encap information.
    647  * \param [in] num_of_fields Number of logical fields.
    648  * \param [in] field Logical field array.
    649  * \param [in] stat_counter_id Stat counter ID.
    650  *
    651  * \retval SHR_E_NONE No errors.
    652  * \retval !SHR_E_NONE Failure.
    653  */
    654 typedef int (*flow_encap_stat_attach_f)(
    655     int unit,
    656     bcm_flow_encap_config_t *info,
    657     uint32_t num_of_fields,
    658     bcm_flow_logical_field_t *field,
    659     uint32_t stat_counter_id);
    660 
    661 /*!
    662  * \brief Detach the counter entries from the encap entry.
    663  *
    664  * \param [in] unit Unit Number.
    665  * \param [in] info Flow encap information.
    666  * \param [in] num_of_fields Number of logical fields.
    667  * \param [in] field Logical field array.
    668  * \param [in] stat_counter_id Stat counter ID.
    669  *
    670  * \retval SHR_E_NONE No errors.
    671  * \retval !SHR_E_NONE Failure.
    672  */
    673 typedef int (*flow_encap_stat_detach_f)(
    674     int unit,
    675     bcm_flow_encap_config_t *info,
    676     uint32_t num_of_fields,
    677     bcm_flow_logical_field_t *field,
    678     uint32_t stat_counter_id);
    679 
    680 /*!
    681  * \brief Get stat counter ID associated to the encap entry.
    682  *
    683  * \param [in] unit Unit Number.
    684  * \param [in] info Flow encap information.
    685  * \param [in] num_of_fields Number of logical fields.
    686  * \param [in] field Logical field array.
    687  * \param [in] stat_counter_id Stat counter ID.
    688  *
    689  * \retval SHR_E_NONE No errors.
    690  * \retval !SHR_E_NONE Failure.
    691  */
    692 typedef int (*flow_encap_stat_id_get_f)(
    693     int unit,
    694     bcm_flow_encap_config_t *info,
    695     uint32_t num_of_fields,
    696     bcm_flow_logical_field_t *field,
    697     uint32_t *stat_counter_id);
    698 
    699 /*!
    700  * \brief Set the flex counter object value to the given match entry.
    701  *
    702  * \param [in] unit Unit Number.
    703  * \param [in] info Flow match information.
    704  * \param [in] value The flex counter object value.
    705  *
    706  * \retval SHR_E_NONE No errors.
    707  * \retval !SHR_E_NONE Failure.
    708  */
    709 typedef int (*flow_match_flexctr_object_set_f)(
    710     int unit,
    711     bcm_flow_match_config_t *info,
    712     uint32_t value);
    713 
    714 /*!
    715  * \brief Get the flex counter object value from the given match entry.
    716  *
    717  * \param [in] unit Unit Number.
    718  * \param [in] info Flow match information.
    719  * \param [in] value The flex counter object value.
    720  *
    721  * \retval SHR_E_NONE No errors.
    722  * \retval !SHR_E_NONE Failure.
    723  */
    724 typedef int (*flow_match_flexctr_object_get_f)(
    725     int unit,
    726     bcm_flow_match_config_t *info,
    727     uint32_t *value);
    728 
    729 /*!
    730  * \brief Attach counter entries to the given match entry.
    731  *
    732  * \param [in] unit Unit Number.
    733  * \param [in] info Flow match information.
    734  * \param [in] num_of_fields Number of logical fields.
    735  * \param [in] field Logical field array.
    736  * \param [in] stat_counter_id Stat counter ID.
    737  *
    738  * \retval SHR_E_NONE No errors.
    739  * \retval !SHR_E_NONE Failure.
    740  */
    741 typedef int (*flow_match_stat_attach_f)(
    742     int unit,
    743     bcm_flow_match_config_t *info,
    744     uint32_t num_of_fields,
    745     bcm_flow_logical_field_t *field,
    746     uint32_t stat_counter_id);
    747 
    748 /*!
    749  * \brief Detach counter entries from the given match entry.
    750  *
    751  * \param [in] unit Unit Number.
    752  * \param [in] info Flow match information.
    753  * \param [in] num_of_fields Number of logical fields.
    754  * \param [in] field Logical field array.
    755  * \param [in] stat_counter_id Stat counter ID.
    756  *
    757  * \retval SHR_E_NONE No errors.
    758  * \retval !SHR_E_NONE Failure.
    759  */
    760 typedef int (*flow_match_stat_detach_f)(
    761     int unit,
    762     bcm_flow_match_config_t *info,
    763     uint32_t num_of_fields,
    764     bcm_flow_logical_field_t *field,
    765     uint32_t stat_counter_id);
    766 
    767 /*!
    768  * \brief Get stat counter ID associated to the given match entry.
    769  *
    770  * \param [in] unit Unit Number.
    771  * \param [in] info Flow match information.
    772  * \param [in] num_of_fields Number of logical fields.
    773  * \param [in] field Logical field array.
    774  * \param [in] stat_counter_id Stat counter ID.
    775  *
    776  * \retval SHR_E_NONE No errors.
    777  * \retval !SHR_E_NONE Failure.
    778  */
    779 typedef int (*flow_match_stat_id_get_f)(
    780     int unit,
    781     bcm_flow_match_config_t *info,
    782     uint32_t num_of_fields,
    783     bcm_flow_logical_field_t *field,
    784     uint32_t *stat_counter_id);
    785 
    786 /*!
    787  * \brief Set the flex counter object value to the flow tunnel terminator object.
    788  *
    789  * \param [in] unit Unit Number.
    790  * \param [in] info Flow tunnel terminator information.
    791  * \param [in] value The flex counter object value.
    792  *
    793  * \retval SHR_E_NONE No errors.
    794  * \retval !SHR_E_NONE Failure.
    795  */
    796 typedef int (*flow_tunnel_terminator_flexctr_object_set_f)(
    797     int unit,
    798     bcm_flow_tunnel_terminator_t *info,
    799     uint32_t value);
    800 
    801 /*!
    802  * \brief Get the flex counter object value from the flow tunnel terminator object.
    803  *
    804  * \param [in] unit Unit Number.
    805  * \param [in] info Flow tunnel terminator information.
    806  * \param [in] value The flex counter object value.
    807  *
    808  * \retval SHR_E_NONE No errors.
    809  * \retval !SHR_E_NONE Failure.
    810  */
    811 typedef int (*flow_tunnel_terminator_flexctr_object_get_f)(
    812     int unit,
    813     bcm_flow_tunnel_terminator_t *info,
    814     uint32_t *value);
    815 
    816 /*!
    817  * \brief Attach counter entries to the flow tunnel terminator object.
    818  *
    819  * \param [in] unit Unit Number.
    820  * \param [in] info Flow tunnel terminator information.
    821  * \param [in] num_of_fields Number of logical fields.
    822  * \param [in] field Logical field array.
    823  * \param [in] stat_counter_id Stat counter ID.
    824  *
    825  * \retval SHR_E_NONE No errors.
    826  * \retval !SHR_E_NONE Failure.
    827  */
    828 typedef int (*flow_tunnel_terminator_stat_attach_f)(
    829     int unit,
    830     bcm_flow_tunnel_terminator_t *info,
    831     uint32_t num_of_fields,
    832     bcm_flow_logical_field_t *field,
    833     uint32_t stat_counter_id);
    834 
    835 /*!
    836  * \brief Detach counter entries from the flow tunnel terminator object.
    837  *
    838  * \param [in] unit Unit Number.
    839  * \param [in] info Flow tunnel terminator information.
    840  * \param [in] num_of_fields Number of logical fields.
    841  * \param [in] field Logical field array.
    842  * \param [in] stat_counter_id Stat counter ID.
    843  *
    844  * \retval SHR_E_NONE No errors.
    845  * \retval !SHR_E_NONE Failure.
    846  */
    847 typedef int (*flow_tunnel_terminator_stat_detach_f)(
    848     int unit,
    849     bcm_flow_tunnel_terminator_t *info,
    850     uint32_t num_of_fields,
    851     bcm_flow_logical_field_t *field,
    852     uint32_t stat_counter_id);
    853 
    854 /*!
    855  * \brief Get stat counter ID associated to the flow tunnel terminator object.
    856  *
    857  * \param [in] unit Unit Number.
    858  * \param [in] info Flow tunnel terminator information.
    859  * \param [in] num_of_fields Number of logical fields.
    860  * \param [in] field Logical field array.
    861  * \param [in] stat_counter_id Stat counter ID.
    862  *
    863  * \retval SHR_E_NONE No errors.
    864  * \retval !SHR_E_NONE Failure.
    865  */
    866 typedef int (*flow_tunnel_terminator_stat_id_get_f)(
    867     int unit,
    868     bcm_flow_tunnel_terminator_t *info,
    869     uint32_t num_of_fields,
    870     bcm_flow_logical_field_t *field,
    871     uint32_t *stat_counter_id);
    872 
    873 /*!
    874  * \brief Flow driver structure.
    875  */
    876 typedef struct mbcm_ltsw_flow_drv_s {
    877 
    878     /*! Initialize flow module. */
    879     flow_init_f flow_init;
    880 
    881     /*! Get LT database. */
    882     flow_lt_db_get_f flow_lt_db_get;
    883 
    884     /*! De-initialize flow module. */
    885     flow_detach_f flow_detach;
    886 
    887     /*! Get mapping info of given type. */
    888     flow_mapping_info_get_f flow_mapping_info_get;
    889 
    890     /*! Update HW table for given VPN. */
    891     flow_vpn_hw_opt_f flow_vpn_hw_opt;
    892 
    893     /*! Update HW table for given VP. */
    894     flow_vp_hw_opt_f flow_vp_hw_opt;
    895 
    896     /*! Update HW table based on match criteria. */
    897     flow_match_hw_opt_f flow_match_hw_opt;
    898 
    899     /*! Traverse HW table based on match criteria. */
    900     flow_match_traverse_f flow_match_traverse;
    901 
    902     /*! Update HW table based on encap criteria. */
    903     flow_encap_hw_opt_f flow_encap_hw_opt;
    904 
    905     /*! Traverse HW table based on encap criteria. */
    906     flow_encap_traverse_f flow_encap_traverse;
    907 
    908     /*! Update HW table based on VP attributes. */
    909     flow_port_encap_hw_opt_f flow_port_encap_hw_opt;
    910 
    911     /*! Get flow port from L2 interface. */
    912     flow_l2_if_to_port_f flow_l2_if_to_port;
    913 
    914     /*! Get L2 interface from flow gport. */
    915     flow_port_to_l2_if_f flow_port_to_l2_if;
    916 
    917     /*! Update HW table based on tunnel terminator. */
    918     flow_tunnel_term_hw_opt_f flow_tunnel_term_hw_opt;
    919 
    920     /*! Traverse HW table based on tunnel terminator. */
    921     flow_tunnel_term_traverse_f flow_tunnel_term_traverse;
    922 
    923     /*! Update HW table based on tunnel initiator. */
    924     flow_tunnel_initiator_hw_opt_f flow_tunnel_initiator_hw_opt;
    925 
    926     /*! Traverse HW table based on tunnel initiator. */
    927     flow_tunnel_initiator_traverse_f flow_tunnel_initiator_traverse;
    928 
    929     /*! Attach counter to the given table. */
    930     flow_stat_attach_f flow_stat_attach;
    931 
    932     /*! Detach counter from the given table. */
    933     flow_stat_detach_f flow_stat_detach;
    934 
    935     /*! Dump device-specific FLOW S/W state. */
    936     flow_sw_dump_f flow_sw_dump;
    937 
    938     /*! Enable/disable EVPN functionality. */
    939     flow_evpn_enable_set_f flow_evpn_enable_set;
    940 
    941     /*! Get the enable status of EVPN functionality. */
    942     flow_evpn_enable_get_f flow_evpn_enable_get;
    943 
    944     /*! Specify general switch behaviors. */
    945     flow_switch_control_set_f flow_switch_control_set;
    946 
    947     /*! Retrieve general switch behaviors. */
    948     flow_switch_control_get_f flow_switch_control_get;
    949 
    950     /*! Specify the filter control for the given ethernet segment identifier. */
    951     flow_es_filter_set_f flow_es_filter_set;
    952 
    953     /*! Get the filter status for the given ethernet segment identifier. */
    954     flow_es_filter_get_f flow_es_filter_get;
    955 
    956     /*! Set the flex counter object value to the ethernet segment filter. */
    957     flow_es_filter_flexctr_object_set_f flow_es_filter_flexctr_object_set;
    958 
    959     /*! Get the flex counter object value from the ethernet segment filter. */
    960     flow_es_filter_flexctr_object_get_f flow_es_filter_flexctr_object_get;
    961 
    962     /*! Attach counter entries to the ethernet segment filter. */
    963     flow_es_filter_stat_attach_f flow_es_filter_stat_attach;
    964 
    965     /*! Detach counter entries from the ethernet segment filter. */
    966     flow_es_filter_stat_detach_f flow_es_filter_stat_detach;
    967 
    968     /*! Get stat counter id associated from ethernet segment filter. */
    969     flow_es_filter_stat_id_get_f flow_es_filter_stat_id_get;
    970 
    971     /*! Attach counter entries to the given flow VPN. */
    972     flow_vpn_stat_attach_f flow_vpn_stat_attach;
    973 
    974     /*! Detach counter entries from the given flow VPN. */
    975     flow_vpn_stat_detach_f flow_vpn_stat_detach;
    976 
    977     /*! Get stat counter ID associated to the given flow VPN. */
    978     flow_vpn_stat_id_get_f flow_vpn_stat_id_get;
    979 
    980     /*! Attach counter entries to the given flow port. */
    981     flow_port_stat_attach_f flow_port_stat_attach;
    982 
    983     /*! Detach counter entries from the given flow port. */
    984     flow_port_stat_detach_f flow_port_stat_detach;
    985 
    986     /*! Get stat counter ID associated to the given flow port. */
    987     flow_port_stat_id_get_f flow_port_stat_id_get;
    988 
    989     /*! Attach counter entries to the flow tunnel initiator. */
    990     flow_tunnel_initiator_stat_attach_f flow_tunnel_initiator_stat_attach;
    991 
    992     /*! Detach counter entries from the flow tunnel initiator. */
    993     flow_tunnel_initiator_stat_detach_f flow_tunnel_initiator_stat_detach;
    994 
    995     /*! Get stat counter ID associated to the flow tunnel initiator. */
    996     flow_tunnel_initiator_stat_id_get_f flow_tunnel_initiator_stat_id_get;
    997 
    998     /*! Set the flex counter object value to the encap entry. */
    999     flow_encap_flexctr_object_set_f flow_encap_flexctr_object_set;
   1000 
   1001     /*! Get the flex counter object value from the encap entry. */
   1002     flow_encap_flexctr_object_get_f flow_encap_flexctr_object_get;
   1003 
   1004     /*! Attach counter entries to the encap entry. */
   1005     flow_encap_stat_attach_f flow_encap_stat_attach;
   1006 
   1007     /*! Detach the counter entries from the encap entry. */
   1008     flow_encap_stat_detach_f flow_encap_stat_detach;
   1009 
   1010     /*! Get stat counter ID associated to the encap entry. */
   1011     flow_encap_stat_id_get_f flow_encap_stat_id_get;
   1012 
   1013     /*! Set the flex counter object value to the given match entry. */
   1014     flow_match_flexctr_object_set_f flow_match_flexctr_object_set;
   1015 
   1016     /*! Get the flex counter object value from the given match entry. */
   1017     flow_match_flexctr_object_get_f flow_match_flexctr_object_get;
   1018 
   1019     /*! Attach counter entries to the given match entry. */
   1020     flow_match_stat_attach_f flow_match_stat_attach;
   1021 
   1022     /*! Detach counter entries from the given match entry. */
   1023     flow_match_stat_detach_f flow_match_stat_detach;
   1024 
   1025     /*! Get stat counter ID associated to the given match entry. */
   1026     flow_match_stat_id_get_f flow_match_stat_id_get;
   1027 
   1028     /*! Set the flex counter object value to the flow tunnel terminator object. */
   1029     flow_tunnel_terminator_flexctr_object_set_f flow_tunnel_terminator_flexctr_object_set;
   1030 
   1031     /*! Get the flex counter object value from the flow tunnel terminator object. */
   1032     flow_tunnel_terminator_flexctr_object_get_f flow_tunnel_terminator_flexctr_object_get;
   1033 
   1034     /*! Attach counter entries to the flow tunnel terminator object. */
   1035     flow_tunnel_terminator_stat_attach_f flow_tunnel_terminator_stat_attach;
   1036 
   1037     /*! Detach counter entries from the flow tunnel terminator object. */
   1038     flow_tunnel_terminator_stat_detach_f flow_tunnel_terminator_stat_detach;
   1039 
   1040     /*! Get stat counter ID associated to the flow tunnel terminator object. */
   1041     flow_tunnel_terminator_stat_id_get_f flow_tunnel_terminator_stat_id_get;
   1042 
   1043 } mbcm_ltsw_flow_drv_t;
   1044 
   1045 /*!
   1046  * \brief Set the FLOW driver of the device.
   1047  *
   1048  * \param [in] unit Unit Number.
   1049  * \param [in] drv Flow driver to set.
   1050  *
   1051  * \retval SHR_E_NONE No errors.
   1052  * \retval !SHR_E_NONE Failure.
   1053  */
   1054 extern int
   1055 mbcm_ltsw_flow_drv_set(
   1056     int unit,
   1057     mbcm_ltsw_flow_drv_t *drv);
   1058 
   1059 /*!
   1060  * \brief Initialize flow module.
   1061  *
   1062  * \param [in] unit Unit Number.
   1063  *
   1064  * \retval SHR_E_NONE No errors.
   1065  * \retval !SHR_E_NONE Failure.
   1066  */
   1067 extern int
   1068 mbcm_ltsw_flow_init(int unit);
   1069 
   1070 /*!
   1071  * \brief Get LT database.
   1072  *
   1073  * \param [in] unit Unit Number.
   1074  * \param [in] lt_db LT database.
   1075  */
   1076 extern int
   1077 mbcm_ltsw_flow_lt_db_get(
   1078     int unit,
   1079     bcmint_flow_lt_db_t *lt_db);
   1080 
   1081 /*!
   1082  * \brief De-initialize flow module.
   1083  *
   1084  * \param [in] unit Unit Number.
   1085  *
   1086  * \retval SHR_E_NONE No errors.
   1087  * \retval !SHR_E_NONE Failure.
   1088  */
   1089 extern int
   1090 mbcm_ltsw_flow_detach(int unit);
   1091 
   1092 /*!
   1093  * \brief Get mapping info of given type.
   1094  *
   1095  * \param [in] unit Unit Number.
   1096  * \param [in] info_type Info type from ltsw_flow_mapping_info_type_t.
   1097  * \param [out] info_ptr Info pointer.
   1098  * \param [out] rec_num Number of records.
   1099  *
   1100  * \retval SHR_E_NONE No errors.
   1101  * \retval !SHR_E_NONE Failure.
   1102  */
   1103 extern int
   1104 mbcm_ltsw_flow_mapping_info_get(
   1105     int unit,
   1106     bcmint_flow_mapping_info_type_t info_type,
   1107     uint8_t **info_ptr,
   1108     uint32_t *rec_num);
   1109 
   1110 /*!
   1111  * \brief Update HW table for given VPN.
   1112  *
   1113  * \param [in] unit Unit Number.
   1114  * \param [in] opt Opt type from ltsw_flow_hw_opt_type_t.
   1115  * \param [in] vpn VPN ID.
   1116  * \param [in-out] info VPN configuration structure.
   1117  *
   1118  * \retval SHR_E_NONE No errors.
   1119  * \retval !SHR_E_NONE Failure.
   1120  */
   1121 extern int
   1122 mbcm_ltsw_flow_vpn_hw_opt(
   1123     int unit,
   1124     bcmint_flow_hw_opt_type_t opt,
   1125     bcm_vpn_t vpn,
   1126     bcm_flow_vpn_config_t *info);
   1127 
   1128 /*!
   1129  * \brief Update HW table for given VP.
   1130  *
   1131  * \param [in] unit Unit Number.
   1132  * \param [in] opt Opt type from ltsw_flow_hw_opt_type_t.
   1133  * \param [in-out] flow_port Flow port information.
   1134  *
   1135  * \retval SHR_E_NONE No errors.
   1136  * \retval !SHR_E_NONE Failure.
   1137  */
   1138 extern int
   1139 mbcm_ltsw_flow_vp_hw_opt(
   1140     int unit,
   1141     bcmint_flow_hw_opt_type_t opt,
   1142     bcm_flow_port_t *flow_port);
   1143 
   1144 /*!
   1145  * \brief Update HW table based on match criteria.
   1146  *
   1147  * \param [in] unit Unit Number.
   1148  * \param [in] opt Opt type from ltsw_flow_hw_opt_type_t.
   1149  * \param [in-out] info Flow match information.
   1150  *
   1151  * \retval SHR_E_NONE No errors.
   1152  * \retval !SHR_E_NONE Failure.
   1153  */
   1154 extern int
   1155 mbcm_ltsw_flow_match_hw_opt(
   1156     int unit,
   1157     bcmint_flow_hw_opt_type_t opt,
   1158     bcm_flow_match_config_t *info);
   1159 
   1160 /*!
   1161  * \brief Traverse HW table based on match criteria.
   1162  *
   1163  * \param [in] unit Unit Number.
   1164  * \param [in] cb User callback function.
   1165  * \param [in] user_data User context data.
   1166  *
   1167  * \retval SHR_E_NONE No errors.
   1168  * \retval !SHR_E_NONE Failure.
   1169  */
   1170 extern int
   1171 mbcm_ltsw_flow_match_traverse(
   1172     int unit,
   1173     bcm_flow_match_traverse_cb cb,
   1174     void *user_data);
   1175 
   1176 /*!
   1177  * \brief Update HW table based on encap criteria.
   1178  *
   1179  * \param [in] unit Unit Number.
   1180  * \param [in] opt Opt type from ltsw_flow_hw_opt_type_t.
   1181  * \param [in-out] info Flow encap information.
   1182  * \param [in] num_of_fields Number of logical fields.
   1183  * \param [in] field Logical field array.
   1184  *
   1185  * \retval SHR_E_NONE No errors.
   1186  * \retval !SHR_E_NONE Failure.
   1187  */
   1188 extern int
   1189 mbcm_ltsw_flow_encap_hw_opt(
   1190     int unit,
   1191     bcmint_flow_hw_opt_type_t opt,
   1192     bcm_flow_encap_config_t *info,
   1193     uint32_t num_of_fields,
   1194     bcm_flow_logical_field_t *field);
   1195 
   1196 /*!
   1197  * \brief Traverse HW table based on encap criteria.
   1198  *
   1199  * \param [in] unit Unit Number.
   1200  * \param [in] cb User callback function.
   1201  * \param [in] user_data User context data.
   1202  *
   1203  * \retval SHR_E_NONE No errors.
   1204  * \retval !SHR_E_NONE Failure.
   1205  */
   1206 extern int
   1207 mbcm_ltsw_flow_encap_traverse(
   1208     int unit,
   1209     bcm_flow_encap_traverse_cb cb,
   1210     void *user_data);
   1211 
   1212 /*!
   1213  * \brief Update HW table based on VP attributes.
   1214  *
   1215  * \param [in] unit Unit Number.
   1216  * \param [in] opt Opt type from ltsw_flow_hw_opt_type_t.
   1217  * \param [in-out] info Flow  port encap information.
   1218  *
   1219  * \retval SHR_E_NONE No errors.
   1220  * \retval !SHR_E_NONE Failure.
   1221  */
   1222 extern int
   1223 mbcm_ltsw_flow_port_encap_hw_opt(
   1224     int unit,
   1225     bcmint_flow_hw_opt_type_t opt,
   1226     bcm_flow_port_encap_t *info);
   1227 
   1228 /*!
   1229  * \brief Get flow port from L2 interface.
   1230  *
   1231  * \param [in] unit Unit Number.
   1232  * \param [in] l2_if L2 interface.
   1233  * \param [out] port Port Number.
   1234  *
   1235  * \retval SHR_E_NONE No errors.
   1236  * \retval !SHR_E_NONE Failure.
   1237  */
   1238 extern int
   1239 mbcm_ltsw_flow_l2_if_to_port(
   1240     int unit,
   1241     int l2_if,
   1242     bcm_port_t *port);
   1243 
   1244 /*!
   1245  * \brief Get L2 interface from flow gport.
   1246  *
   1247  * \param [in] unit Unit Number.
   1248  * \param [in] port Port Number.
   1249  * \param [out] l2_if L2 interface.
   1250  *
   1251  * \retval SHR_E_NONE No errors.
   1252  * \retval !SHR_E_NONE Failure.
   1253  */
   1254 extern int
   1255 mbcm_ltsw_flow_port_to_l2_if(
   1256     int unit,
   1257     bcm_port_t port,
   1258     int *l2_if);
   1259 
   1260 /*!
   1261  * \brief Update HW table based on tunnel terminator.
   1262  *
   1263  * \param [in] unit Unit Number.
   1264  * \param [in] opt Opt type from ltsw_flow_hw_opt_type_t.
   1265  * \param [in-out] info Flow tunnel terminator information.
   1266  *
   1267  * \retval SHR_E_NONE No errors.
   1268  * \retval !SHR_E_NONE Failure.
   1269  */
   1270 extern int
   1271 mbcm_ltsw_flow_tunnel_term_hw_opt(
   1272     int unit,
   1273     bcmint_flow_hw_opt_type_t opt,
   1274     bcm_flow_tunnel_terminator_t *info);
   1275 
   1276 /*!
   1277  * \brief Traverse HW table based on tunnel terminator.
   1278  *
   1279  * \param [in] unit Unit Number.
   1280  * \param [in] cb User callback function.
   1281  * \param [in] user_data User context data.
   1282  *
   1283  * \retval SHR_E_NONE No errors.
   1284  * \retval !SHR_E_NONE Failure.
   1285  */
   1286 extern int
   1287 mbcm_ltsw_flow_tunnel_term_traverse(
   1288     int unit,
   1289     bcm_flow_tunnel_terminator_traverse_cb cb,
   1290     void *user_data);
   1291 
   1292 /*!
   1293  * \brief Update HW table based on tunnel initiator.
   1294  *
   1295  * \param [in] unit Unit Number.
   1296  * \param [in] opt Opt type from ltsw_flow_hw_opt_type_t.
   1297  * \param [in-out] info Flow tunnel initiator information.
   1298  *
   1299  * \retval SHR_E_NONE No errors.
   1300  * \retval !SHR_E_NONE Failure.
   1301  */
   1302 extern int
   1303 mbcm_ltsw_flow_tunnel_initiator_hw_opt(
   1304     int unit,
   1305     bcmint_flow_hw_opt_type_t opt,
   1306     bcm_flow_tunnel_initiator_t *info);
   1307 
   1308 /*!
   1309  * \brief Traverse HW table based on tunnel initiator.
   1310  *
   1311  * \param [in] unit Unit Number.
   1312  * \param [in] cb User callback function.
   1313  * \param [in] user_data User context data.
   1314  *
   1315  * \retval SHR_E_NONE No errors.
   1316  * \retval !SHR_E_NONE Failure.
   1317  */
   1318 extern int
   1319 mbcm_ltsw_flow_tunnel_initiator_traverse(
   1320     int unit,
   1321     bcm_flow_tunnel_initiator_traverse_cb cb,
   1322     void *user_data);
   1323 
   1324 /*!
   1325  * \brief Attach counter to the given table.
   1326  *
   1327  * \param [in] unit Unit Number.
   1328  * \param [in] info Flow stat config structure.
   1329  * \param [in] stat_counter_id Stat counter id.
   1330  *
   1331  * \retval SHR_E_NONE No errors.
   1332  * \retval !SHR_E_NONE Failure.
   1333  */
   1334 extern int
   1335 mbcm_ltsw_flow_stat_attach(
   1336     int unit,
   1337     bcm_flow_stat_info_t *info,
   1338     uint32_t stat_counter_id);
   1339 
   1340 /*!
   1341  * \brief Detach counter from the given table.
   1342  *
   1343  * \param [in] unit Unit Number.
   1344  * \param [in] info Flow stat config structure.
   1345  * \param [in] stat_counter_id Stat counter id.
   1346  *
   1347  * \retval SHR_E_NONE No errors.
   1348  * \retval !SHR_E_NONE Failure.
   1349  */
   1350 extern int
   1351 mbcm_ltsw_flow_stat_detach(
   1352     int unit,
   1353     bcm_flow_stat_info_t *info,
   1354     uint32_t stat_counter_id);
   1355 
   1356 /*!
   1357  * \brief Dump device-specific FLOW S/W state.
   1358  *
   1359  * \param [in] unit Unit Number.
   1360  */
   1361 extern void
   1362 mbcm_ltsw_flow_sw_dump(int unit);
   1363 
   1364 /*!
   1365  * \brief Enable/disable EVPN functionality.
   1366  *
   1367  * \param [in] unit Unit Number.
   1368  * \param [in] enable EVPN enable indicator. 0 : Disable EVPN, 1 : Enable EVPN.
   1369  *
   1370  * \retval SHR_E_NONE No errors.
   1371  * \retval !SHR_E_NONE Failure.
   1372  */
   1373 extern int
   1374 mbcm_ltsw_flow_evpn_enable_set(
   1375     int unit,
   1376     int enable);
   1377 
   1378 /*!
   1379  * \brief Get the enable status of EVPN functionality.
   1380  *
   1381  * \param [in] unit Unit Number.
   1382  * \param [in] enable EVPN enable indicator. 0 : EVPN disabled , 1 : EVPN enabled.
   1383  *
   1384  * \retval SHR_E_NONE No errors.
   1385  * \retval !SHR_E_NONE Failure.
   1386  */
   1387 extern int
   1388 mbcm_ltsw_flow_evpn_enable_get(
   1389     int unit,
   1390     int *enable);
   1391 
   1392 /*!
   1393  * \brief Specify general switch behaviors.
   1394  *
   1395  * \param [in] unit Unit Number.
   1396  * \param [in] type The desired configuration parameter to modify.
   1397  * \param [in] arg The value with which to set the parameter.
   1398  *
   1399  * \retval SHR_E_NONE No errors.
   1400  * \retval !SHR_E_NONE Failure.
   1401  */
   1402 extern int
   1403 mbcm_ltsw_flow_switch_control_set(
   1404     int unit,
   1405     bcm_switch_control_t type,
   1406     int arg);
   1407 
   1408 /*!
   1409  * \brief Retrieve general switch behaviors.
   1410  *
   1411  * \param [in] unit Unit Number.
   1412  * \param [in] type The desired configuration parameter to modify.
   1413  * \param [in] arg Pointer to where the retrieved value will be written.
   1414  *
   1415  * \retval SHR_E_NONE No errors.
   1416  * \retval !SHR_E_NONE Failure.
   1417  */
   1418 extern int
   1419 mbcm_ltsw_flow_switch_control_get(
   1420     int unit,
   1421     bcm_switch_control_t type,
   1422     int *arg);
   1423 
   1424 /*!
   1425  * \brief Specify the filter control for the given ethernet segment identifier.
   1426  *
   1427  * \param [in] unit Unit Number.
   1428  * \param [in] flow_port_id GPORT identifier.
   1429  * \param [in] es_id ethernet segment identifier.
   1430  * \param [in] flags BCM_FLOW_ES_FILTER_xxx.
   1431  *
   1432  * \retval SHR_E_NONE No errors.
   1433  * \retval !SHR_E_NONE Failure.
   1434  */
   1435 extern int
   1436 mbcm_ltsw_flow_es_filter_set(
   1437     int unit,
   1438     bcm_gport_t flow_port_id,
   1439     uint32_t es_id,
   1440     uint32_t flags);
   1441 
   1442 /*!
   1443  * \brief Get the filter status for the given ethernet segment identifier.
   1444  *
   1445  * \param [in] unit Unit Number.
   1446  * \param [in] flow_port_id GPORT identifier.
   1447  * \param [in] es_id ethernet segment identifier.
   1448  * \param [in] flags BCM_FLOW_ES_FILTER_xxx.
   1449  *
   1450  * \retval SHR_E_NONE No errors.
   1451  * \retval !SHR_E_NONE Failure.
   1452  */
   1453 extern int
   1454 mbcm_ltsw_flow_es_filter_get(
   1455     int unit,
   1456     bcm_gport_t flow_port_id,
   1457     uint32_t es_id,
   1458     uint32_t *flags);
   1459 
   1460 /*!
   1461  * \brief Set the flex counter object value to the ethernet segment filter.
   1462  *
   1463  * \param [in] unit Unit Number.
   1464  * \param [in] flow_port_id GPORT identifier.
   1465  * \param [in] value The flex counter object value.
   1466  *
   1467  * \retval SHR_E_NONE No errors.
   1468  * \retval !SHR_E_NONE Failure.
   1469  */
   1470 extern int
   1471 mbcm_ltsw_flow_es_filter_flexctr_object_set(
   1472     int unit,
   1473     bcm_gport_t flow_port_id,
   1474     uint32_t value);
   1475 
   1476 /*!
   1477  * \brief Get the flex counter object value from the ethernet segment filter.
   1478  *
   1479  * \param [in] unit Unit Number.
   1480  * \param [in] flow_port_id GPORT identifier.
   1481  * \param [in] value The flex counter object value.
   1482  *
   1483  * \retval SHR_E_NONE No errors.
   1484  * \retval !SHR_E_NONE Failure.
   1485  */
   1486 extern int
   1487 mbcm_ltsw_flow_es_filter_flexctr_object_get(
   1488     int unit,
   1489     bcm_gport_t flow_port_id,
   1490     uint32_t *value);
   1491 
   1492 /*!
   1493  * \brief Attach counter entries to the ethernet segment filter.
   1494  *
   1495  * \param [in] unit Unit Number.
   1496  * \param [in] flow_port_id GPORT identifier.
   1497  * \param [in] stat_counter_id Stat counter ID.
   1498  *
   1499  * \retval SHR_E_NONE No errors.
   1500  * \retval !SHR_E_NONE Failure.
   1501  */
   1502 extern int
   1503 mbcm_ltsw_flow_es_filter_stat_attach(
   1504     int unit,
   1505     bcm_gport_t flow_port_id,
   1506     uint32_t stat_counter_id);
   1507 
   1508 /*!
   1509  * \brief Detach counter entries from the ethernet segment filter.
   1510  *
   1511  * \param [in] unit Unit Number.
   1512  * \param [in] flow_port_id GPORT identifier.
   1513  * \param [in] stat_counter_id Stat counter ID.
   1514  *
   1515  * \retval SHR_E_NONE No errors.
   1516  * \retval !SHR_E_NONE Failure.
   1517  */
   1518 extern int
   1519 mbcm_ltsw_flow_es_filter_stat_detach(
   1520     int unit,
   1521     bcm_gport_t flow_port_id,
   1522     uint32_t stat_counter_id);
   1523 
   1524 /*!
   1525  * \brief Get stat counter id associated from ethernet segment filter.
   1526  *
   1527  * \param [in] unit Unit Number.
   1528  * \param [in] flow_port_id GPORT identifier.
   1529  * \param [in] stat_counter_id Stat counter ID.
   1530  *
   1531  * \retval SHR_E_NONE No errors.
   1532  * \retval !SHR_E_NONE Failure.
   1533  */
   1534 extern int
   1535 mbcm_ltsw_flow_es_filter_stat_id_get(
   1536     int unit,
   1537     bcm_gport_t flow_port_id,
   1538     uint32_t *stat_counter_id);
   1539 
   1540 /*!
   1541  * \brief Attach counter entries to the given flow VPN.
   1542  *
   1543  * \param [in] unit Unit Number.
   1544  * \param [in] vpn VPN Instance.
   1545  * \param [in] stat_counter_id Stat counter ID.
   1546  *
   1547  * \retval SHR_E_NONE No errors.
   1548  * \retval !SHR_E_NONE Failure.
   1549  */
   1550 extern int
   1551 mbcm_ltsw_flow_vpn_stat_attach(
   1552     int unit,
   1553     bcm_vpn_t vpn,
   1554     uint32_t stat_counter_id);
   1555 
   1556 /*!
   1557  * \brief Detach counter entries from the given flow VPN.
   1558  *
   1559  * \param [in] unit Unit Number.
   1560  * \param [in] vpn VPN Instance.
   1561  * \param [in] stat_counter_id Stat counter ID.
   1562  *
   1563  * \retval SHR_E_NONE No errors.
   1564  * \retval !SHR_E_NONE Failure.
   1565  */
   1566 extern int
   1567 mbcm_ltsw_flow_vpn_stat_detach(
   1568     int unit,
   1569     bcm_vpn_t vpn,
   1570     uint32_t stat_counter_id);
   1571 
   1572 /*!
   1573  * \brief Get stat counter ID associated to the given flow VPN.
   1574  *
   1575  * \param [in] unit Unit Number.
   1576  * \param [in] vpn VPN Instance.
   1577  * \param [in] direction Direction.
   1578  * \param [in] stat_counter_id Stat counter ID.
   1579  *
   1580  * \retval SHR_E_NONE No errors.
   1581  * \retval !SHR_E_NONE Failure.
   1582  */
   1583 extern int
   1584 mbcm_ltsw_flow_vpn_stat_id_get(
   1585     int unit,
   1586     bcm_vpn_t vpn,
   1587     bcm_flexctr_direction_t direction,
   1588     uint32_t *stat_counter_id);
   1589 
   1590 /*!
   1591  * \brief Attach counter entries to the given flow port.
   1592  *
   1593  * \param [in] unit Unit Number.
   1594  * \param [in] flow_port_id GPORT identifier.
   1595  * \param [in] stat_counter_id Stat counter ID.
   1596  *
   1597  * \retval SHR_E_NONE No errors.
   1598  * \retval !SHR_E_NONE Failure.
   1599  */
   1600 extern int
   1601 mbcm_ltsw_flow_port_stat_attach(
   1602     int unit,
   1603     bcm_gport_t flow_port_id,
   1604     uint32_t stat_counter_id);
   1605 
   1606 /*!
   1607  * \brief Detach counter entries from the given flow port.
   1608  *
   1609  * \param [in] unit Unit Number.
   1610  * \param [in] flow_port_id GPORT identifier.
   1611  * \param [in] stat_counter_id Stat counter ID.
   1612  *
   1613  * \retval SHR_E_NONE No errors.
   1614  * \retval !SHR_E_NONE Failure.
   1615  */
   1616 extern int
   1617 mbcm_ltsw_flow_port_stat_detach(
   1618     int unit,
   1619     bcm_gport_t flow_port_id,
   1620     uint32_t stat_counter_id);
   1621 
   1622 /*!
   1623  * \brief Get stat counter ID associated to the given flow port.
   1624  *
   1625  * \param [in] unit Unit Number.
   1626  * \param [in] flow_port_id GPORT identifier.
   1627  * \param [in] direction Direction.
   1628  * \param [in] stat_counter_id Stat counter ID.
   1629  *
   1630  * \retval SHR_E_NONE No errors.
   1631  * \retval !SHR_E_NONE Failure.
   1632  */
   1633 extern int
   1634 mbcm_ltsw_flow_port_stat_id_get(
   1635     int unit,
   1636     bcm_gport_t flow_port_id,
   1637     bcm_flexctr_direction_t direction,
   1638     uint32_t *stat_counter_id);
   1639 
   1640 /*!
   1641  * \brief Attach counter entries to the flow tunnel initiator.
   1642  *
   1643  * \param [in] unit Unit Number.
   1644  * \param [in] tunnel_id Flow tunnel initiator object ID.
   1645  * \param [in] stat_counter_id Stat counter ID.
   1646  *
   1647  * \retval SHR_E_NONE No errors.
   1648  * \retval !SHR_E_NONE Failure.
   1649  */
   1650 extern int
   1651 mbcm_ltsw_flow_tunnel_initiator_stat_attach(
   1652     int unit,
   1653     bcm_gport_t tunnel_id,
   1654     uint32_t stat_counter_id);
   1655 
   1656 /*!
   1657  * \brief Detach counter entries from the flow tunnel initiator.
   1658  *
   1659  * \param [in] unit Unit Number.
   1660  * \param [in] tunnel_id Flow tunnel initiator object ID.
   1661  * \param [in] stat_counter_id Stat counter ID.
   1662  *
   1663  * \retval SHR_E_NONE No errors.
   1664  * \retval !SHR_E_NONE Failure.
   1665  */
   1666 extern int
   1667 mbcm_ltsw_flow_tunnel_initiator_stat_detach(
   1668     int unit,
   1669     bcm_gport_t tunnel_id,
   1670     uint32_t stat_counter_id);
   1671 
   1672 /*!
   1673  * \brief Get stat counter ID associated to the flow tunnel initiator.
   1674  *
   1675  * \param [in] unit Unit Number.
   1676  * \param [in] tunnel_id Flow tunnel initiator object ID.
   1677  * \param [in] stat_counter_id Stat counter ID.
   1678  *
   1679  * \retval SHR_E_NONE No errors.
   1680  * \retval !SHR_E_NONE Failure.
   1681  */
   1682 extern int
   1683 mbcm_ltsw_flow_tunnel_initiator_stat_id_get(
   1684     int unit,
   1685     bcm_gport_t tunnel_id,
   1686     uint32_t *stat_counter_id);
   1687 
   1688 /*!
   1689  * \brief Set the flex counter object value to the encap entry.
   1690  *
   1691  * \param [in] unit Unit Number.
   1692  * \param [in] info Flow encap information.
   1693  * \param [in] value The flex counter object value.
   1694  *
   1695  * \retval SHR_E_NONE No errors.
   1696  * \retval !SHR_E_NONE Failure.
   1697  */
   1698 extern int
   1699 mbcm_ltsw_flow_encap_flexctr_object_set(
   1700     int unit,
   1701     bcm_flow_encap_config_t *info,
   1702     uint32_t value);
   1703 
   1704 /*!
   1705  * \brief Get the flex counter object value from the encap entry.
   1706  *
   1707  * \param [in] unit Unit Number.
   1708  * \param [in] info Flow encap information.
   1709  * \param [in] value The flex counter object value.
   1710  *
   1711  * \retval SHR_E_NONE No errors.
   1712  * \retval !SHR_E_NONE Failure.
   1713  */
   1714 extern int
   1715 mbcm_ltsw_flow_encap_flexctr_object_get(
   1716     int unit,
   1717     bcm_flow_encap_config_t *info,
   1718     uint32_t *value);
   1719 
   1720 /*!
   1721  * \brief Attach counter entries to the encap entry.
   1722  *
   1723  * \param [in] unit Unit Number.
   1724  * \param [in] info Flow encap information.
   1725  * \param [in] num_of_fields Number of logical fields.
   1726  * \param [in] field Logical field array.
   1727  * \param [in] stat_counter_id Stat counter ID.
   1728  *
   1729  * \retval SHR_E_NONE No errors.
   1730  * \retval !SHR_E_NONE Failure.
   1731  */
   1732 extern int
   1733 mbcm_ltsw_flow_encap_stat_attach(
   1734     int unit,
   1735     bcm_flow_encap_config_t *info,
   1736     uint32_t num_of_fields,
   1737     bcm_flow_logical_field_t *field,
   1738     uint32_t stat_counter_id);
   1739 
   1740 /*!
   1741  * \brief Detach the counter entries from the encap entry.
   1742  *
   1743  * \param [in] unit Unit Number.
   1744  * \param [in] info Flow encap information.
   1745  * \param [in] num_of_fields Number of logical fields.
   1746  * \param [in] field Logical field array.
   1747  * \param [in] stat_counter_id Stat counter ID.
   1748  *
   1749  * \retval SHR_E_NONE No errors.
   1750  * \retval !SHR_E_NONE Failure.
   1751  */
   1752 extern int
   1753 mbcm_ltsw_flow_encap_stat_detach(
   1754     int unit,
   1755     bcm_flow_encap_config_t *info,
   1756     uint32_t num_of_fields,
   1757     bcm_flow_logical_field_t *field,
   1758     uint32_t stat_counter_id);
   1759 
   1760 /*!
   1761  * \brief Get stat counter ID associated to the encap entry.
   1762  *
   1763  * \param [in] unit Unit Number.
   1764  * \param [in] info Flow encap information.
   1765  * \param [in] num_of_fields Number of logical fields.
   1766  * \param [in] field Logical field array.
   1767  * \param [in] stat_counter_id Stat counter ID.
   1768  *
   1769  * \retval SHR_E_NONE No errors.
   1770  * \retval !SHR_E_NONE Failure.
   1771  */
   1772 extern int
   1773 mbcm_ltsw_flow_encap_stat_id_get(
   1774     int unit,
   1775     bcm_flow_encap_config_t *info,
   1776     uint32_t num_of_fields,
   1777     bcm_flow_logical_field_t *field,
   1778     uint32_t *stat_counter_id);
   1779 
   1780 /*!
   1781  * \brief Set the flex counter object value to the given match entry.
   1782  *
   1783  * \param [in] unit Unit Number.
   1784  * \param [in] info Flow match information.
   1785  * \param [in] value The flex counter object value.
   1786  *
   1787  * \retval SHR_E_NONE No errors.
   1788  * \retval !SHR_E_NONE Failure.
   1789  */
   1790 extern int
   1791 mbcm_ltsw_flow_match_flexctr_object_set(
   1792     int unit,
   1793     bcm_flow_match_config_t *info,
   1794     uint32_t value);
   1795 
   1796 /*!
   1797  * \brief Get the flex counter object value from the given match entry.
   1798  *
   1799  * \param [in] unit Unit Number.
   1800  * \param [in] info Flow match information.
   1801  * \param [in] value The flex counter object value.
   1802  *
   1803  * \retval SHR_E_NONE No errors.
   1804  * \retval !SHR_E_NONE Failure.
   1805  */
   1806 extern int
   1807 mbcm_ltsw_flow_match_flexctr_object_get(
   1808     int unit,
   1809     bcm_flow_match_config_t *info,
   1810     uint32_t *value);
   1811 
   1812 /*!
   1813  * \brief Attach counter entries to the given match entry.
   1814  *
   1815  * \param [in] unit Unit Number.
   1816  * \param [in] info Flow match information.
   1817  * \param [in] num_of_fields Number of logical fields.
   1818  * \param [in] field Logical field array.
   1819  * \param [in] stat_counter_id Stat counter ID.
   1820  *
   1821  * \retval SHR_E_NONE No errors.
   1822  * \retval !SHR_E_NONE Failure.
   1823  */
   1824 extern int
   1825 mbcm_ltsw_flow_match_stat_attach(
   1826     int unit,
   1827     bcm_flow_match_config_t *info,
   1828     uint32_t num_of_fields,
   1829     bcm_flow_logical_field_t *field,
   1830     uint32_t stat_counter_id);
   1831 
   1832 /*!
   1833  * \brief Detach counter entries from the given match entry.
   1834  *
   1835  * \param [in] unit Unit Number.
   1836  * \param [in] info Flow match information.
   1837  * \param [in] num_of_fields Number of logical fields.
   1838  * \param [in] field Logical field array.
   1839  * \param [in] stat_counter_id Stat counter ID.
   1840  *
   1841  * \retval SHR_E_NONE No errors.
   1842  * \retval !SHR_E_NONE Failure.
   1843  */
   1844 extern int
   1845 mbcm_ltsw_flow_match_stat_detach(
   1846     int unit,
   1847     bcm_flow_match_config_t *info,
   1848     uint32_t num_of_fields,
   1849     bcm_flow_logical_field_t *field,
   1850     uint32_t stat_counter_id);
   1851 
   1852 /*!
   1853  * \brief Get stat counter ID associated to the given match entry.
   1854  *
   1855  * \param [in] unit Unit Number.
   1856  * \param [in] info Flow match information.
   1857  * \param [in] num_of_fields Number of logical fields.
   1858  * \param [in] field Logical field array.
   1859  * \param [in] stat_counter_id Stat counter ID.
   1860  *
   1861  * \retval SHR_E_NONE No errors.
   1862  * \retval !SHR_E_NONE Failure.
   1863  */
   1864 extern int
   1865 mbcm_ltsw_flow_match_stat_id_get(
   1866     int unit,
   1867     bcm_flow_match_config_t *info,
   1868     uint32_t num_of_fields,
   1869     bcm_flow_logical_field_t *field,
   1870     uint32_t *stat_counter_id);
   1871 
   1872 /*!
   1873  * \brief Set the flex counter object value to the flow tunnel terminator object.
   1874  *
   1875  * \param [in] unit Unit Number.
   1876  * \param [in] info Flow tunnel terminator information.
   1877  * \param [in] value The flex counter object value.
   1878  *
   1879  * \retval SHR_E_NONE No errors.
   1880  * \retval !SHR_E_NONE Failure.
   1881  */
   1882 extern int
   1883 mbcm_ltsw_flow_tunnel_terminator_flexctr_object_set(
   1884     int unit,
   1885     bcm_flow_tunnel_terminator_t *info,
   1886     uint32_t value);
   1887 
   1888 /*!
   1889  * \brief Get the flex counter object value from the flow tunnel terminator object.
   1890  *
   1891  * \param [in] unit Unit Number.
   1892  * \param [in] info Flow tunnel terminator information.
   1893  * \param [in] value The flex counter object value.
   1894  *
   1895  * \retval SHR_E_NONE No errors.
   1896  * \retval !SHR_E_NONE Failure.
   1897  */
   1898 extern int
   1899 mbcm_ltsw_flow_tunnel_terminator_flexctr_object_get(
   1900     int unit,
   1901     bcm_flow_tunnel_terminator_t *info,
   1902     uint32_t *value);
   1903 
   1904 /*!
   1905  * \brief Attach counter entries to the flow tunnel terminator object.
   1906  *
   1907  * \param [in] unit Unit Number.
   1908  * \param [in] info Flow tunnel terminator information.
   1909  * \param [in] num_of_fields Number of logical fields.
   1910  * \param [in] field Logical field array.
   1911  * \param [in] stat_counter_id Stat counter ID.
   1912  *
   1913  * \retval SHR_E_NONE No errors.
   1914  * \retval !SHR_E_NONE Failure.
   1915  */
   1916 extern int
   1917 mbcm_ltsw_flow_tunnel_terminator_stat_attach(
   1918     int unit,
   1919     bcm_flow_tunnel_terminator_t *info,
   1920     uint32_t num_of_fields,
   1921     bcm_flow_logical_field_t *field,
   1922     uint32_t stat_counter_id);
   1923 
   1924 /*!
   1925  * \brief Detach counter entries from the flow tunnel terminator object.
   1926  *
   1927  * \param [in] unit Unit Number.
   1928  * \param [in] info Flow tunnel terminator information.
   1929  * \param [in] num_of_fields Number of logical fields.
   1930  * \param [in] field Logical field array.
   1931  * \param [in] stat_counter_id Stat counter ID.
   1932  *
   1933  * \retval SHR_E_NONE No errors.
   1934  * \retval !SHR_E_NONE Failure.
   1935  */
   1936 extern int
   1937 mbcm_ltsw_flow_tunnel_terminator_stat_detach(
   1938     int unit,
   1939     bcm_flow_tunnel_terminator_t *info,
   1940     uint32_t num_of_fields,
   1941     bcm_flow_logical_field_t *field,
   1942     uint32_t stat_counter_id);
   1943 
   1944 /*!
   1945  * \brief Get stat counter ID associated to the flow tunnel terminator object.
   1946  *
   1947  * \param [in] unit Unit Number.
   1948  * \param [in] info Flow tunnel terminator information.
   1949  * \param [in] num_of_fields Number of logical fields.
   1950  * \param [in] field Logical field array.
   1951  * \param [in] stat_counter_id Stat counter ID.
   1952  *
   1953  * \retval SHR_E_NONE No errors.
   1954  * \retval !SHR_E_NONE Failure.
   1955  */
   1956 extern int
   1957 mbcm_ltsw_flow_tunnel_terminator_stat_id_get(
   1958     int unit,
   1959     bcm_flow_tunnel_terminator_t *info,
   1960     uint32_t num_of_fields,
   1961     bcm_flow_logical_field_t *field,
   1962     uint32_t *stat_counter_id);
   1963 
   1964 #endif /* BCMINT_LTSW_MBCM_FLOW_H */