Skip to contentSkip to conversation

atl2: add tx bytes statistic

PATCH Applied Jay Cliburn 2 participants 2 messages Sep 20, 2008 – Sep 25, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 atl2: add tx bytes statistic

From: Jay Cliburn <[email protected]>
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.

---
 drivers/net/atlx/atl2.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
drivers/net/atlx/atl2.c +3 -1
index b2995ac..4f82f66 100644
@@ -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++;
 
Signature · 1 line
1.5.5.1
Applied
#1 lore raw
Quoted 16 lines · Jay Cliburn

From: Jay Cliburn <[email protected]>
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.

---
 drivers/net/atlx/atl2.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
drivers/net/atlx/atl2.c +0 -0
index b2995ac..4f82f66 100644

drivers/net/atlx/atl2.c static void atl2_intr_tx(struct atl2_adapter *adapter) · line 527

Quoted 7 lines
drivers/net/atlx/atl2.c +2 -1
@@ -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