18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */
28c2ecf20Sopenharmony_ci/* Copyright (c) 2017-2018 Mellanox Technologies. All rights reserved */
38c2ecf20Sopenharmony_ci
48c2ecf20Sopenharmony_ci#ifndef _MLXSW_SPECTRUM_CNT_H
58c2ecf20Sopenharmony_ci#define _MLXSW_SPECTRUM_CNT_H
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_ci#include "core.h"
88c2ecf20Sopenharmony_ci#include "spectrum.h"
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_cienum mlxsw_sp_counter_sub_pool_id {
118c2ecf20Sopenharmony_ci	MLXSW_SP_COUNTER_SUB_POOL_RIF,
128c2ecf20Sopenharmony_ci	MLXSW_SP_COUNTER_SUB_POOL_FLOW,
138c2ecf20Sopenharmony_ci};
148c2ecf20Sopenharmony_ci
158c2ecf20Sopenharmony_ciint mlxsw_sp_counter_alloc(struct mlxsw_sp *mlxsw_sp,
168c2ecf20Sopenharmony_ci			   enum mlxsw_sp_counter_sub_pool_id sub_pool_id,
178c2ecf20Sopenharmony_ci			   unsigned int *p_counter_index);
188c2ecf20Sopenharmony_civoid mlxsw_sp_counter_free(struct mlxsw_sp *mlxsw_sp,
198c2ecf20Sopenharmony_ci			   enum mlxsw_sp_counter_sub_pool_id sub_pool_id,
208c2ecf20Sopenharmony_ci			   unsigned int counter_index);
218c2ecf20Sopenharmony_ciint mlxsw_sp_counter_pool_init(struct mlxsw_sp *mlxsw_sp);
228c2ecf20Sopenharmony_civoid mlxsw_sp_counter_pool_fini(struct mlxsw_sp *mlxsw_sp);
238c2ecf20Sopenharmony_ciint mlxsw_sp_counter_resources_register(struct mlxsw_core *mlxsw_core);
248c2ecf20Sopenharmony_ci
258c2ecf20Sopenharmony_ci#endif
26