Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */
0002 /* Copyright (c) 2017-2018 Mellanox Technologies. All rights reserved */
0003 
0004 #ifndef _MLXSW_SPECTRUM_CNT_H
0005 #define _MLXSW_SPECTRUM_CNT_H
0006 
0007 #include "core.h"
0008 #include "spectrum.h"
0009 
0010 enum mlxsw_sp_counter_sub_pool_id {
0011     MLXSW_SP_COUNTER_SUB_POOL_RIF,
0012     MLXSW_SP_COUNTER_SUB_POOL_FLOW,
0013 };
0014 
0015 int mlxsw_sp_counter_alloc(struct mlxsw_sp *mlxsw_sp,
0016                enum mlxsw_sp_counter_sub_pool_id sub_pool_id,
0017                unsigned int *p_counter_index);
0018 void mlxsw_sp_counter_free(struct mlxsw_sp *mlxsw_sp,
0019                enum mlxsw_sp_counter_sub_pool_id sub_pool_id,
0020                unsigned int counter_index);
0021 int mlxsw_sp_counter_pool_init(struct mlxsw_sp *mlxsw_sp);
0022 void mlxsw_sp_counter_pool_fini(struct mlxsw_sp *mlxsw_sp);
0023 int mlxsw_sp_counter_resources_register(struct mlxsw_core *mlxsw_core);
0024 
0025 #endif