Skip to content

devlink: introduce selective dumps

Jiri Pirko netdev 4 versions – Applied

Status from this message: This series was applied to netdev/net-next.git (main)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest13 patches 1 replyApplied 13/13
  2. v313 patches 2 repliesSuperseded
  3. v211 patches 23 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v11 patch3 repliesSuperseded

Changes in v4 from the cover letter

- fixed NLM_F_DUMP_FILTERED flag handling

Patches in v4 All 13 applied

#Subject and filesSizeRepliesApplied
1/13devlink: parse linecard attr in doit() callbacksnet/devlink/devl_internal.h net/devlink/leftover.c net/devlink/netlink.c+13 -210 repliesApplied
2/13devlink: parse rate attrs in doit() callbacksnet/devlink/devl_internal.h net/devlink/leftover.c net/devlink/netlink.c+25 -380 repliesApplied
3/13devlink: introduce devlink_nl_pre_doit_port*() helper functionsnet/devlink/devl_internal.h net/devlink/netlink.c+28 -40 repliesApplied
4/13devlink: rename doit callbacks for per-instance dump commandsnet/devlink/dev.c net/devlink/devl_internal.h net/devlink/health.c +1 more+52 -450 repliesApplied
5/13devlink: introduce dumpit callbacks for split opsnet/devlink/dev.c net/devlink/devl_internal.h net/devlink/health.c +2 more+144 -1470 repliesApplied
6/13devlink: pass flags as an arg of dump_one() callbacknet/devlink/dev.c net/devlink/devl_internal.h net/devlink/health.c +2 more+56 -560 repliesApplied
7/13netlink: specs: devlink: add commands that do per-instance dumpDocumentation/netlink/specs/devlink.yaml net/devlink/netlink_gen.c net/devlink/netlink_gen.h +2 more+4319 -1450 repliesApplied
8/13devlink: remove duplicate temporary netlink callback prototypesnet/devlink/devl_internal.h+0 -480 repliesApplied
9/13devlink: remove converted commands from small opsnet/devlink/devl_internal.h net/devlink/leftover.c+3 -980 repliesApplied
10/13devlink: allow user to narrow per-instance dumps by passing handle attrsnet/devlink/netlink.c+40 -30 repliesApplied
11/13netlink: specs: devlink: extend per-instance dump commands to accept instance attributesDocumentation/netlink/specs/devlink.yaml net/devlink/netlink_gen.c tools/net/ynl/generated/devlink-user.c +1 more+799 -780 repliesApplied
12/13devlink: extend health reporter dump selector by port indexnet/devlink/health.c+14 -10 repliesApplied
13/13netlink: specs: devlink: extend health reporter dump attributes by port indexDocumentation/netlink/specs/devlink.yaml net/devlink/netlink_gen.c tools/net/ynl/generated/devlink-user.c +1 more+15 -30 repliesApplied

Reviews trailers per patch

None of the 13 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchJakub Kicinski
SeriesA-b
1/13
2/13
3/13
4/13
5/13
6/13
7/13
8/13
9/13
10/13
11/13
12/13
13/13

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [patch net-next v4 00/13] devlink: introduce selective dumps

From: Jiri Pirko <[email protected]>

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(-)
Signature · 1 line
2.41.0