Thread (26 messages) flat view 26 messages, 3 authors, 2022-02-25

Re: [PATCH net-next 06/14] net: dev: Add hardware stats support

From: Petr Machata <petrm@nvidia.com>
Date: 2022-02-25 09:29:58

Jakub Kicinski [off-list ref] writes:
On Thu, 24 Feb 2022 15:33:27 +0200 Ido Schimmel wrote:
quoted
From: Petr Machata <petrm@nvidia.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.
quoted
  increasing only to reflect traffic measured in the device.
quoted
+	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...
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help