From: Simon Horman <horms@kernel.org>
To: Breno Leitao <leitao@debian.org>
Cc: kuba@kernel.org, davem@davemloft.net, pabeni@redhat.com,
edumazet@google.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, dsahern@kernel.org,
Jiri Pirko <jiri@resnulli.us>,
Daniel Borkmann <daniel@iogearbox.net>,
Lorenzo Bianconi <lorenzo@kernel.org>,
Coco Li <lixiaoyan@google.com>
Subject: Re: [PATCH net-next 1/2] net: get stats64 if device if driver is configured
Date: Wed, 28 Feb 2024 14:34:00 +0000 [thread overview]
Message-ID: <20240228143400.GG292522@kernel.org> (raw)
In-Reply-To: <20240228113125.3473685-2-leitao@debian.org>
On Wed, Feb 28, 2024 at 03:31:21AM -0800, Breno Leitao wrote:
> If the network driver is relying in the net core to do stats allocation,
> then we want to dev_get_tstats64() instead of netdev_stats_to_stats64(),
> since there are per-cpu stats that needs to be taken in consideration.
>
> This will also simplify the drivers in regard to statistics. Once the
> driver sets NETDEV_PCPU_STAT_TSTATS, it doesn't not need to allocate the
> stacks, neither it needs to set `.ndo_get_stats64 = dev_get_tstats64`
> for the generic stats collection function anymore.
>
> Signed-off-by: Breno Leitao <leitao@debian.org>
Reviewed-by: Simon Horman <horms@kernel.org>
next prev parent reply other threads:[~2024-02-28 14:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-28 11:31 [PATCH net-next 0/2] net: collect tstats automatically Breno Leitao
2024-02-28 11:31 ` [PATCH net-next 1/2] net: get stats64 if device if driver is configured Breno Leitao
2024-02-28 14:34 ` Simon Horman [this message]
2024-02-28 11:31 ` [PATCH net-next 2/2] net: sit: Do not set .ndo_get_stats64 Breno Leitao
2024-02-28 14:34 ` Simon Horman
2024-02-29 12:00 ` [PATCH net-next 0/2] net: collect tstats automatically patchwork-bot+netdevbpf
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=20240228143400.GG292522@kernel.org \
--to=horms@kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=leitao@debian.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lixiaoyan@google.com \
--cc=lorenzo@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).