]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum: Add devlink-trap support
authorIdo Schimmel <idosch@mellanox.com>
Wed, 21 Aug 2019 07:19:35 +0000 (10:19 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 21 Aug 2019 19:58:39 +0000 (12:58 -0700)
commit1d5c889531eea6eaa916b5ff66bfdf05d6ecada0
treec2d509cd6028619e4660aeb4811f1e49c1df56d3
parentcb000fa1eecceb6db515a3b83dcc9d94cb36102e
mlxsw: spectrum: Add devlink-trap support

Register supported packet traps (layer 2 drops only, currently) and
associated trap group with devlink during driver initialization.

The amount of traffic generated by these packet drop traps is capped at
10Kpps to ensure the CPU is not overwhelmed by incoming packets.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/Makefile
drivers/net/ethernet/mellanox/mlxsw/core.c
drivers/net/ethernet/mellanox/mlxsw/core.h
drivers/net/ethernet/mellanox/mlxsw/spectrum.c
drivers/net/ethernet/mellanox/mlxsw/spectrum.h
drivers/net/ethernet/mellanox/mlxsw/spectrum_trap.c [new file with mode: 0644]