netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch net-next v4 00/13] devlink: introduce selective dumps
@ 2023-08-11 15:57 Jiri Pirko
  2023-08-11 15:57 ` [patch net-next v4 01/13] devlink: parse linecard attr in doit() callbacks Jiri Pirko
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: Jiri Pirko @ 2023-08-11 15:57 UTC (permalink / raw)
  To: netdev; +Cc: kuba, pabeni, davem, edumazet, moshe, saeedm, idosch, petrm

From: Jiri Pirko <jiri@nvidia.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


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2023-08-14 18:50 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-11 15:57 [patch net-next v4 00/13] devlink: introduce selective dumps Jiri Pirko
2023-08-11 15:57 ` [patch net-next v4 01/13] devlink: parse linecard attr in doit() callbacks Jiri Pirko
2023-08-11 15:57 ` [patch net-next v4 02/13] devlink: parse rate attrs " Jiri Pirko
2023-08-11 15:57 ` [patch net-next v4 03/13] devlink: introduce devlink_nl_pre_doit_port*() helper functions Jiri Pirko
2023-08-11 15:57 ` [patch net-next v4 04/13] devlink: rename doit callbacks for per-instance dump commands Jiri Pirko
2023-08-11 15:57 ` [patch net-next v4 05/13] devlink: introduce dumpit callbacks for split ops Jiri Pirko
2023-08-11 15:57 ` [patch net-next v4 06/13] devlink: pass flags as an arg of dump_one() callback Jiri Pirko
2023-08-11 15:57 ` [patch net-next v4 07/13] netlink: specs: devlink: add commands that do per-instance dump Jiri Pirko
2023-08-11 15:57 ` [patch net-next v4 08/13] devlink: remove duplicate temporary netlink callback prototypes Jiri Pirko
2023-08-11 15:57 ` [patch net-next v4 09/13] devlink: remove converted commands from small ops Jiri Pirko
2023-08-11 15:57 ` [patch net-next v4 10/13] devlink: allow user to narrow per-instance dumps by passing handle attrs Jiri Pirko
2023-08-11 15:57 ` [patch net-next v4 11/13] netlink: specs: devlink: extend per-instance dump commands to accept instance attributes Jiri Pirko
2023-08-11 15:57 ` [patch net-next v4 12/13] devlink: extend health reporter dump selector by port index Jiri Pirko
2023-08-11 15:57 ` [patch net-next v4 13/13] netlink: specs: devlink: extend health reporter dump attributes " Jiri Pirko
2023-08-12  1:02 ` [patch net-next v4 00/13] devlink: introduce selective dumps Jakub Kicinski
2023-08-14 18:50 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).