All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@pobox.com>
To: klassert@mathematik.tu-chemnitz.de, Andrew Morton <akpm@osdl.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] 3c59x: support more ethtool_ops
Date: Tue, 11 Jan 2005 14:42:48 -0500	[thread overview]
Message-ID: <41E42C38.1090903@pobox.com> (raw)
In-Reply-To: <200501111913.j0BJDnIL009341@hera.kernel.org>

Linux Kernel Mailing List wrote:
> +static void vortex_get_ethtool_stats(struct net_device *dev,
> +	struct ethtool_stats *stats, u64 *data)
> +{
> +	struct vortex_private *vp = netdev_priv(dev);
> +	unsigned long flags;
> +
> +	spin_lock_irqsave(&vp->lock, flags);
> +	update_stats(dev->base_addr, dev);
> +	spin_unlock_irqrestore(&vp->lock, flags);
> +
> +	data[0] = vp->stats.rx_packets;
> +	data[1] = vp->stats.tx_packets;
> +	data[2] = vp->stats.rx_bytes;
> +	data[3] = vp->stats.tx_bytes;
> +	data[4] = vp->stats.collisions;
> +	data[5] = vp->stats.tx_carrier_errors;
> +	data[6] = vp->stats.tx_heartbeat_errors;
> +	data[7] = vp->stats.tx_window_errors;
> +}

Everything in the patch is correct except for the above.

This is very wrong -- get_ethtool_stats() is for NIC-specific stats. 
The above stats are already available through the generic net stack.

	Jeff



       reply	other threads:[~2005-01-11 19:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200501111913.j0BJDnIL009341@hera.kernel.org>
2005-01-11 19:42 ` Jeff Garzik [this message]
2005-01-12 15:49   ` [PATCH] 3c59x: support more ethtool_ops Steffen Klassert
2005-01-12 18:38     ` Jeff Garzik

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=41E42C38.1090903@pobox.com \
    --to=jgarzik@pobox.com \
    --cc=akpm@osdl.org \
    --cc=klassert@mathematik.tu-chemnitz.de \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.