[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230811155714.1736405-1-jiri@resnulli.us>
Date: Fri, 11 Aug 2023 17:57:01 +0200
From: Jiri Pirko <jiri@...nulli.us>
To: netdev@...r.kernel.org
Cc: kuba@...nel.org,
pabeni@...hat.com,
davem@...emloft.net,
edumazet@...gle.com,
moshe@...dia.com,
saeedm@...dia.com,
idosch@...dia.com,
petrm@...dia.com
Subject: [patch net-next v4 00/13] devlink: introduce selective dumps
From: Jiri Pirko <jiri@...dia.com>
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.
Use split ops to generate policies for dump callbacks acccording to
the attributes used for selection.
The userspace can use ctrl genetlink GET_POLICY command to find out if
the selective dumps are supported by kernel for particular command.
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
Extension:
patches #12 and #13 extends selection attributes by port index
for health reporter dumping.
---
v3->v4:
- fixed NLM_F_DUMP_FILTERED flag handling
v2->v3:
- redid the whole thing using generated split ops and removed nested
selector attribute as suggested by Jakub. More in individual patches.
v1->v2:
- the original single patch (patch #10) was extended to a patchset
Jiri Pirko (13):
devlink: parse linecard attr in doit() callbacks
devlink: parse rate attrs in doit() callbacks
devlink: introduce devlink_nl_pre_doit_port*() helper functions
devlink: rename doit callbacks for per-instance dump commands
devlink: introduce dumpit callbacks for split ops
devlink: pass flags as an arg of dump_one() callback
netlink: specs: devlink: add commands that do per-instance dump
devlink: remove duplicate temporary netlink callback prototypes
devlink: remove converted commands from small ops
devlink: allow user to narrow per-instance dumps by passing handle
attrs
netlink: specs: devlink: extend per-instance dump commands to accept
instance attributes
devlink: extend health reporter dump selector by port index
netlink: specs: devlink: extend health reporter dump attributes by
port index
Documentation/netlink/specs/devlink.yaml | 457 +++-
net/devlink/dev.c | 29 +-
net/devlink/devl_internal.h | 44 +-
net/devlink/health.c | 40 +-
net/devlink/leftover.c | 419 ++--
net/devlink/netlink.c | 110 +-
net/devlink/netlink_gen.c | 424 +++-
net/devlink/netlink_gen.h | 52 +-
tools/net/ynl/generated/devlink-user.c | 2434 +++++++++++++++++++++-
tools/net/ynl/generated/devlink-user.h | 1824 +++++++++++++++-
10 files changed, 5327 insertions(+), 506 deletions(-)
--
2.41.0
Powered by blists - more mailing lists