All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Kerr <jk@codeconstruct.com.au>
To: David Ahern <dsahern@kernel.org>,
	 "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	 Jakub Kicinski <kuba@kernel.org>,
	Paolo Abeni <pabeni@redhat.com>
Cc: netdev@vger.kernel.org
Subject: [PATCH net-next v2 0/3] net: core: Unify dstats with tstats and lstats, add generic collection helper
Date: Wed, 05 Jun 2024 17:42:56 +0800	[thread overview]
Message-ID: <20240605-dstats-v2-0-7fae03f813f3@codeconstruct.com.au> (raw)

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
helper (dev_get_dstats64) for ->ndo_get_stats64, and updates the single
driver (vrf) to use this helper.

Of course, questions/comments/etc are most welcome!

Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
---
v2:
- use correct percpu var in dev_fetch_dstats
- use correct accessor in vfr rx drop accounting
- Link to 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         | 57 +++++++++++++++--------------------------------
 include/linux/netdevice.h | 15 ++++++++-----
 net/core/dev.c            | 56 ++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 83 insertions(+), 45 deletions(-)
---
base-commit: 32f88d65f01bf6f45476d7edbe675e44fb9e1d58
change-id: 20240605-dstats-b6e08c318555

Best regards,
-- 
Jeremy Kerr <jk@codeconstruct.com.au>


             reply	other threads:[~2024-06-05  9:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-05  9:42 Jeremy Kerr [this message]
2024-06-05  9:42 ` [PATCH net-next v2 1/3] net: core,vrf: Change pcpu_dstat fields to u64_stats_t Jeremy Kerr
2024-06-05  9:42 ` [PATCH net-next v2 2/3] net: core: Implement dstats-type stats collections Jeremy Kerr
2024-06-05  9:42 ` [PATCH net-next v2 3/3] net: vrf: move to generic dstat helpers Jeremy Kerr
2024-06-06  2:02 ` [PATCH net-next v2 0/3] net: core: Unify dstats with tstats and lstats, add generic collection helper Jakub Kicinski
2024-06-06  2:11   ` Jeremy Kerr
2024-06-06  2:18     ` Jakub Kicinski
2024-06-06  3:01       ` Jeremy Kerr
2024-06-06  3:08         ` Jakub Kicinski
2024-06-06  3:24           ` Jeremy Kerr

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240605-dstats-v2-0-7fae03f813f3@codeconstruct.com.au \
    --to=jk@codeconstruct.com.au \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.