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

diag_dnx_l2.h (2745B)


      1 /*! \file diag_dnx_l2.h
      2  * Purpose: External declarations for command functions and
      3  *          their associated usage strings.
      4  */
      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 DIAG_DNX_L2_H_INCLUDED
     12 #define DIAG_DNX_L2_H_INCLUDED
     13 
     14 /*************
     15  * INCLUDES  *
     16  */
     17 
     18 /*************
     19  *  DEFINES  *
     20  */
     21 #define         L2_LEARN_CALLBACK_ACTIVE        0x1
     22 #define         L2_LEARN_CALLBACK_LOGGER        0x2
     23 #define         L2_LEARN_COUNTER_ONLY           0x4
     24 
     25 /*************
     26  *  MACROES  *
     27  */
     28 
     29 /*************
     30  * GLOBALS   *
     31  */
     32 extern sh_sand_man_t sh_dnx_l2_man;
     33 extern sh_sand_cmd_t sh_dnx_l2_cmds[];
     34 
     35 /*************
     36  * FUNCTIONS *
     37  */
     38 /**
     39  * \brief
     40  *  This routine return entry count in MACT
     41  * \param [in] unit               -    Device ID
     42  * \param [in] l2_entry_counter_p -    Pointer to place were counter will returned on success
     43  * \return
     44  *   shr_error_e - Error Type
     45  * \remark
     46  *
     47  * \see
     48  */
     49 shr_error_e sh_dnx_l2_get_mact_count(
     50     int unit,
     51     uint32 *l2_entry_counter_p);
     52 
     53 /**
     54  * \brief
     55  *  This routine return entry count in MACT per vsi
     56  * \param [in] unit               -    Device ID
     57  * \param [in] vsi                -    vsi id
     58  * \param [in] l2_entry_counter_p -    Pointer to place were counter will returned on success
     59  * \return
     60  *   shr_error_e - Error Type
     61  * \remark
     62  *
     63  * \see
     64  */
     65 shr_error_e sh_dnx_l2_get_mact_vsi_count(
     66     int unit,
     67     int vsi,
     68     uint32 *l2_entry_counter_p);
     69 
     70 /**
     71  * \brief
     72  *  This routine return entry count in MACT per vsi
     73  * \param [in] unit               -    Device ID
     74  * \param [in] gport              -    encoded gport with inlif inside
     75  * \param [in] l2_entry_counter_p -    Pointer to place were counter will returned on success
     76  * \return
     77  *   shr_error_e - Error Type
     78  * \remark
     79  *
     80  * \see
     81  */
     82 shr_error_e sh_dnx_l2_get_mact_inlif_count(
     83     int unit,
     84     bcm_gport_t gport,
     85     uint32 *l2_entry_counter_p);
     86 
     87 /**
     88  * \brief
     89  *  This routine return vsi existence status
     90  * \param [in] unit               -    Device ID
     91  * \param [in] vsi                -    vsi id
     92  * \return
     93  *   shr_error_e - _SHR_E_NONE - if vsi exists
     94  *                 _SHR_E_NOT_FOUND - if not
     95  * \remark
     96  *
     97  * \see
     98  */
     99 shr_error_e sh_dnx_l2_vsi_exists(
    100     int unit,
    101     bcm_vlan_t vsi);
    102 
    103 /**
    104  * \brief
    105  *  This routine clear all entries from MACT
    106  * \param [in] unit              -    Device ID
    107  * \param [in] svl               -    If is TRUE delete entire SVL table
    108  * \return
    109  *   shr_error_e - Error Type
    110  * \remark
    111  *
    112  * \see
    113  */
    114 shr_error_e sh_dnx_l2_clear_all(
    115     int unit,
    116     int svl);
    117 
    118 #endif /** DIAG_DNX_L2_H_INCLUDED */