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

cosq_stat.h (1802B)


      1 /*
      2  * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file.
      3  * 
      4  * Copyright 2007-2020 Broadcom Inc. All rights reserved.
      5  */
      6 /*
      7  * ! \file bcm_int/dnx/cosq/cosq_stat.h
      8  * Reserved.$ 
      9  */
     10 
     11 #ifndef _DNX_COSQ_STAT_H_INCLUDED_
     12 /*
     13  * { 
     14  */
     15 #define _DNX_COSQ_STAT_H_INCLUDED_
     16 
     17 #ifndef BCM_DNX_SUPPORT
     18 #error "This file is for use by DNX (JR2) family only!"
     19 #endif
     20 
     21 #include <bcm/cosq.h>
     22 
     23 /*
     24  * Defines
     25  * {
     26  */
     27 
     28 /*
     29  * }
     30  */
     31 
     32 /**
     33 * \brief
     34 *   init the cosq stat configuration. set the range of itm queues to the maximum range
     35 * \param [in] unit -unit id
     36 * \param [in] itm_nof_commands -number of crps commands id that relevant for ingress itm
     37 * \return
     38 *    shr_error_e
     39 * \remark
     40 *   symetric core configuration
     41 * \see
     42 *   NONE
     43 */
     44 shr_error_e dnx_cosq_stat_config_init(
     45     int unit,
     46     int itm_nof_commands);
     47 
     48 /**
     49 * \brief
     50 *   Configure if to enable drop per DP.
     51 *   Drop is neing made by trap mechanism.
     52 *   This API just enable the trap mechanism that may drop packets with that DP.
     53 *   In order to complete the drop configuration, one need to configure egress policer trap (enum: bcmRxTrapEgTxMetering)
     54 * \param [in] unit        - unit id
     55 * \param [in] flags
     56 * \return
     57 *   shr_error_e - Error Type
     58 * \remark
     59 * 
     60 * \see
     61 *   * None
     62 */
     63 shr_error_e dnx_cosq_stat_discard_egress_meter_set(
     64     int unit,
     65     uint32 flags);
     66 
     67 /**
     68 * \brief
     69 *   get from HW which DP drop is enabled and update the flags accordigly.
     70 * \param [in] unit        - unit id
     71 * \param [out] flags - flag BCM_COSQ_DISCARD_EGRESS is in, all others- out.
     72 * \return
     73 *   shr_error_e - Error Type
     74 * \remark
     75 * 
     76 * \see
     77 *   * None
     78 */
     79 shr_error_e dnx_cosq_stat_discard_egress_meter_get(
     80     int unit,
     81     uint32 *flags);
     82 
     83 /** } */
     84 #endif /*_DNX_COSQ_STAT_H_INCLUDED_*/