From: Ido Schimmel Date: Sun, 7 Jun 2020 08:36:46 +0000 (+0300) Subject: devlink: Add 'control' trap type X-Git-Tag: v5.8.0~35 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fd71244a2086036bdb1b44a8b2b8905ec2d4f100;p=thirdparty%2Fiproute2.git 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 Signed-off-by: Stephen Hemminger --- 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 ""; }