Message ID | 20240607-dstats-v3-0-cc781fe116f7@codeconstruct.com.au (mailing list archive) |
---|---|
Headers | show |
Series | net: core: Unify dstats with tstats and lstats, implement generic dstats collection | expand |
On 6/7/24 4:25 AM, Jeremy Kerr wrote: > 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! > > Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au> > --- > v3: > - rather than exposing helpers, perform dstat collection implicitly when > type == NETDEV_PCPU_STAT_DSTAT > - Link to v2: > https://lore.kernel.org/r/20240605-dstats-v2-0-7fae03f813f3@codeconstruct.com.au > > --- > v2: > - use correct percpu var in dev_fetch_dstats > - use correct accessor in vfr rx drop accounting > - v1: https://lore.kernel.org/r/20240605-dstats-v1-0-1024396e1670@codeconstruct.com.au > > --- > 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, For the set: Reviewed-by: David Ahern <dsahern@kernel.org> thanks
Hello: This series was applied to netdev/net-next.git (main) by Jakub Kicinski <kuba@kernel.org>: On Fri, 07 Jun 2024 18:25:23 +0800 you wrote: > 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. > > [...] Here is the summary with links: - [net-next,v3,1/3] net: core,vrf: Change pcpu_dstat fields to u64_stats_t https://git.kernel.org/netdev/net-next/c/fa59dc2f6fc6 - [net-next,v3,2/3] net: core: Implement dstats-type stats collections https://git.kernel.org/netdev/net-next/c/94b601bc4f85 - [net-next,v3,3/3] net: vrf: move to generic dstat helpers https://git.kernel.org/netdev/net-next/c/2202576d4631 You are awesome, thank you!
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! Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au> --- v3: - rather than exposing helpers, perform dstat collection implicitly when type == NETDEV_PCPU_STAT_DSTAT - Link to v2: https://lore.kernel.org/r/20240605-dstats-v2-0-7fae03f813f3@codeconstruct.com.au --- v2: - use correct percpu var in dev_fetch_dstats - use correct accessor in vfr rx drop accounting - v1: https://lore.kernel.org/r/20240605-dstats-v1-0-1024396e1670@codeconstruct.com.au --- 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,