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

preemption_cnt.h (2655B)


      1 /*
      2  * 
      3  * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file.
      4  * 
      5  * Copyright 2007-2019 Broadcom Inc. All rights reserved.
      6  */
      7 #ifndef _BCM_INT_PREEMPTION_CTR_H_
      8 #define _BCM_INT_PREEMPTION_CTR_H_
      9 #include <bcm/port.h>
     10 #include <sal/core/sync.h>
     11 
     12 #if defined(BCM_PREEMPTION_SUPPORT)
     13 /* device-specific function */
     14 typedef struct bcmi_preemption_counte_func_s {
     15     int (*preemption_counter_init) (int);
     16     int (*preemption_counter_clean) (int);
     17     int (*preemption_counter_get)(int, int, bcm_port_t,
     18                                   bcm_port_stat_t, uint64*);
     19     int (*preemption_counter_set)(int, bcm_port_t,
     20                                   bcm_port_stat_t, uint64);
     21 } bcmi_preemption_counte_func_t;
     22 
     23 extern int
     24 bcmi_esw_preemption_counter_set(int unit, bcm_port_t local_port,
     25                                 bcm_port_stat_t stat, uint64 val);
     26 extern int
     27 bcmi_esw_preemption_counter_set32(int unit, bcm_port_t local_port,
     28                                   bcm_port_stat_t stat, uint32 val);
     29 extern int
     30 bcmi_esw_preemption_counter_multi_set(int unit,
     31                                       bcm_port_t local_port, int nstat,
     32                                       bcm_port_stat_t *stat_arr,
     33                                       uint64 *value_arr);
     34 extern int
     35 bcmi_esw_preemption_counter_multi_set32(int unit,
     36                                         bcm_port_t local_port, int nstat,
     37                                         bcm_port_stat_t *stat_arr,
     38                                         uint32 *value_arr);
     39 extern int
     40 bcmi_esw_preemption_counter_get(int unit, int sync_mode, bcm_port_t local_port,
     41                                 bcm_port_stat_t stat, uint64 *val);
     42 extern int
     43 bcmi_esw_preemption_counter_get32(int unit, int sync_mode, bcm_port_t local_port,
     44                                   bcm_port_stat_t stat, uint32 *val);
     45 extern int
     46 bcmi_esw_preemption_counter_multi_get(int unit, int sync_mode,
     47                                       bcm_port_t local_port, int nstat,
     48                                       bcm_port_stat_t *stat_arr,
     49                                       uint64 *value_arr);
     50 extern int
     51 bcmi_esw_preemption_counter_multi_get32(int unit, int sync_mode,
     52                                         bcm_port_t local_port, int nstat,
     53                                         bcm_port_stat_t *stat_arr,
     54                                         uint32 *value_arr);
     55 extern int
     56 bcmi_esw_preemption_counter_init(int unit);
     57 extern int
     58 bcmi_esw_preemption_counter_cleanup(int unit);
     59 
     60 #endif /* BCM_PREEMPTION_SUPPORT */
     61 #endif /* !_BCM_INT_PREEMPTION_CTR_H_ */
     62