From: Or Har-Toov <ohartoov@nvidia.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Jiri Pirko <jiri@resnulli.us>, Tariq Toukan <tariqt@nvidia.com>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Donald Hunter <donald.hunter@gmail.com>,
Jonathan Corbet <corbet@lwn.net>,
Saeed Mahameed <saeedm@nvidia.com>,
Leon Romanovsky <leon@kernel.org>, 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>,
Dragos Tatulea <dtatulea@nvidia.com>,
Shay Drory <shayd@nvidia.com>, Jiri Pirko <jiri@nvidia.com>,
Moshe Shemesh <moshe@nvidia.com>
Subject: Re: [PATCH net-next V3 00/10] devlink: add per-port resource support
Date: Wed, 11 Mar 2026 20:24:08 +0200 [thread overview]
Message-ID: <5de5103e-e2e4-4b72-9c3c-22847728fbb8@nvidia.com> (raw)
In-Reply-To: <20260309133341.7e08b35d@kernel.org>
On 09/03/2026 22:33, Jakub Kicinski wrote:
>
>
> On Sun, 8 Mar 2026 18:03:11 +0200 Or Har-Toov wrote:
>> Do you mean that we will register resources per port, but not show with
>> new devlink port resource show.
>> Instead, the current devlink resource show dev command will also display
>> the ports of that device?
>>
>> For example:
>>
>> $ devlink resource show pci/0000:03:00.0
>> pci/0000:03:00.0:
>> name local_max_SFs size 40 unit entry
>> pci/0000:03:00.0/196608:
>> name max_SFs size 20 unit entry
>> pci/0000:03:00.0/196609:
>> name max_SFs size 20 unit entry
>>
>> Or should we keep the current behavior where devlink resource show dev
>> displays only device-level resources, and only the full dump shows both
>> devices and their ports?
>>
>> For example:
>>
>> $ devlink resource show
>> pci/0000:03:00.0:
>> name local_max_SFs size 40 unit entry
>> pci/0000:03:00.0/196608:
>> name max_SFs size 20 unit entry
>> pci/0000:03:00.0/196609:
>> name max_SFs size 20 unit entry
>> pci/0000:03:00.1:
>> name local_max_SFs size 40 unit entry
>> pci/0000:03:00.1/196608:
>> name max_SFs size 20 unit entry
>> pci/0000:03:00.1/196609:
>> name max_SFs size 20 unit entry
>>
>> Want to confirm which behavior you meant.
>
> No strong preference on the CLI. For the kernel I think specifying
> the device should not exclude the port resources. Whether port
> resources are shown or not should be entirely up to the mask attribute.
>
> Thinking about this some more after my last reply to Jiri I think we
> should add that mask attribute to let user decide whether they want
> only the device resources, port resources or both. This will retain
> the exact functionality of the series.
>
> On the CLI "devlink resource show" should show all resources in the
> system IMO. How we define the CLI arguments to scope things down I don't
> have a strong opinion on.
So for the dump of all resources it is clear. But I want to make sure I
understood the scope/mask part:
For the dump-it command:
devlink resource show
pci/0000:03:00.0:
<resource>
pci/0000:03:00.0/196608:
<port-resource>
pci/0000:03:00.0/196609:
<port-resource>
pci/0000:03:00.1:
<resource>
pci/0000:03:00.1/262144:
<port-resource>
devlink resource show scope port
pci/0000:03:00.0/196608:
<port-resource>
pci/0000:03:00.0/196609:
<port-resource>
pci/0000:03:00.1/262144:
<port-resource>
devlink resource show scope dev
pci/0000:03:00.0:
<resource>
pci/0000:03:00.1:
<resource>
For the do-it command:
devlink resource show pci/0000:03:00.0
pci/0000:03:00.0:
<resource>
pci/0000:03:00.0/196608:
<port-resource>
pci/0000:03:00.0/196609:
<port-resource>
devlink resource show pci/0000:03:00.0 scope port
pci/0000:03:00.0/196608:
<port-resource>
pci/0000:03:00.0/196609:
<port-resource>
devlink resource show pci/0000:03:00.0 scope dev
pci/0000:03:00.0:
<resource>
The way to get the dev or port scope will be by bitmask in the netlink
message of the dump/doit command.
Thank you
next prev parent reply other threads:[~2026-03-11 18:24 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-26 22:19 [PATCH net-next V3 00/10] devlink: add per-port resource support Tariq Toukan
2026-02-26 22:19 ` [PATCH net-next V3 01/10] devlink: Add dump support for device-level resources Tariq Toukan
2026-02-26 22:19 ` [PATCH net-next V3 02/10] selftest: netdevsim: Add resource dump test Tariq Toukan
2026-02-26 22:19 ` [PATCH net-next V3 03/10] devlink: Add dump to resource documentation Tariq Toukan
2026-02-26 22:19 ` [PATCH net-next V3 04/10] devlink: Refactor resource functions to be generic Tariq Toukan
2026-02-26 22:19 ` [PATCH net-next V3 05/10] devlink: Add port-level resource registration infrastructure Tariq Toukan
2026-02-26 22:19 ` [PATCH net-next V3 06/10] devlink: Add port resource netlink command Tariq Toukan
2026-02-26 22:19 ` [PATCH net-next V3 07/10] net/mlx5: Register SF resource on PF port representor Tariq Toukan
2026-02-26 22:19 ` [PATCH net-next V3 08/10] netdevsim: Add devlink port resource registration Tariq Toukan
2026-02-26 22:19 ` [PATCH net-next V3 09/10] selftest: netdevsim: Add devlink port resource test Tariq Toukan
2026-02-26 22:19 ` [PATCH net-next V3 10/10] devlink: Document port-level resources Tariq Toukan
2026-03-03 3:14 ` Jakub Kicinski
2026-03-04 10:06 ` Jiri Pirko
2026-03-03 3:26 ` [PATCH net-next V3 00/10] devlink: add per-port resource support Jakub Kicinski
2026-03-04 10:05 ` Jiri Pirko
2026-03-04 10:34 ` Jiri Pirko
2026-03-04 18:15 ` Jakub Kicinski
2026-03-05 7:56 ` Jiri Pirko
2026-03-05 14:37 ` Jakub Kicinski
2026-03-06 12:13 ` Jiri Pirko
2026-03-06 20:03 ` Jakub Kicinski
2026-03-08 16:03 ` Or Har-Toov
2026-03-09 20:33 ` Jakub Kicinski
2026-03-11 18:24 ` Or Har-Toov [this message]
2026-03-11 21:51 ` Jakub Kicinski
2026-03-12 8:34 ` Jiri Pirko
2026-03-12 14:19 ` Jakub Kicinski
2026-03-12 14:29 ` Jiri Pirko
2026-03-12 14:36 ` Jakub Kicinski
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=5de5103e-e2e4-4b72-9c3c-22847728fbb8@nvidia.com \
--to=ohartoov@nvidia.com \
--cc=andrew+netdev@lunn.ch \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=donald.hunter@gmail.com \
--cc=dtatulea@nvidia.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 \
--cc=tariqt@nvidia.com \
/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