From: Miquel RAYNAL <miquel.raynal@free-electrons.com>
To: "David S . Miller" <davem@davemloft.net>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
Antoine Tenart <antoine.tenart@free-electrons.com>,
Gregory Clement <gregory.clement@free-electrons.com>,
Nadav Haklai <nadavh@marvell.com>,
netdev@vger.kernel.org, Stefan Chulski <stefanc@marvell.com>,
Florian Fainelli <f.fainelli@gmail.com>,
Andrew Lunn <andrew@lunn.ch>
Subject: Re: [PATCH net-next v2] net: mvpp2: add ethtool GOP statistics
Date: Fri, 3 Nov 2017 12:26:22 +0100 [thread overview]
Message-ID: <20171103122622.24bbf67d@xps13> (raw)
In-Reply-To: <20171103110425.16097-1-miquel.raynal@free-electrons.com>
On Fri, 3 Nov 2017 12:04:25 +0100
Miquel Raynal <miquel.raynal@free-electrons.com> wrote:
> Add ethtool statistics support by reading the GOP statistics from the
> hardware counters. Also implement a workqueue to gather the statistics
> every second or some 32-bit counters could overflow.
>
> Suggested-by: Stefan Chulski <stefanc@marvell.com>
> Signed-off-by: Miquel Raynal <miquel.raynal@free-electrons.com>
> ---
Changes since v1:
- Constified the ethtool array (with strings and offset) and added a
third parameter to the repeated structure: if the register is 64-bit
wide.
- Added locking inside the mvpp2_gather_stats() to avoid starting
reading the registers while a read is already pending.
- Used devm_* allocators.
- Switched to cancel_delayed_work_sync().
- Fixed the size allocated to the statistics array.
- Added an index to the workqueue name, derived with IDA because the
name shown in 'ps' is only 15 chars wide (so must be short) and there
was no existing way to retrieve a unique number per engine instance.
- Start gathering the statistics only in ndo_start(), stop in
ndo_stop().
Best regards,
Miquèl
next prev parent reply other threads:[~2017-11-03 11:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-03 11:04 [PATCH net-next v2] net: mvpp2: add ethtool GOP statistics Miquel Raynal
2017-11-03 11:26 ` Miquel RAYNAL [this message]
2017-11-03 15:19 ` Andrew Lunn
2017-11-06 10:06 ` Miquel RAYNAL
2017-11-06 14:25 ` Andrew Lunn
2017-11-06 21:02 ` Miquel RAYNAL
[not found] ` <09d456be927a46c0970bd677651a4098@IL-EXCH01.marvell.com>
2017-11-06 22:45 ` Miquel RAYNAL
2017-11-07 8:22 ` [EXT] " Stefan Chulski
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=20171103122622.24bbf67d@xps13 \
--to=miquel.raynal@free-electrons.com \
--cc=andrew@lunn.ch \
--cc=antoine.tenart@free-electrons.com \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=gregory.clement@free-electrons.com \
--cc=nadavh@marvell.com \
--cc=netdev@vger.kernel.org \
--cc=stefanc@marvell.com \
--cc=thomas.petazzoni@free-electrons.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).