diff options
author | Jeremy Kerr <jk@codeconstruct.com.au> | 2024-06-07 18:25:25 +0800 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-06-11 19:24:56 -0700 |
commit | 94b601bc4f8528262b2b83194b7fd3fc2a6da75a (patch) | |
tree | f5d6816a8ed5f6f68d2fe667e516cb43a0d34042 /net/ipv4/tcp_ipv4.c | |
parent | fa59dc2f6fc616fde3941f62ccd4adcaa21ccd47 (diff) |
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>
Diffstat (limited to 'net/ipv4/tcp_ipv4.c')
0 files changed, 0 insertions, 0 deletions