On 11/13/23 10:57 AM, Simon Horman wrote:
On Sun, Nov 12, 2023 at 09:30:03PM +0100, Daniel Borkmann wrote:
Move {l,t,d}stats allocation to the core and let netdevs pick the stats
type they need. That way the driver doesn't have to bother with error
handling (allocation failure checking, making sure free happens in the
right spot, etc) - all happening in the core.
Co-developed-by: Jakub Kicinski <kuba@xxxxxxxxxx>
Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
Signed-off-by: Daniel Borkmann <daniel@xxxxxxxxxxxxx>
Cc: David Ahern <dsahern@xxxxxxxxxx>
...
@@ -2354,6 +2361,7 @@ struct net_device {
void *ml_priv;
enum netdev_ml_priv_type ml_priv_type;
+ enum netdev_stat_type pcpu_stat_type:8;
Hi Daniel,
nit: Please consider adding documentation for this new field to
the kernel doc for net_device.
Will add, thanks Simon!