#include <linux/kernel.h>
#include <linux/bitops.h>
#include <linux/spinlock.h>
#include "spectrum_cnt.h"
struct mlxsw_sp_counter_sub_pool { … };
struct mlxsw_sp_counter_pool { … };
static const struct mlxsw_sp_counter_sub_pool mlxsw_sp_counter_sub_pools[] = …;
static u64 mlxsw_sp_counter_sub_pool_occ_get(void *priv)
{ … }
static int mlxsw_sp_counter_sub_pools_init(struct mlxsw_sp *mlxsw_sp)
{ … }
static void mlxsw_sp_counter_sub_pools_fini(struct mlxsw_sp *mlxsw_sp)
{ … }
static u64 mlxsw_sp_counter_pool_occ_get(void *priv)
{ … }
int mlxsw_sp_counter_pool_init(struct mlxsw_sp *mlxsw_sp)
{ … }
void mlxsw_sp_counter_pool_fini(struct mlxsw_sp *mlxsw_sp)
{ … }
int mlxsw_sp_counter_alloc(struct mlxsw_sp *mlxsw_sp,
enum mlxsw_sp_counter_sub_pool_id sub_pool_id,
unsigned int *p_counter_index)
{ … }
void mlxsw_sp_counter_free(struct mlxsw_sp *mlxsw_sp,
enum mlxsw_sp_counter_sub_pool_id sub_pool_id,
unsigned int counter_index)
{ … }
int mlxsw_sp_counter_resources_register(struct mlxsw_core *mlxsw_core)
{ … }