Subject: Re: [patch net-next v2 11/11] devlink: extend health reporter dump selector by port index

From: Jakub Kicinski <[email-masked]>
Date: Tue, 25 Jul 2023 11:48:03 -0700

On Thu, 20 Jul 2023 14:18:29 +0200 Jiri Pirko wrote:
> Introduce a possibility for devlink object to expose attributes it
> supports for selection of dumped objects.
> 
> Use this by health reporter to indicate it supports port index based
> selection of dump objects. Implement this selection mechanism in
> devlink_nl_cmd_health_reporter_get_dump_one()

This patch is not very clean. IMHO implementing the filters by skipping
is not going to scale to reasonably complex filters. Isn't it better to
add a .filter callback which will look at the about-to-be-dumped object
and return true/false on whether it should be dumped?