Lines Matching refs:sub_pool

50 	struct mlxsw_sp_counter_sub_pool *sub_pool;  in mlxsw_sp_counter_sub_pools_prepare()  local
53 sub_pool = &mlxsw_sp_counter_sub_pools[MLXSW_SP_COUNTER_SUB_POOL_FLOW]; in mlxsw_sp_counter_sub_pools_prepare()
56 sub_pool->entry_size = MLXSW_CORE_RES_GET(mlxsw_sp->core, in mlxsw_sp_counter_sub_pools_prepare()
59 sub_pool = &mlxsw_sp_counter_sub_pools[MLXSW_SP_COUNTER_SUB_POOL_RIF]; in mlxsw_sp_counter_sub_pools_prepare()
62 sub_pool->entry_size = MLXSW_CORE_RES_GET(mlxsw_sp->core, in mlxsw_sp_counter_sub_pools_prepare()
69 struct mlxsw_sp_counter_sub_pool *sub_pool; in mlxsw_sp_counter_pool_init() local
106 sub_pool = &pool->sub_pools[i]; in mlxsw_sp_counter_pool_init()
107 sub_pool->size = sub_pool->bank_count * in mlxsw_sp_counter_pool_init()
109 sub_pool->base_index = base_index; in mlxsw_sp_counter_pool_init()
110 base_index += sub_pool->size; in mlxsw_sp_counter_pool_init()
112 if (sub_pool->base_index + sub_pool->size > pool->pool_size) in mlxsw_sp_counter_pool_init()
113 sub_pool->size = pool->pool_size - sub_pool->base_index; in mlxsw_sp_counter_pool_init()
139 struct mlxsw_sp_counter_sub_pool *sub_pool; in mlxsw_sp_counter_alloc() local
144 sub_pool = &mlxsw_sp_counter_sub_pools[sub_pool_id]; in mlxsw_sp_counter_alloc()
145 stop_index = sub_pool->base_index + sub_pool->size; in mlxsw_sp_counter_alloc()
146 entry_index = sub_pool->base_index; in mlxsw_sp_counter_alloc()
154 if (entry_index + sub_pool->entry_size > stop_index) in mlxsw_sp_counter_alloc()
156 for (i = 0; i < sub_pool->entry_size; i++) in mlxsw_sp_counter_alloc()
168 struct mlxsw_sp_counter_sub_pool *sub_pool; in mlxsw_sp_counter_free() local
173 sub_pool = &mlxsw_sp_counter_sub_pools[sub_pool_id]; in mlxsw_sp_counter_free()
174 for (i = 0; i < sub_pool->entry_size; i++) in mlxsw_sp_counter_free()