aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sfc/tx.c
diff options
context:
space:
mode:
authorAndrew Rybchenko <Andrew.Rybchenko@oktetlabs.ru>2014-07-17 12:10:43 +0100
committerDavid S. Miller <davem@davemloft.net>2014-07-17 16:48:36 -0700
commit8ccf3800dbdeaf26bcdefa471c9c8e0da7e6ec7a (patch)
treee88c2ea06aaed738991c1f3336c088f1eb9181c2 /drivers/net/ethernet/sfc/tx.c
parentMerge branch 'be2net-next' (diff)
downloadlinux-dev-8ccf3800dbdeaf26bcdefa471c9c8e0da7e6ec7a.tar.xz
linux-dev-8ccf3800dbdeaf26bcdefa471c9c8e0da7e6ec7a.zip
sfc: Add per-queue statistics in ethtool
Implement per channel software TX and RX packet counters accessed as ethtool statistics. This allows confirmation with MAC statistics. Signed-off-by: Shradha Shah <sshah@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/sfc/tx.c')
-rw-r--r--drivers/net/ethernet/sfc/tx.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/sfc/tx.c b/drivers/net/ethernet/sfc/tx.c
index ede8dcca0ff3..283e5f87b09f 100644
--- a/drivers/net/ethernet/sfc/tx.c
+++ b/drivers/net/ethernet/sfc/tx.c
@@ -452,6 +452,8 @@ finish_packet:
/* Pass off to hardware */
efx_nic_push_buffers(tx_queue);
+ tx_queue->tx_packets++;
+
efx_tx_maybe_stop_queue(tx_queue);
return NETDEV_TX_OK;
@@ -1245,6 +1247,8 @@ static int tso_start_new_packet(struct efx_tx_queue *tx_queue,
++tx_queue->tso_packets;
+ ++tx_queue->tx_packets;
+
return 0;
}