On Fri, 7 Mar 2025 17:50:46 +0100 Sebastian Andrzej Siewior wrote: > On 2025-03-07 08:11:35 [-0800], Jakub Kicinski wrote: > > On Fri, 7 Mar 2025 12:57:19 +0100 Sebastian Andrzej Siewior wrote: > > > The mlx5 driver supports per-channel statistics. To make support generic > > > it is required to have a template to fill the individual channel/ queue. > > > > > > Provide page_pool_ethtool_stats_get_strings_mq() to fill the strings for > > > multiple queue. > > > > Sorry to say this is useless as a common helper, you should move it > > to mlx5. > > > > The page pool stats have a standard interface, they are exposed over > > netlink. If my grep-foo isn't failing me no driver uses the exact > > strings mlx5 uses. "New drivers" are not supposed to add these stats > > to ethtool -S, and should just steer users towards the netlink stats. > > > > IOW mlx5 is and will remain the only user of this helper forever. > > Okay, so per-runqueue stats is not something other/ new drivers are > interested in? > The strings are the same, except for the rx%d_ prefix, but yes this > makes it unique. > The mlx5 folks seem to be the only one interested in this. The veth > driver for instance iterates over real_num_rx_queues and adds all > per-queue stats into one counter. It could also expose this per-runqueue > as it does with xdp_packets for instance. But then it uses the > rx_queue_%d prefix… What I'm saying is they are already available per queue, via netlink, with no driver work necessary. See tools/net/ynl/samples/page-pool.c The mlx5 stats predate the standard interface. > I don't care, I just intended to provide some generic facility so we > don't have every driver rolling its own thing. I have no problem to move > this to the mlx5 driver. Thanks, and sorry for not catching the conversation earlier.