mirror_iproute2/devlink
Ido Schimmel ef12d6dafa devlink: Add devlink trap set and show commands
The trap set command allows the user to set the action of an individual
trap. Example:

# devlink trap set netdevsim/netdevsim10 trap blackhole_route action trap

The trap show command allows the user to get the current status of an
individual trap or a dump of all traps in case one is not specified.
When '-s' is specified the trap's statistics are shown. When '-v' is
specified the metadata types the trap can provide are shown. Example:

# devlink -jvps trap show netdevsim/netdevsim10 trap blackhole_route
{
    "trap": {
        "netdevsim/netdevsim10": [ {
                "name": "blackhole_route",
                "type": "drop",
                "generic": true,
                "action": "trap",
                "group": "l3_drops",
                "metadata": [ "input_port" ],
                "stats": {
                    "rx": {
                        "bytes": 0,
                        "packets": 0
                    }
                }
            } ]
    }
}

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David Ahern <dsahern@gmail.com>
2019-08-18 11:49:27 -07:00
..
.gitignore devlink: ignore build result 2016-04-11 13:35:12 -07:00
devlink.c devlink: Add devlink trap set and show commands 2019-08-18 11:49:27 -07:00
Makefile iproute2: Installation errors without libmnl 2018-12-04 14:27:08 -08:00
mnlg.c devlink: mnlg: Catch returned error value of dumpit commands 2019-06-12 08:43:14 -07:00
mnlg.h add devlink tool 2016-03-27 10:57:15 -07:00