[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8735k7fg53.fsf@nvidia.com>
Date: Fri, 25 Feb 2022 09:31:23 +0100
From: Petr Machata <petrm@...dia.com>
To: Jakub Kicinski <kuba@...nel.org>
CC: Ido Schimmel <idosch@...dia.com>, <netdev@...r.kernel.org>,
<davem@...emloft.net>, <petrm@...dia.com>, <jiri@...dia.com>,
<razor@...ckwall.org>, <roopa@...dia.com>, <dsahern@...il.com>,
<andrew@...n.ch>, <mlxsw@...dia.com>
Subject: Re: [PATCH net-next 06/14] net: dev: Add hardware stats support
Jakub Kicinski <kuba@...nel.org> writes:
> On Thu, 24 Feb 2022 15:33:27 +0200 Ido Schimmel wrote:
>> From: Petr Machata <petrm@...dia.com>
>>
>> Offloading switch device drivers may be able to collect statistics of the
>> traffic taking place in the HW datapath that pertains to a certain soft
>> netdevice, such as VLAN. Add the necessary infrastructure to allow exposing
>> these statistics to the offloaded netdevice in question. The API was shaped
>> by the following considerations:
>>
>> - Collection of HW statistics is not free: there may be a finite number of
>> counters, and the act of counting may have a performance impact. It is
>> therefore necessary to allow toggling whether HW counting should be done
>> for any particular SW netdevice.
>>
>> - As the drivers are loaded and removed, a particular device may get
>> offloaded and unoffloaded again. At the same time, the statistics values
>> need to stay monotonous (modulo the eventual 64-bit wraparound),
>
> monotonic
OK.
>> increasing only to reflect traffic measured in the device.
>
>> + struct rtnl_link_stats64 *offload_xstats_l3;
>
> Does it make sense to stick to rtnl_link_stats64 for this?
> There's a lot of.. historical baggage in that struct.
It seemed like a reasonable default that every tool already understands.
Was there a discussion in the past about what a cross-vendor stats suite
should look like? It seems like one of those things that can be bikeshed
forever...
Powered by blists - more mailing lists