diff options
author | Ido Schimmel <idosch@mellanox.com> | 2020-03-30 22:38:27 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-03-30 17:54:59 -0700 |
commit | 4561705b174314876c5fa9a8696f26dcdd9542f7 (patch) | |
tree | 55c09734e5a5b54918999c2cfdec87b5b4eefbd9 /drivers/net/ethernet/mellanox/mlxsw/spectrum_trap.h | |
parent | mlxsw: spectrum: Track used packet trap policer IDs (diff) | |
download | linux-dev-4561705b174314876c5fa9a8696f26dcdd9542f7.tar.xz linux-dev-4561705b174314876c5fa9a8696f26dcdd9542f7.zip |
mlxsw: spectrum_trap: Prepare policers for registration with devlink
Prepare an array of policer IDs to register with devlink and their
associated parameters.
The array is composed from both policers that are currently bound to
exposed trap groups and policers that are not bound to any trap group.
v2:
* Provide max/min rate/burst size when registering policers
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlxsw/spectrum_trap.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_trap.h b/drivers/net/ethernet/mellanox/mlxsw/spectrum_trap.h index 12c5641b2165..05bb652b1a76 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_trap.h +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_trap.h @@ -4,7 +4,11 @@ #ifndef _MLXSW_SPECTRUM_TRAP_H #define _MLXSW_SPECTRUM_TRAP_H +#include <net/devlink.h> + struct mlxsw_sp_trap { + struct devlink_trap_policer *policers_arr; /* Registered policers */ + u64 policers_count; /* Number of registered policers */ u64 max_policers; unsigned long policers_usage[]; /* Usage bitmap */ }; |