From: Jeff Garzik <jeff@garzik•org>
To: Denis Kirjanov <dkirjanov@kernel•org>
Cc: netdev@vger•kernel.org, davem@davemloft•net,
Eric Dumazet <eric.dumazet@gmail•com>,
Ben Hutchings <bhutchings@solarflare•com>
Subject: Re: [PATCH -next] sundance: Add initial ethtool stats support
Date: Sat, 09 Oct 2010 17:48:38 -0400 [thread overview]
Message-ID: <4CB0E336.9010605@garzik.org> (raw)
In-Reply-To: <4CB0C56C.2000106@kernel.org>
On 10/09/2010 03:41 PM, Denis Kirjanov wrote:
> On 10/09/2010 05:27 PM, Ben Hutchings wrote:
>> Denis Kirjanov wrote:
>>> Add initial ethtool statistics support
>> [...]
>>> +static void get_ethtool_stats(struct net_device *dev,
>>> + struct ethtool_stats *stats, u64 *data)
>>> +{
>>> + struct net_device_stats *netdev_stats = get_stats(dev);
>>> + int i = 0;
>>> +
>>> + data[i++] = netdev_stats->tx_packets;
>>> + data[i++] = netdev_stats->tx_bytes;
>>> + data[i++] = netdev_stats->rx_packets;
>>> + data[i++] = netdev_stats->rx_bytes;
>>> + data[i++] = netdev_stats->tx_errors;
>>> + data[i++] = netdev_stats->tx_dropped;
>>> + data[i++] = netdev_stats->rx_errors;
>>> +}
>> [...]
>>
>> There is no point in adding ethtool stats that merely mirror the baseline
>> net device stats.
>>
>> Ben.
>>
>
> [PATCH -next v2] sundance: Add ethtool stats support
>
> Add ethtool stats support
>
> Signed-off-by: Denis Kirjanov<dkirjanov@kernel•org>
> ---
> V2:
> check for the ETH_SS_STATS in get_string()
> use xstats struct for ethtool stats
>
> drivers/net/sundance.c | 90 ++++++++++++++++++++++++++++++++++++++++++++----
> 1 files changed, 83 insertions(+), 7 deletions(-)
Acked-by: Jeff Garzik <jgarzik@redhat•com>
glad somebody tackled this...
next prev parent reply other threads:[~2010-10-09 21:48 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-09 9:53 [PATCH -next] sundance: Add initial ethtool stats support Denis Kirjanov
2010-10-09 12:17 ` [PATCH net-next] sundance: get_stats proper locking Eric Dumazet
2010-10-09 16:24 ` David Miller
2010-10-09 12:33 ` [PATCH -next] sundance: Add initial ethtool stats support Eric Dumazet
2010-10-09 13:27 ` Ben Hutchings
2010-10-09 14:40 ` Denis Kirjanov
2010-10-09 19:41 ` Denis Kirjanov
2010-10-09 21:48 ` Jeff Garzik [this message]
2010-10-12 18:51 ` David Miller
2010-10-12 20:36 ` Denis Kirjanov
2010-10-12 20:57 ` Joe Perches
2010-10-13 6:06 ` Denis Kirjanov
2010-10-13 6:33 ` Eric Dumazet
2010-10-13 7:02 ` Denis Kirjanov
2010-10-13 10:28 ` Denis Kirjanov
2010-10-13 10:36 ` Eric Dumazet
2010-10-13 10:56 ` Denis Kirjanov
2010-10-13 19:44 ` Eric Dumazet
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=4CB0E336.9010605@garzik.org \
--to=jeff@garzik$(echo .)org \
--cc=bhutchings@solarflare$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=dkirjanov@kernel$(echo .)org \
--cc=eric.dumazet@gmail$(echo .)com \
--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