diff options
| author | Jakub Kicinski <kuba@kernel.org> | 2024-06-11 19:24:58 -0700 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2024-06-11 19:24:58 -0700 |
| commit | bfc65070a3767dd04bff32ef896394ba63cef085 (patch) | |
| tree | eee33772358f869f92af32d164ec187af273dc9c /include/linux/netdevice.h | |
| parent | 45403b12c29c5d9510ace1ad767ea4b13a4caf38 (diff) | |
| parent | 2202576d4631b977a95162a387c0c9fb4ca6819c (diff) | |
Merge branch 'net-core-unify-dstats-with-tstats-and-lstats-implement-generic-dstats-collection'
Jeremy Kerr says:
====================
net: core: Unify dstats with tstats and lstats, implement generic dstats collection
The struct pcpu_dstats ("dstats") has a few variations from the other
two stats types (struct pcpu_sw_netstats and struct pcpu_lstats), and
doesn't have generic helpers for collecting the per-cpu stats into a
struct rtnl_link_stats64.
This change unifies dstats with the other types, adds a collection
implementation to the core, and updates the single driver (vrf) to use
this generic implementation.
Of course, questions/comments/etc are most welcome!
v3: https://lore.kernel.org/r/20240605-dstats-v2-0-7fae03f813f3@codeconstruct.com.au
v2: v1: https://lore.kernel.org/r/20240605-dstats-v1-0-1024396e1670@codeconstruct.com.au
====================
Link: https://lore.kernel.org/r/20240607-dstats-v3-0-cc781fe116f7@codeconstruct.com.au
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/linux/netdevice.h')
| -rw-r--r-- | include/linux/netdevice.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index d20c6c99eb88..f148a01dd1d1 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -2731,12 +2731,12 @@ struct pcpu_sw_netstats { } __aligned(4 * sizeof(u64)); struct pcpu_dstats { - u64 rx_packets; - u64 rx_bytes; - u64 rx_drops; - u64 tx_packets; - u64 tx_bytes; - u64 tx_drops; + u64_stats_t rx_packets; + u64_stats_t rx_bytes; + u64_stats_t rx_drops; + u64_stats_t tx_packets; + u64_stats_t tx_bytes; + u64_stats_t tx_drops; struct u64_stats_sync syncp; } __aligned(8 * sizeof(u64)); |
