* [PATCH] atl2: add tx bytes statistic
@ 2008-09-20 23:47 Jay Cliburn
2008-09-25 2:15 ` Jeff Garzik
0 siblings, 1 reply; 2+ messages in thread
From: Jay Cliburn @ 2008-09-20 23:47 UTC (permalink / raw)
To: jeff; +Cc: Chris Snook, jie.yang, netdev
From: Jay Cliburn <jacliburn@bellsouth.net>
Date: Sat, 20 Sep 2008 17:37:05 -0500
Subject: [PATCH] atl2: add tx bytes statistic
Let's see how many bytes have been transmitted.
Signed-off-by: Jay Cliburn <jacliburn@bellsouth.net>
---
drivers/net/atlx/atl2.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/net/atlx/atl2.c b/drivers/net/atlx/atl2.c
index b2995ac..4f82f66 100644
--- a/drivers/net/atlx/atl2.c
+++ b/drivers/net/atlx/atl2.c
@@ -522,8 +522,10 @@ static void atl2_intr_tx(struct atl2_adapter *adapter)
atomic_set(&adapter->txd_read_ptr, (int)txd_read_ptr);
/* tx statistics: */
- if (txs->ok)
+ if (txs->ok) {
+ adapter->net_stats.tx_bytes += txs->pkt_size;
adapter->net_stats.tx_packets++;
+ }
else
adapter->net_stats.tx_errors++;
--
1.5.5.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] atl2: add tx bytes statistic
2008-09-20 23:47 [PATCH] atl2: add tx bytes statistic Jay Cliburn
@ 2008-09-25 2:15 ` Jeff Garzik
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2008-09-25 2:15 UTC (permalink / raw)
To: Jay Cliburn; +Cc: Chris Snook, jie.yang, netdev
Jay Cliburn wrote:
> From: Jay Cliburn <jacliburn@bellsouth.net>
> Date: Sat, 20 Sep 2008 17:37:05 -0500
> Subject: [PATCH] atl2: add tx bytes statistic
>
> Let's see how many bytes have been transmitted.
>
> Signed-off-by: Jay Cliburn <jacliburn@bellsouth.net>
> ---
> drivers/net/atlx/atl2.c | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/atlx/atl2.c b/drivers/net/atlx/atl2.c
> index b2995ac..4f82f66 100644
> --- a/drivers/net/atlx/atl2.c
> +++ b/drivers/net/atlx/atl2.c
> @@ -522,8 +522,10 @@ static void atl2_intr_tx(struct atl2_adapter *adapter)
> atomic_set(&adapter->txd_read_ptr, (int)txd_read_ptr);
>
> /* tx statistics: */
> - if (txs->ok)
> + if (txs->ok) {
> + adapter->net_stats.tx_bytes += txs->pkt_size;
> adapter->net_stats.tx_packets++;
applied
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-09-25 2:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-20 23:47 [PATCH] atl2: add tx bytes statistic Jay Cliburn
2008-09-25 2:15 ` Jeff Garzik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).