mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ian Campbell <ijc@hellion.org.uk>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] cs89x0 collect tx_bytes statistics.
Date: Wed, 27 Jul 2005 14:09:22 +0100	[thread overview]
Message-ID: <1122469762.29501.253.camel@icampbell-debian> (raw)
In-Reply-To: <20050628155158.396f676c.akpm@osdl.org>

On Tue, 2005-06-28 at 15:51 -0700, Andrew Morton wrote:
> Ian Campbell <ijc@hellion.org.uk> wrote:
> >
> > The cs89x0 driver does not collect tx_bytes statistics which breaks
> > traffic monitoring on my firewall.
> 
> The patch looks odd.  It records the length of the current outgoing frame
> in the device-global netdev structure and then, at tx interupt time it adds
> that value into the stats field.
> 
> Why not just do:

I finally got a hold of the device I needed to test this and it works
fine, not that anyone would have expected differently...

Signed-off-by: Ian Campbell <icampbell@arcom.com>

%patch
Index: 2.6/drivers/net/cs89x0.c
===================================================================
--- 2.6.orig/drivers/net/cs89x0.c	2005-07-25 16:39:53.000000000 +0100
+++ 2.6/drivers/net/cs89x0.c	2005-07-27 13:34:11.000000000 +0100
@@ -1450,6 +1450,7 @@
 	/* Write the contents of the packet */
 	outsw(dev->base_addr + TX_FRAME_PORT,skb->data,(skb->len+1) >>1);
 	spin_unlock_irq(&lp->lock);
+	lp->stats.tx_bytes += skb->len;
 	dev->trans_start = jiffies;
 	dev_kfree_skb (skb);
 


-- 
Ian Campbell
Current Noise: Enslaved - Return to Yggdrasill

Dentist, n.:
	A Prestidigitator who, putting metal in one's mouth, pulls
	coins out of one's pockets.
		-- Ambrose Bierce, "The Devil's Dictionary"


           reply	other threads:[~2005-07-27 13:09 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20050628155158.396f676c.akpm@osdl.org>]

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=1122469762.29501.253.camel@icampbell-debian \
    --to=ijc@hellion.org.uk \
    --cc=akpm@osdl.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®