]> git.proxmox.com Git - mirror_iproute2.git/commit
devlink: Fix monitor command
authorIdo Schimmel <idosch@mellanox.com>
Sun, 5 May 2019 14:12:43 +0000 (17:12 +0300)
committerStephen Hemminger <stephen@networkplumber.org>
Mon, 6 May 2019 15:35:44 +0000 (08:35 -0700)
commite73306048f798ec6f6265cb6e6fcaf4543cddba6
tree40223c7e4b92d1413169dac69030ac030c152595
parent09e0528cf977150fcf6b849671091501b0958fdb
devlink: Fix monitor command

The command is supposed to allow users to filter events related to
certain objects, but returns an error when an object is specified:

# devlink mon dev
Command "dev" not found

Fix this by allowing the command to process the specified objects.

Example:

# devlink/devlink mon dev &
# echo "10 1" > /sys/bus/netdevsim/new_device
[dev,new] netdevsim/netdevsim10

# devlink/devlink mon port &
# echo "11 1" > /sys/bus/netdevsim/new_device
[port,new] netdevsim/netdevsim11/0: type notset flavour physical
[port,new] netdevsim/netdevsim11/0: type eth netdev eth1 flavour physical

# devlink/devlink mon &
# echo "12 1" > /sys/bus/netdevsim/new_device
[dev,new] netdevsim/netdevsim12
[port,new] netdevsim/netdevsim12/0: type notset flavour physical
[port,new] netdevsim/netdevsim12/0: type eth netdev eth2 flavour physical

Fixes: a3c4b484a1ed ("add devlink tool")
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
devlink/devlink.c