On Wed, 4 Mar 2026 11:34:13 +0100 Jiri Pirko wrote: > >>I have a strong suspicion that the user will want to access all > >>resources of a device. `devlink resource show [$dev]` should dump > >>all resources devlink knows about, including port ones. > >> > >>What's the reason for the new command? > > > >You are right, one cmd would do. Good thing someone forgot to implement > >dump for it :) > > On a second thought, if we merge multiple objects into one dump, how > does this extend? I mean, the userspace has to check there are no extra > attributes, as they may be used as a handle to another new object > introduced in the future... Idk, it's a bit odd.
That's true, the user space must be able to interpret the object identifier. So if we extend the command to add more identifiers we will have to add the bitmask to the dump request, and have the user space tell the kernel which objects it can recognize. I was just saying that we don't have to add such attribute now, maybe leave a comment in a strategic place for our future selves?

