diff options
author | Ido Schimmel <idosch@mellanox.com> | 2020-06-07 11:36:46 +0300 |
---|---|---|
committer | Stephen Hemminger <stephen@networkplumber.org> | 2020-06-11 09:51:10 -0700 |
commit | fd71244a2086036bdb1b44a8b2b8905ec2d4f100 (patch) | |
tree | 643d7bde349af5c8b559e2c17b8268d9b1a4c711 | |
parent | 12fafa27c7b306e6c397e858f4d5a8159500f659 (diff) | |
download | iproute2-fd71244a2086036bdb1b44a8b2b8905ec2d4f100.tar.gz |
devlink: Add 'control' trap type
This type is used for traps that trap control packets such as ARP
request and IGMP query to the CPU.
Example:
# devlink -jp trap show netdevsim/netdevsim10 trap igmp_v1_report
{
"trap": {
"netdevsim/netdevsim10": [ {
"name": "igmp_v1_report",
"type": "control",
"generic": true,
"action": "trap",
"group": "mc_snooping"
} ]
}
}
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
-rw-r--r-- | devlink/devlink.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/devlink/devlink.c b/devlink/devlink.c index ce2e46766..913feeb6d 100644 --- a/devlink/devlink.c +++ b/devlink/devlink.c @@ -7080,6 +7080,8 @@ static const char *trap_type_name(uint8_t type) return "drop"; case DEVLINK_TRAP_TYPE_EXCEPTION: return "exception"; + case DEVLINK_TRAP_TYPE_CONTROL: + return "control"; default: return "<unknown type>"; } |