Re: [PATCH] net :mana : Add per-cpu stats for MANA device

From: Jakub Kicinski
Date: Fri Mar 08 2024 - 15:28:03 EST


On Fri, 8 Mar 2024 19:43:57 +0000 Haiyang Zhang wrote:
> > Seems unlikely, but if it does work we should enable it for all
> > devices, no driver by driver.
> There are some existing drivers, like mlx, rmnet, netvsc, etc. using percpu
> counters. Are you suggesting we add a common API for all drivers?

Hm, I don't think mlx does. The typical use case for pcpu stats so far
has been software devices which don't have queues, and implement
lockless Tx. In that case instead of recording stats on a local queue
struct we can count per-cpu and not worry about locking.