]> git.proxmox.com Git - mirror_iproute2.git/commit
devlink: fix requiring either handle
authorJakub Kicinski <jakub.kicinski@netronome.com>
Wed, 20 Nov 2019 17:56:06 +0000 (09:56 -0800)
committerDavid Ahern <dsahern@gmail.com>
Thu, 21 Nov 2019 21:38:52 +0000 (21:38 +0000)
commit668bd8d35664d745656474ae623af8e2c9ebe99b
treedd78cd3be63bc92ac5a6ae03163bd5af2c9d38dc
parent536dcd2016eab4968fa689f166cf72c4ba0add91
devlink: fix requiring either handle

devlink sb occupancy show requires device or port handle.
It passes both device and port handle bits as required to
dl_argv_parse() so since commit 1896b100af46 ("devlink: catch
missing strings in dl_args_required") devlink will now
complain that only one is present:

$ devlink sb occupancy show pci/0000:06:00.0/0
BUG: unknown argument required but not found

Drop the bit for the handle which was not found from required.

Reported-by: Shalom Toledo <shalomt@mellanox.com>
Fixes: 1896b100af46 ("devlink: catch missing strings in dl_args_required")
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>
Tested-by: Shalom Toledo <shalomt@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David Ahern <dsahern@gmail.com>
devlink/devlink.c