Subject: Re: [patch net-next v2 10/11] devlink: introduce dump selector attr and use it for per-instance dumps

From: Jakub Kicinski <[email-masked]>
Date: Tue, 1 Aug 2023 08:53:01 -0700

On Tue, 1 Aug 2023 08:42:09 +0200 Jiri Pirko wrote:
> >> >Also - do you know of any userspace which would pass garbage attrs 
> >> >to the dumps? Do we really need to accept all attributes, or can
> >> >we trim the dump policies to what's actually supported?    
> >> 
> >> That's what this patch is doing. It only accepts what the kernel
> >> understands. It gives the object types (as for example health reporter)
> >> option to extend the attr set to accept them into selectors as well, if
> >> they know how to handle them.  
> >
> >I'm talking about the "outer" policy, the level at which
> >DEVLINK_ATTR_DUMP_SELECTOR is defined.  
> 
> I don't follow :/ Could you please describe what exactly do you mean and
> want to see? Thanks!

It's a bit obscured by the macros, but AFAICT you pass
devlink_nl_policy for the dumps, while the _only_ attribute
the kernel will interpret is DEVLINK_ATTR_DUMP_SELECTOR
and its insides.