]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
devlink: Add resource scope filtering to resource dump
authorOr Har-Toov <ohartoov@nvidia.com>
Tue, 7 Apr 2026 19:41:05 +0000 (22:41 +0300)
committerJakub Kicinski <kuba@kernel.org>
Thu, 9 Apr 2026 02:55:39 +0000 (19:55 -0700)
commit1bc45341a6ea4009ee9f2fbca9096b33a9ef71a2
tree704d655099119b839f819f4a463316309c96aeb2
parent170e160a0e7c6396f74279d922bee90902bd16f6
devlink: Add resource scope filtering to resource dump

Allow filtering the resource dump to device-level or port-level
resources using the 'scope' option.

Example - dump only device-level resources:

  $ devlink resource show scope dev
  pci/0000:03:00.0:
    name max_local_SFs size 128 unit entry dpipe_tables none
    name max_external_SFs size 128 unit entry dpipe_tables none
  pci/0000:03:00.1:
    name max_local_SFs size 128 unit entry dpipe_tables none
    name max_external_SFs size 128 unit entry dpipe_tables none

Example - dump only port-level resources:

  $ devlink resource show scope port
  pci/0000:03:00.0/196608:
    name max_SFs size 128 unit entry dpipe_tables none
  pci/0000:03:00.0/196609:
    name max_SFs size 128 unit entry dpipe_tables none
  pci/0000:03:00.1/196708:
    name max_SFs size 128 unit entry dpipe_tables none
  pci/0000:03:00.1/196709:
    name max_SFs size 128 unit entry dpipe_tables none

Signed-off-by: Or Har-Toov <ohartoov@nvidia.com>
Reviewed-by: Moshe Shemesh <moshe@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://patch.msgid.link/20260407194107.148063-11-tariqt@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Documentation/netlink/specs/devlink.yaml
include/uapi/linux/devlink.h
net/devlink/netlink_gen.c
net/devlink/resource.c