[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3aaa7117-ded8-4d3d-acdc-82a1e9fb73b8@kernel.org>
Date: Wed, 4 Sep 2024 19:50:55 -0600
From: David Ahern <dsahern@...nel.org>
To: Guillaume Nault <gnault@...hat.com>, Jakub Kicinski <kuba@...nel.org>
Cc: David Miller <davem@...emloft.net>, Paolo Abeni <pabeni@...hat.com>,
Eric Dumazet <edumazet@...gle.com>, netdev@...r.kernel.org,
Martin Varghese <martin.varghese@...ia.com>,
Willem de Bruijn <willemb@...gle.com>
Subject: Re: [PATCH net] bareudp: Fix device stats updates.
On 9/4/24 11:54 AM, Guillaume Nault wrote:
> [Adding David Ahern for the vrf/dstats discussion]
>
> On Wed, Sep 04, 2024 at 07:57:32AM -0700, Jakub Kicinski wrote:
>> 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.
>
> Looks like dummy had its own dstats, yes. But those dstats were really
> like the current lstats (packets and bytes counters, nothing for
> drops). Dummy was later converted to lstats by commit 4a43b1f96b1d
> ("net: dummy: use standard dev_lstats_add() and dev_lstats_read()").
>
> The dstats we have now really come from vrf (different counters for tx
> and rx and counters for packet drops), which had its own implementation
> at that time.
>
> My understanding is that vrf implemented its own dstats in order to
> have per-cpu counters for regular bytes/packets counters and also for
> packet drops.
VRF was following other per-cpu counters that existed in 2015-2016
timeframe.
I have no preference on the naming; just wanted per-cpu counters.
Powered by blists - more mailing lists