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>
This commit is contained in:
parent
12fafa27c7
commit
fd71244a20
|
|
@ -7080,6 +7080,8 @@ static const char *trap_type_name(uint8_t type)
|
||||||
return "drop";
|
return "drop";
|
||||||
case DEVLINK_TRAP_TYPE_EXCEPTION:
|
case DEVLINK_TRAP_TYPE_EXCEPTION:
|
||||||
return "exception";
|
return "exception";
|
||||||
|
case DEVLINK_TRAP_TYPE_CONTROL:
|
||||||
|
return "control";
|
||||||
default:
|
default:
|
||||||
return "<unknown type>";
|
return "<unknown type>";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue