Jeremy Kerr 94b601bc4f net: core: Implement dstats-type stats collections
We currently have dev_get_tstats64() for collecting per-cpu stats of
type pcpu_sw_netstats ("tstats"). However, tstats doesn't allow for
accounting tx/rx drops. We do have a stats variant that does have stats
for dropped packets: struct pcpu_dstats, but there are no core helpers
for using those stats.

The VRF driver uses dstats, by providing its own collation/fetch
functions to do so.

This change adds a common implementation for dstats-type collection,
used when pcpu_stat_type == NETDEV_PCPU_STAT_DSTAT. This is based on the
VRF driver's existing stats collator (plus the unused tx_drops stat from
there). We will switch the VRF driver to use this in the next change.

Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
Reviewed-by: Simon Horman <horms@kernel.org>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link: https://lore.kernel.org/r/20240607-dstats-v3-2-cc781fe116f7@codeconstruct.com.au
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-06-11 19:24:56 -07:00
..
2024-05-29 09:25:15 -07:00
2024-05-18 10:32:39 -07:00
2024-06-10 18:02:14 -07:00
2024-06-05 10:18:06 +01:00
2024-02-20 15:32:45 +01:00
2024-06-10 11:54:18 +01:00
2024-01-11 10:07:29 -08:00
2024-05-28 07:27:29 -07:00
2024-06-10 17:40:26 -07:00
2024-05-18 10:32:39 -07:00
2024-05-16 09:47:45 +01:00
2024-05-23 13:51:09 -07:00
2024-06-10 17:40:26 -07:00
2024-01-31 16:41:16 -08:00