From: Eric Dumazet <eric.dumazet@gmail•com>
To: Jesse Brandeburg <jesse.brandeburg@intel•com>, davem@davemloft•net
Cc: "Venkataramanan, Anirudh" <anirudh.venkataramanan@intel•com>,
"kubakici@wp•pl" <kubakici@wp•pl>,
"netdev@vger•kernel.org" <netdev@vger•kernel.org>,
"intel-wired-lan@lists•osuosl.org"
<intel-wired-lan@lists•osuosl.org>
Subject: Re: [Intel-wired-lan] [PATCH 12/15] ice: Add stats and ethtool support
Date: Tue, 13 Mar 2018 14:44:11 -0700 [thread overview]
Message-ID: <6509601e-8fd4-d79a-731c-e4e4882ba19c@gmail.com> (raw)
In-Reply-To: <20180313141414.00007d11@intel.com>
On 03/13/2018 02:14 PM, Jesse Brandeburg wrote:
> On Tue, 13 Mar 2018 12:17:10 -0700
> Eric Dumazet <eric.dumazet@gmail•com> wrote:
>>
>> Yes, this is a recurring mistake
>>
>> See commit
>> bf909456f6a89654cb65c01fe83a4f9b133bf978 Revert "net: hns3: Add packet
>> statistics of netdev"
>
> Thanks for the pointer, that was a useful thread to review. I
> understand the point that was made about not having the netdev stats
> shown in ethtool -S. We definitely do provide per-queue stats as well
> as these regular stats in ethtool -S.
>
> I do remember from the past discussions that it *is* useless for the
> driver to keep internally any stats that were already stored via the
> get_stats NDO, and we missed it in the internal review that this driver
> was doing that, so that will be fixed.
>
> Maybe it's just that I've been doing this too long, but I regularly
> (and many other customers/users do as well) depend on the ethtool stats
> being atomically updated w.r.t. each other. This means that if I'm
> getting the over rx_packets, as well as the per-queue rx_packets, and I
> read them all at once from the driver with ethtool, then I can check
> that things are working as expected.
>
> If I have to gather the netdev stats from /proc/net/dev (which iproute2
> tool shows the /proc/net/dev stats?) and somehow atomically gather the
> ethtool -S stats. What's the user to do in this brave new world where
> ethtool doesn't at least have rx/tx bytes and packets?
I do not believe ethtool -S provides an atomic snapshot of counters anyway.
Maybe some drivers/NIC implement such a feature, but it is not documented.
In any case, that could be implemented generically (by core networking
stack), instead of being copied/pasted in many drivers, if this would be
really needed.
core networking stack would append (or insert) ndo_stats.
(The atomicity rule if really needed would need to pass an extra struct
rtnl_link_stats64 pointer to get_ethtool_stats() method)
next prev parent reply other threads:[~2018-03-13 21:44 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-09 17:21 [PATCH 00/15] Add ice driver Anirudh Venkataramanan
2018-03-09 17:21 ` [PATCH 01/15] ice: Add basic driver framework for Intel(R) E800 Series Anirudh Venkataramanan
2018-03-09 22:16 ` Jakub Kicinski
2018-03-12 16:56 ` [Intel-wired-lan] " Jeff Kirsher
2018-03-13 4:41 ` Jakub Kicinski
2018-03-09 17:21 ` [PATCH 02/15] ice: Add support for control queues Anirudh Venkataramanan
2018-03-13 2:05 ` [Intel-wired-lan] " Shannon Nelson
2018-03-14 22:16 ` Jeff Kirsher
2018-03-09 17:21 ` [PATCH 03/15] ice: Start hardware initialization Anirudh Venkataramanan
2018-03-13 2:05 ` [Intel-wired-lan] " Shannon Nelson
2018-03-14 22:05 ` Venkataramanan, Anirudh
2018-03-15 17:00 ` Shannon Nelson
2018-03-15 18:27 ` Venkataramanan, Anirudh
2018-03-09 17:21 ` [PATCH 04/15] ice: Get switch config, scheduler config and device capabilities Anirudh Venkataramanan
2018-03-13 2:05 ` [Intel-wired-lan] " Shannon Nelson
2018-03-09 17:21 ` [PATCH 05/15] ice: Get MAC/PHY/link info and scheduler topology Anirudh Venkataramanan
2018-03-09 17:21 ` [PATCH 06/15] ice: Initialize PF and setup miscellaneous interrupt Anirudh Venkataramanan
2018-03-13 2:05 ` [Intel-wired-lan] " Shannon Nelson
2018-03-09 17:21 ` [PATCH 07/15] ice: Add support for VSI allocation and deallocation Anirudh Venkataramanan
2018-03-13 2:05 ` [Intel-wired-lan] " Shannon Nelson
2018-03-09 17:21 ` [PATCH 08/15] ice: Add support for switch filter programming Anirudh Venkataramanan
2018-03-09 17:21 ` [PATCH 09/15] ice: Configure VSIs for Tx/Rx Anirudh Venkataramanan
2018-03-10 16:39 ` Stephen Hemminger
2018-03-09 17:21 ` [PATCH 10/15] ice: Implement transmit and NAPI support Anirudh Venkataramanan
2018-03-09 17:21 ` [PATCH 11/15] ice: Add support for VLANs and offloads Anirudh Venkataramanan
2018-03-09 17:21 ` [PATCH 12/15] ice: Add stats and ethtool support Anirudh Venkataramanan
2018-03-09 18:14 ` Andrew Lunn
2018-03-09 23:14 ` Jakub Kicinski
2018-03-10 2:35 ` David Miller
2018-03-13 19:05 ` Venkataramanan, Anirudh
2018-03-13 19:17 ` Eric Dumazet
2018-03-13 21:14 ` [Intel-wired-lan] " Jesse Brandeburg
2018-03-13 21:44 ` Eric Dumazet [this message]
2018-03-14 1:30 ` Toshiaki Makita
2018-03-14 15:13 ` Stephen Hemminger
2018-03-13 20:54 ` David Miller
2018-03-10 16:37 ` Stephen Hemminger
2018-03-10 16:42 ` Stephen Hemminger
2018-03-13 20:42 ` Venkataramanan, Anirudh
2018-03-09 17:21 ` [PATCH 13/15] ice: Update Tx scheduler tree for VSI multi-Tx queue support Anirudh Venkataramanan
2018-03-09 17:21 ` [PATCH 14/15] ice: Support link events, reset and rebuild Anirudh Venkataramanan
2018-03-09 17:21 ` [PATCH 15/15] ice: Implement filter sync, NDO operations and bump version Anirudh Venkataramanan
2018-03-09 18:23 ` [PATCH 00/15] Add ice driver David Miller
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=6509601e-8fd4-d79a-731c-e4e4882ba19c@gmail.com \
--to=eric.dumazet@gmail$(echo .)com \
--cc=anirudh.venkataramanan@intel$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=intel-wired-lan@lists$(echo .)osuosl.org \
--cc=jesse.brandeburg@intel$(echo .)com \
--cc=kubakici@wp$(echo .)pl \
--cc=netdev@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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