Re: [PATCH net-next V3 00/10] devlink: add per-port resource support
From: Jiri Pirko <jiri@resnulli.us>
Date: 2026-03-12 08:34:56
Also in:
linux-doc, linux-kselftest, linux-rdma, lkml
Wed, Mar 11, 2026 at 10:51:26PM +0100, kuba@kernel.org wrote:
On Wed, 11 Mar 2026 20:24:08 +0200 Or Har-Toov wrote:quoted
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>LGTM
I don't see the benefit of exposing the scope to the user to be honest. I mean, dump would show all, dump with "dev" handle would be used as a selector to dump only things related to "dev". What is the use case of this "scope" granularity?
quoted
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>Do we have to touch doit? Maybe we should let doit be what it is now and consider it legacy going forward? doit which is in fact a filtered dump is a bit of a mistake in the first place, from Netlink's perspective.
I don't think we should. If user wants doit, he is going to specify the object (dev/port). If user is interested only in things related to single device, he should do dump with selector (dev). Let's make this simple.