All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jay Cliburn <jacliburn@bellsouth.net>
To: jeff@garzik.org
Cc: Chris Snook <csnook@redhat.com>,
	jie.yang@atheros.com, netdev@vger.kernel.org
Subject: [PATCH] atl2: add tx bytes statistic
Date: Sat, 20 Sep 2008 18:47:05 -0500	[thread overview]
Message-ID: <20080920184705.46ba1669@osprey.hogchain.net> (raw)

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


             reply	other threads:[~2008-09-20 23:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-20 23:47 Jay Cliburn [this message]
2008-09-25  2:15 ` [PATCH] atl2: add tx bytes statistic 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=20080920184705.46ba1669@osprey.hogchain.net \
    --to=jacliburn@bellsouth.net \
    --cc=csnook@redhat.com \
    --cc=jeff@garzik.org \
    --cc=jie.yang@atheros.com \
    --cc=netdev@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.