1 /* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */
2 /* Copyright (c) 2020 Mellanox Technologies. All rights reserved */
3 
4 #ifndef _MLXSW_SPECTRUM_TRAP_H
5 #define _MLXSW_SPECTRUM_TRAP_H
6 
7 #include <linux/list.h>
8 #include <net/devlink.h>
9 
10 struct mlxsw_sp_trap {
11 	struct mlxsw_sp_trap_policer_item *policer_items_arr;
12 	u64 policers_count; /* Number of registered policers */
13 
14 	struct mlxsw_sp_trap_group_item *group_items_arr;
15 	u64 groups_count; /* Number of registered groups */
16 
17 	struct mlxsw_sp_trap_item *trap_items_arr;
18 	u64 traps_count; /* Number of registered traps */
19 
20 	u16 thin_policer_hw_id;
21 
22 	u64 max_policers;
23 	unsigned long policers_usage[]; /* Usage bitmap */
24 };
25 
26 #endif
27