]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_policer: Add policer core
authorIdo Schimmel <idosch@mellanox.com>
Wed, 15 Jul 2020 08:27:25 +0000 (11:27 +0300)
committerJakub Kicinski <kuba@kernel.org>
Thu, 16 Jul 2020 01:10:00 +0000 (18:10 -0700)
commit5b4f89646935985192b674cb64cc9ddd37fc0c0e
tree9d83237d11816589bea3ba87fe3bbde6d91292a1
parent1e3da3068c5ae3740b346989a5e89c7156baa532
mlxsw: spectrum_policer: Add policer core

Add common code to handle all policer-related functionality in mlxsw.
Currently, only policer for policy engines are supported, but it in the
future more policer families will be added such as CPU (trap) policers
and storm control policers.

The API allows different modules to add / delete policers and read their
drop counter.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Reviewed-by: Petr Machata <petrm@mellanox.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlxsw/Makefile
drivers/net/ethernet/mellanox/mlxsw/spectrum.c
drivers/net/ethernet/mellanox/mlxsw/spectrum.h
drivers/net/ethernet/mellanox/mlxsw/spectrum_policer.c [new file with mode: 0644]