All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH 1/1] cs89x0 collect tx_bytes statistics.
       [not found] ` <20050628155158.396f676c.akpm@osdl.org>
@ 2005-07-27 13:09   ` Ian Campbell
  0 siblings, 0 replies; only message in thread
From: Ian Campbell @ 2005-07-27 13:09 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel

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"


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-07-27 13:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1119948144.10852.10.camel@icampbell-debian>
     [not found] ` <20050628155158.396f676c.akpm@osdl.org>
2005-07-27 13:09   ` [PATCH 1/1] cs89x0 collect tx_bytes statistics Ian Campbell

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.