summaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorAmit Cohen <amitc@mellanox.com>2020-01-19 15:00:48 +0200
committerDavid S. Miller <davem@davemloft.net>2020-01-19 16:23:52 +0100
commit95f0ead8f04bec18e474594ef585f3734bd85b4c (patch)
treec05e3f18456473a7a7234ceeb16448eadbebfb0a /include/net
parent740e87bc3db8fe299e17877b7055e9ae3c33e4e6 (diff)
downloadlinux-95f0ead8f04bec18e474594ef585f3734bd85b4c.tar.bz2
devlink: Add non-routable packet trap
Add packet trap that can report packets that reached the router, but are non-routable. For example, IGMP queries can be flooded by the device in layer 2 and reach the router. Such packets should not be routed and instead dropped. Signed-off-by: Amit Cohen <amitc@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/devlink.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net/devlink.h b/include/net/devlink.h
index a6856f1d5d1f..08b757753e1c 100644
--- a/include/net/devlink.h
+++ b/include/net/devlink.h
@@ -591,6 +591,7 @@ enum devlink_trap_generic_id {
DEVLINK_TRAP_GENERIC_ID_REJECT_ROUTE,
DEVLINK_TRAP_GENERIC_ID_IPV4_LPM_UNICAST_MISS,
DEVLINK_TRAP_GENERIC_ID_IPV6_LPM_UNICAST_MISS,
+ DEVLINK_TRAP_GENERIC_ID_NON_ROUTABLE,
/* Add new generic trap IDs above */
__DEVLINK_TRAP_GENERIC_ID_MAX,
@@ -659,6 +660,8 @@ enum devlink_trap_group_generic_id {
"ipv4_lpm_miss"
#define DEVLINK_TRAP_GENERIC_NAME_IPV6_LPM_UNICAST_MISS \
"ipv6_lpm_miss"
+#define DEVLINK_TRAP_GENERIC_NAME_NON_ROUTABLE \
+ "non_routable_packet"
#define DEVLINK_TRAP_GROUP_GENERIC_NAME_L2_DROPS \
"l2_drops"