fm10k: Corrected an error in Tx statistics
authorJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 3 Apr 2015 20:26:51 +0000 (13:26 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Tue, 14 Apr 2015 21:42:27 +0000 (14:42 -0700)
The function collecting Tx statistics was actually using values from the RX
ring. Thus, Tx and Rx statistics values reported by "ifconfig" will
return identical values. This change corrects this error and the Tx
statistics is now reading from the Tx ring.

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Acked-by: Matthew Vick <matthew.vick@intel.com>
Tested-by: Krishneil Singh <krishneil.k.singh@intel.com>
drivers/net/ethernet/intel/fm10k/fm10k_netdev.c

index d5b303dad95e439258ab50f95ca3c9b73a4aa874..a7db5e20e1f7eb52cc758e4166f074206d8fb325 100644 (file)
@@ -1,5 +1,5 @@
 /* Intel Ethernet Switch Host Interface Driver
- * Copyright(c) 2013 - 2014 Intel Corporation.
+ * Copyright(c) 2013 - 2015 Intel Corporation.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms and conditions of the GNU General Public License,
@@ -1126,7 +1126,7 @@ static struct rtnl_link_stats64 *fm10k_get_stats64(struct net_device *netdev,
        }
 
        for (i = 0; i < interface->num_tx_queues; i++) {
-               ring = ACCESS_ONCE(interface->rx_ring[i]);
+               ring = ACCESS_ONCE(interface->tx_ring[i]);
 
                if (!ring)
                        continue;