From: Tariq Toukan <tariqt@nvidia.com>
To: Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>
Cc: Donald Hunter <donald.hunter@gmail.com>,
Jiri Pirko <jiri@resnulli.us>, Jonathan Corbet <corbet@lwn.net>,
Saeed Mahameed <saeedm@nvidia.com>,
"Leon Romanovsky" <leon@kernel.org>,
Tariq Toukan <tariqt@nvidia.com>, Mark Bloch <mbloch@nvidia.com>,
Shuah Khan <shuah@kernel.org>, <netdev@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <linux-doc@vger.kernel.org>,
<linux-rdma@vger.kernel.org>, <linux-kselftest@vger.kernel.org>,
Gal Pressman <gal@nvidia.com>, Moshe Shemesh <moshe@nvidia.com>,
Shay Drori <shayd@nvidia.com>, Jiri Pirko <jiri@nvidia.com>
Subject: [PATCH net-next 0/5] devlink: add per-port resource support
Date: Tue, 3 Feb 2026 09:10:28 +0200 [thread overview]
Message-ID: <20260203071033.1709445-1-tariqt@nvidia.com> (raw)
Hi,
This series adds devlink per-port resource support.
See detailed description by Or below [1].
Regards,
Tariq
[1]
Currently, devlink resources are only available at the device level.
However, some resources are inherently per-port, such as the maximum
number of subfunctions (SFs) that can be created on a specific PF port.
This limitation prevents user space from obtaining accurate per-port
capacity information.
This series adds infrastructure for per-port resources in devlink core
and implements it in the mlx5 driver to expose the max_SFs resource
on PF devlink ports.
Patch #1 adds devlink core infrastructure for per-port resources
Patch #2 registers SF resource on PF port representor in mlx5
support dump
Patch #3 adds port resource registration to netdevsim for testing
Patch #4 adds selftest for devlink port resources
Patch #5 adds documentation for port-level resources
With this series (and upcoming userspace patches), users can query
per-port resources:
$ devlink port resource show pci/0000:03:00.0/196608
pci/0000:03:00.0/196608:
name max_SFs size 20 unit entry
$ devlink port resource show
pci/0000:03:00.0/196608:
name max_SFs size 20 unit entry
pci/0000:03:00.1/262144:
name max_SFs size 20 unit entry
Or Har-Toov (5):
devlink: Add port-level resource infrastructure
net/mlx5: Register SF resource on PF port representor
netdevsim: Add devlink port resource registration
selftest: netdevsim: Add devlink port resource test
devlink: Document port-level resources
Documentation/netlink/specs/devlink.yaml | 23 ++
.../networking/devlink/devlink-resource.rst | 36 +++
.../net/ethernet/mellanox/mlx5/core/devlink.h | 4 +
.../mellanox/mlx5/core/esw/devlink_port.c | 37 +++
drivers/net/netdevsim/dev.c | 22 +-
drivers/net/netdevsim/netdevsim.h | 4 +
include/net/devlink.h | 8 +
include/uapi/linux/devlink.h | 2 +
net/devlink/netlink.c | 2 +-
net/devlink/netlink_gen.c | 32 +-
net/devlink/netlink_gen.h | 6 +-
net/devlink/port.c | 3 +
net/devlink/resource.c | 282 ++++++++++++++----
.../drivers/net/netdevsim/devlink.sh | 32 +-
14 files changed, 434 insertions(+), 59 deletions(-)
base-commit: a22f57757f7e88c890499265c383ecb32900b645
--
2.40.1
next reply other threads:[~2026-02-03 7:11 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-03 7:10 Tariq Toukan [this message]
2026-02-03 7:10 ` [PATCH net-next 1/5] devlink: Add port-level resource infrastructure Tariq Toukan
2026-02-04 9:51 ` Jiri Pirko
2026-02-05 15:26 ` Or Har-Toov
2026-02-04 9:58 ` Jiri Pirko
2026-02-03 7:10 ` [PATCH net-next 2/5] net/mlx5: Register SF resource on PF port representor Tariq Toukan
2026-02-03 7:10 ` [PATCH net-next 3/5] netdevsim: Add devlink port resource registration Tariq Toukan
2026-02-04 9:54 ` Jiri Pirko
2026-02-03 7:10 ` [PATCH net-next 4/5] selftest: netdevsim: Add devlink port resource test Tariq Toukan
2026-02-03 10:16 ` Paolo Abeni
2026-02-04 2:26 ` Jakub Kicinski
2026-02-04 7:08 ` Tariq Toukan
2026-02-03 7:10 ` [PATCH net-next 5/5] devlink: Document port-level resources Tariq Toukan
2026-02-04 9:56 ` Jiri Pirko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260203071033.1709445-1-tariqt@nvidia.com \
--to=tariqt@nvidia.com \
--cc=andrew+netdev@lunn.ch \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=donald.hunter@gmail.com \
--cc=edumazet@google.com \
--cc=gal@nvidia.com \
--cc=jiri@nvidia.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=mbloch@nvidia.com \
--cc=moshe@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=saeedm@nvidia.com \
--cc=shayd@nvidia.com \
--cc=shuah@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox