Skip to content

net: core: Unify dstats with tstats and lstats, implement generic dstats collection

Jeremy Kerr netdev 3 versions – Applied

Status from this message: This series was applied to netdev/net-next.git (main)

Get series with b4
b4 am [email protected] change-id 20240605-dstats-b6e08c318555

Versions newest first

  1. v3 Latest3 patches 4 repliesApplied 3/3
  2. v23 patches 6 repliesSuperseded
  3. v13 patches 1 replySuperseded

Changes in v3 from the cover letter

- rather than exposing helpers, perform dstat collection implicitly when type == NETDEV_PCPU_STAT_DSTAT
- Link to v2:
https://lore.kernel.org/r/[email protected]

Patches in v3 All 3 applied

#Subject and filesSizeRepliesApplied
1/3net: core,vrf: Change pcpu_dstat fields to u64_stats_tdrivers/net/vrf.c include/linux/netdevice.h+28 -221 replyApplied
2/3net: core: Implement dstats-type stats collectionsnet/core/dev.c+50 -01 replyApplied
3/3net: vrf: move to generic dstat helpersdrivers/net/vrf.c+0 -281 replyApplied

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchSimon HormanDavid Ahern
SeriesR-b
1/3R-b
2/3R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH net-next v3 0/3] 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:
- rather than exposing helpers, perform dstat collection implicitly when type == NETDEV_PCPU_STAT_DSTAT
- Link to v2:
https://lore.kernel.org/r/[email protected]

---
v2:
- use correct percpu var in dev_fetch_dstats
- use correct accessor in vfr rx drop accounting
- v1: https://lore.kernel.org/r/[email protected]

---
Jeremy Kerr (3):
net: core,vrf: Change pcpu_dstat fields to u64_stats_t
net: core: Implement dstats-type stats collections
net: vrf: move to generic dstat helpers

 drivers/net/vrf.c         | 56 ++++++++++++++---------------------------------
 include/linux/netdevice.h | 12 +++++-----
 net/core/dev.c            | 50 ++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 73 insertions(+), 45 deletions(-)

---
base-commit: 32f88d65f01bf6f45476d7edbe675e44fb9e1d58
change-id: 20240605-dstats-b6e08c318555

Best regards,

Signature · 1 line
Jeremy Kerr <[email protected]>