Subject: Re: [PATCH net] bareudp: Fix device stats updates.

From: Jakub Kicinski <[email-masked]>
Date: Wed, 4 Sep 2024 07:57:32 -0700

On Wed, 4 Sep 2024 14:29:44 +0200 Guillaume Nault wrote:
> > The driver already uses struct pcpu_sw_netstats, would it make sense to
> > bump it up to struct pcpu_dstats and have per CPU rx drops as well?  
> 
> Long term, I was considering moving bareudp to use dev->tstats for
> packets/bytes and dev->core_stats for drops. It looks like dev->dstats
> is only used for VRF, so I didn't consider it.

Right, d stands for dummy so I guess they also were used by dummy 
at some stage? Mostly I think it's a matter of the other stats being
less recent.

> Should we favour dev->dstats for tunnels instead of combining ->tstats
> and ->core_stats? (vxlan uses the later for example).

Seems reasonable to me. Not important enough to convert existing
drivers, maybe, unless someone sees contention. But in new code,
or if we're touching the relevant lines I reckon we should consider it?
No strong feelings tho, LMK if you want to send v2 or keep this patch
as is.