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

From: Guillaume Nault <[email-masked]>
Date: Wed, 4 Sep 2024 14:29:44 +0200

On Tue, Sep 03, 2024 at 11:34:02AM -0700, Jakub Kicinski wrote:
> On Fri, 30 Aug 2024 17:31:07 +0200 Guillaume Nault wrote:
> > Bareudp devices update their stats concurrently.
> > Therefore they need proper atomic increments.
> 
> 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.

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