diff options
author | Ido Schimmel <idosch@mellanox.com> | 2019-08-17 15:28:18 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-08-17 21:40:08 +0200 |
commit | 391203ab11df9b23cd0b867122bccbe33fe16f02 (patch) | |
tree | 0ecd9deada26ac0021177bcd868e76ac802e51e9 /net/core | |
parent | devlink: Add packet trap infrastructure (diff) | |
download | linux-391203ab11df9b23cd0b867122bccbe33fe16f02.tar.xz linux-391203ab11df9b23cd0b867122bccbe33fe16f02.zip |
devlink: Add generic packet traps and groups
Add generic packet traps and groups that can report dropped packets as
well as exceptions such as TTL error.
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/devlink.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/net/core/devlink.c b/net/core/devlink.c index 960ceaec98d6..650f36379203 100644 --- a/net/core/devlink.c +++ b/net/core/devlink.c @@ -7443,6 +7443,15 @@ EXPORT_SYMBOL_GPL(devlink_region_snapshot_create); } static const struct devlink_trap devlink_trap_generic[] = { + DEVLINK_TRAP(SMAC_MC, DROP), + DEVLINK_TRAP(VLAN_TAG_MISMATCH, DROP), + DEVLINK_TRAP(INGRESS_VLAN_FILTER, DROP), + DEVLINK_TRAP(INGRESS_STP_FILTER, DROP), + DEVLINK_TRAP(EMPTY_TX_LIST, DROP), + DEVLINK_TRAP(PORT_LOOPBACK_FILTER, DROP), + DEVLINK_TRAP(BLACKHOLE_ROUTE, DROP), + DEVLINK_TRAP(TTL_ERROR, EXCEPTION), + DEVLINK_TRAP(TAIL_DROP, DROP), }; #define DEVLINK_TRAP_GROUP(_id) \ @@ -7452,6 +7461,9 @@ static const struct devlink_trap devlink_trap_generic[] = { } static const struct devlink_trap_group devlink_trap_group_generic[] = { + DEVLINK_TRAP_GROUP(L2_DROPS), + DEVLINK_TRAP_GROUP(L3_DROPS), + DEVLINK_TRAP_GROUP(BUFFER_DROPS), }; static int devlink_trap_generic_verify(const struct devlink_trap *trap) |