Message ID | 20250324104012.367366-1-maxime.chevallier@bootlin.com (mailing list archive) |
---|---|
Headers | show |
Series | net: ethtool: Introduce ethnl dump helpers | expand |
On Mon, 24 Mar 2025 11:40:02 +0100 Maxime Chevallier wrote: > The patches 1 and 2 introduce the support for filtered DUMPs, where an > ifindex/ifname can be passed in the request header for the DUMP > operation. This is for when we want to dump everything a netdev > supports, but without doing so for every single netdev. ethtool's > "--show-phys ethX" option for example performs a filtered dump. > > Patch 3 introduces 3 new ethnl ops : > ->dump_start() to initialize a dump context > ->dump_one_dev(), that can be implemented per-command to dump > everything on a given netdev > ->dump_done() to release the context Did you consider ignoring the RSS and focusing purely on PHYs? The 3 callbacks are a bit generic, but we end up primarily using them for PHY stuff. And the implementations still need to call ethnl_req_get_phydev() AFAICT
Hi Jakub, On Tue, 25 Mar 2025 14:31:11 -0700 Jakub Kicinski <kuba@kernel.org> wrote: > On Mon, 24 Mar 2025 11:40:02 +0100 Maxime Chevallier wrote: > > The patches 1 and 2 introduce the support for filtered DUMPs, where an > > ifindex/ifname can be passed in the request header for the DUMP > > operation. This is for when we want to dump everything a netdev > > supports, but without doing so for every single netdev. ethtool's > > "--show-phys ethX" option for example performs a filtered dump. > > > > Patch 3 introduces 3 new ethnl ops : > > ->dump_start() to initialize a dump context > > ->dump_one_dev(), that can be implemented per-command to dump > > everything on a given netdev > > ->dump_done() to release the context > > Did you consider ignoring the RSS and focusing purely on PHYs? > The 3 callbacks are a bit generic, but we end up primarily > using them for PHY stuff. And the implementations still need > to call ethnl_req_get_phydev() AFAICT True, one can even argue that the start() and done() aren't really useful (allocate/free a ctx, we only really need to know the size of the context), we'd end-up with just one dedicated helper for PHY dump. I'll rework this and spin a new version when net-next re-opens, and I'll clarify the DUMP behaviour for filtering, based on the discussin with Köry. Thanks a lot for taking a look then, Maxime