]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_trap: Introduce dummy group with thin policer
authorJiri Pirko <jiri@mellanox.com>
Mon, 24 Feb 2020 07:35:54 +0000 (08:35 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 24 Feb 2020 19:55:07 +0000 (11:55 -0800)
commit2148dd33563e178fd4431bde3b2bb808f7c1010a
tree549c09a3296cba71f19249254f27195a8a23901a
parent52a466c563d4abbd3ff24b428cc36e8ff63da3e6
mlxsw: spectrum_trap: Introduce dummy group with thin policer

For "source traps" it is not possible to change HPKT action to discard.
But there is still need to disallow packets arriving to CPU as much as
possible. Handle this by introduction of a "dummy group". It has a
"thin" policer, which passes as less packets to CPU as possible. The
rest is going to be discarded there. The "dummy group" is to be used
later on by ACL trap (which is a "source trap").

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/reg.h
drivers/net/ethernet/mellanox/mlxsw/spectrum_trap.c