public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Ben Hutchings <bhutchings@solarflare•com>
To: Denis Kirjanov <dkirjanov@kernel•org>
Cc: davem@davemloft•net, netdev@vger•kernel.org
Subject: Re: [PATCH -next] sundance: Add initial ethtool stats support
Date: Sat, 9 Oct 2010 14:27:50 +0100	[thread overview]
Message-ID: <20101009132749.GA15074@solarflare.com> (raw)
In-Reply-To: <20101009095346.GA12951@hera.kernel.org>

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.

-- 
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

  parent reply	other threads:[~2010-10-09 13:27 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 [this message]
2010-10-09 14:40   ` Denis Kirjanov
2010-10-09 19:41   ` Denis Kirjanov
2010-10-09 21:48     ` Jeff Garzik
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=20101009132749.GA15074@solarflare.com \
    --to=bhutchings@solarflare$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=dkirjanov@kernel$(echo .)org \
    --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