linux/net/devlink
Jiri Pirko 4a1b5aa8b5 devlink: allow user to narrow per-instance dumps by passing handle attrs
For SFs, one devlink instance per SF is created. There might be
thousands of these on a single host. When a user needs to know port
handle for specific SF, he needs to dump all devlink ports on the host
which does not scale good.

Allow user to pass devlink handle attributes alongside the dump command
and dump only objects which are under selected devlink instance.

Example:
$ devlink port show
auxiliary/mlx5_core.eth.0/65535: type eth netdev eth2 flavour physical port 0 splittable false
auxiliary/mlx5_core.eth.1/131071: type eth netdev eth3 flavour physical port 1 splittable false

$ devlink port show auxiliary/mlx5_core.eth.0
auxiliary/mlx5_core.eth.0/65535: type eth netdev eth2 flavour physical port 0 splittable false

$ devlink port show auxiliary/mlx5_core.eth.1
auxiliary/mlx5_core.eth.1/131071: type eth netdev eth3 flavour physical port 1 splittable false

Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Acked-by: Jakub Kicinski <kuba@kernel.org>
Link: https://lore.kernel.org/r/20230811155714.1736405-11-jiri@resnulli.us
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-08-14 11:47:25 -07:00
..
core.c devlink: Fix crash with CONFIG_NET_NS=n 2023-05-16 19:57:52 -07:00
dev.c devlink: pass flags as an arg of dump_one() callback 2023-08-14 11:47:25 -07:00
devl_internal.h devlink: remove converted commands from small ops 2023-08-14 11:47:25 -07:00
health.c devlink: pass flags as an arg of dump_one() callback 2023-08-14 11:47:25 -07:00
leftover.c devlink: remove converted commands from small ops 2023-08-14 11:47:25 -07:00
Makefile devlink: add split ops generated according to spec 2023-08-04 14:03:01 -07:00
netlink_gen.c netlink: specs: devlink: add commands that do per-instance dump 2023-08-14 11:47:25 -07:00
netlink_gen.h netlink: specs: devlink: add commands that do per-instance dump 2023-08-14 11:47:25 -07:00
netlink.c devlink: allow user to narrow per-instance dumps by passing handle attrs 2023-08-14 11:47:25 -07:00