mbox series

[iproute2-next,v2,0/6] devlink: implement dump selector for devlink objects show commands

Message ID 20230906111113.690815-1-jiri@resnulli.us (mailing list archive)
Headers show
Series devlink: implement dump selector for devlink objects show commands | expand

Message

Jiri Pirko Sept. 6, 2023, 11:11 a.m. UTC
From: Jiri Pirko <jiri@nvidia.com>

First 5 patches are preparations for the last one.

Motivation:

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.

Solution:

Allow user to pass devlink handle (and possibly other attributes)
alongside the dump command and dump only objects which are matching
the selection.

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

Jiri Pirko (6):
  devlink: move DL_OPT_SB into required options
  devlink: make parsing of handle non-destructive to argv
  devlink: implement command line args dry parsing
  devlink: return -ENOENT if argument is missing
  mnl_utils: introduce a helper to check if dump policy exists for
    command
  devlink: implement dump selector for devlink objects show commands

 devlink/devlink.c   | 382 ++++++++++++++++++++++++++------------------
 include/mnl_utils.h |   1 +
 lib/mnl_utils.c     | 121 +++++++++++++-
 3 files changed, 345 insertions(+), 159 deletions(-)

Comments

patchwork-bot+netdevbpf@kernel.org Sept. 11, 2023, 3:50 p.m. UTC | #1
Hello:

This series was applied to iproute2/iproute2-next.git (main)
by David Ahern <dsahern@kernel.org>:

On Wed,  6 Sep 2023 13:11:07 +0200 you wrote:
> From: Jiri Pirko <jiri@nvidia.com>
> 
> First 5 patches are preparations for the last one.
> 
> Motivation:
> 
> 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.
> 
> [...]

Here is the summary with links:
  - [iproute2-next,v2,1/6] devlink: move DL_OPT_SB into required options
    https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git/commit/?id=158215c53677
  - [iproute2-next,v2,2/6] devlink: make parsing of handle non-destructive to argv
    https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git/commit/?id=5d9f42124ccd
  - [iproute2-next,v2,3/6] devlink: implement command line args dry parsing
    https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git/commit/?id=8eb894eda67d
  - [iproute2-next,v2,4/6] devlink: return -ENOENT if argument is missing
    https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git/commit/?id=fd1c2af8cbaa
  - [iproute2-next,v2,5/6] mnl_utils: introduce a helper to check if dump policy exists for command
    https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git/commit/?id=20b299a3ec35
  - [iproute2-next,v2,6/6] devlink: implement dump selector for devlink objects show commands
    https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git/commit/?id=70faecdca8f5

You are awesome, thank you!