Netdev List
 help / color / mirror / Atom feed
* [PATCH iproute2-next 0/7] devlink: add per-port resource support
@ 2026-06-09  5:39 Tariq Toukan
  2026-06-09  5:39 ` [PATCH iproute2-next 1/7] devlink: Split dpipe tables output to a separate function Tariq Toukan
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Tariq Toukan @ 2026-06-09  5:39 UTC (permalink / raw)
  To: Stephen Hemminger, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Andrew Lunn, David S. Miller
  Cc: David Ahern, Donald Hunter, Simon Horman, Jiri Pirko,
	Jonathan Corbet, Shuah Khan, Saeed Mahameed, Leon Romanovsky,
	Tariq Toukan, Mark Bloch, Shuah Khan, Matthieu Baerts (NGI0),
	Chuck Lever, Or Har-Toov, Carolina Jubran, Moshe Shemesh,
	Shay Drori, Dragos Tatulea, Daniel Zahka, Shahar Shitrit,
	Jacob Keller, Cosmin Ratiu, Parav Pandit, Kees Cook,
	Adithya Jayachandran, Daniel Jurgens, netdev, linux-kernel,
	linux-doc, linux-rdma, linux-kselftest, Gal Pressman,
	Ido Schimmel, Jiri Pirko, Petr Machata

Hi,

Currently, devlink resource show only supports querying a specific
device and displays device-level resources. However, some resources
are per-port, such as the maximum number of SFs that can be created
on a specific PF port.

This series extends devlink resource show with full support for
port-level resources, including a dump mode, per-port querying syntax,
and scope filtering. In preparation for these features, the first two
patches refactor how dpipe tables are handled to unblock dump support
and ensure errors in secondary queries are non-fatal.

The series is organized as follows:

Patch 1 splits the dpipe tables display into a separate function.

Patch 2 moves the dpipe tables query into the per-device resource show
callback, ensuring it behaves correctly during a multi-device dump.

Patch 3 fixes a pre-existing memory leak in resource_ctx_fini.

Patch 4 adds dump support to resource show (no device required).

Patch 5 shows port-level resources returned in a dump reply.

Patch 6 adds DEV/PORT_INDEX syntax to resource show.

Patch 7 adds scope filter to resource show.

With this series, users can query resources at all levels:

$ devlink resource show
pci/0000:03:00.0:
  name local_max_SFs size 508 unit entry
  name external_max_SFs size 508 unit entry
pci/0000:03:00.0/196608:
  name max_SFs size 20 unit entry

$ devlink resource show scope dev
pci/0000:03:00.0:
  name local_max_SFs size 508 unit entry
  name external_max_SFs size 508 unit entry

$ devlink resource show scope port
pci/0000:03:00.0/196608:
  name max_SFs size 20 unit entry

$ devlink resource show pci/0000:03:00.0/196608
pci/0000:03:00.0/196608:
  name max_SFs size 20 unit entry

This series is the userspace counterpart to the kernel series:
https://lore.kernel.org/all/20260407194107.148063-1-tariqt@nvidia.com/

Ido Schimmel (2):
  devlink: Split dpipe tables output to a separate function
  devlink: Move dpipe tables query to resources show callback

Or Har-Toov (5):
  devlink: fix memory leak in resource_ctx_fini
  devlink: add dump support for resource show
  devlink: show port resources in resource dump
  devlink: add per-port resource show support
  devlink: add scope filter to resource show

 bash-completion/devlink     |   8 ++
 devlink/devlink.c           | 202 +++++++++++++++++++++++++++---------
 man/man8/devlink-resource.8 |  34 +++++-
 3 files changed, 192 insertions(+), 52 deletions(-)


base-commit: 7340b539841dc739bc0b813e8e86825bc1eb5a4c
-- 
2.44.0


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

end of thread, other threads:[~2026-06-09  5:42 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-09  5:39 [PATCH iproute2-next 0/7] devlink: add per-port resource support Tariq Toukan
2026-06-09  5:39 ` [PATCH iproute2-next 1/7] devlink: Split dpipe tables output to a separate function Tariq Toukan
2026-06-09  5:39 ` [PATCH iproute2-next 2/7] devlink: Move dpipe tables query to resources show callback Tariq Toukan
2026-06-09  5:39 ` [PATCH iproute2-next 3/7] devlink: fix memory leak in resource_ctx_fini Tariq Toukan
2026-06-09  5:39 ` [PATCH iproute2-next 4/7] devlink: add dump support for resource show Tariq Toukan
2026-06-09  5:39 ` [PATCH iproute2-next 5/7] devlink: show port resources in resource dump Tariq Toukan
2026-06-09  5:39 ` [PATCH iproute2-next 6/7] devlink: add per-port resource show support Tariq Toukan
2026-06-09  5:39 ` [PATCH iproute2-next 7/7] devlink: add scope filter to resource show Tariq Toukan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox