aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgbe/ixgbe_main.c
diff options
context:
space:
mode:
authorMallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com>2009-12-15 06:56:59 -0500
committerDavid S. Miller <davem@davemloft.net>2009-12-16 02:18:25 -0500
commiteb985f09b2a189bde80550e410ddfc28c4276c53 (patch)
tree7fca198a4e2aba89a5f0babc3d0e2efd1d8bbd71 /drivers/net/ixgbe/ixgbe_main.c
parenta3f92eea04101d9a8e14d50f8048cc5b7bca07a8 (diff)
ixgbe: Fix tx_restart_queue/non_eop_desc statistics counters
Fix the restart_queue and non_eop_desc counters from being double-counted. They are cumulative in each ring, so we don't want to add them to the cumulative result in the adapter's master counter. Otherwise, the stats will be inaccurate Signed-off-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com> Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ixgbe/ixgbe_main.c')
-rw-r--r--drivers/net/ixgbe/ixgbe_main.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 35ea8c93fd80..529274824931 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -4511,6 +4511,7 @@ void ixgbe_update_stats(struct ixgbe_adapter *adapter)
4511 struct ixgbe_hw *hw = &adapter->hw; 4511 struct ixgbe_hw *hw = &adapter->hw;
4512 u64 total_mpc = 0; 4512 u64 total_mpc = 0;
4513 u32 i, missed_rx = 0, mpc, bprc, lxon, lxoff, xon_off_tot; 4513 u32 i, missed_rx = 0, mpc, bprc, lxon, lxoff, xon_off_tot;
4514 u64 non_eop_descs = 0, restart_queue = 0;
4514 4515
4515 if (adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED) { 4516 if (adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED) {
4516 u64 rsc_count = 0; 4517 u64 rsc_count = 0;
@@ -4528,10 +4529,12 @@ void ixgbe_update_stats(struct ixgbe_adapter *adapter)
4528 4529
4529 /* gather some stats to the adapter struct that are per queue */ 4530 /* gather some stats to the adapter struct that are per queue */
4530 for (i = 0; i < adapter->num_tx_queues; i++) 4531 for (i = 0; i < adapter->num_tx_queues; i++)
4531 adapter->restart_queue += adapter->tx_ring[i].restart_queue; 4532 restart_queue += adapter->tx_ring[i].restart_queue;
4533 adapter->restart_queue = restart_queue;
4532 4534
4533 for (i = 0; i < adapter->num_rx_queues; i++) 4535 for (i = 0; i < adapter->num_rx_queues; i++)
4534 adapter->non_eop_descs += adapter->tx_ring[i].non_eop_descs; 4536 non_eop_descs += adapter->rx_ring[i].non_eop_descs;
4537 adapter->non_eop_descs = non_eop_descs;
4535 4538
4536 adapter->stats.crcerrs += IXGBE_READ_REG(hw, IXGBE_CRCERRS); 4539 adapter->stats.crcerrs += IXGBE_READ_REG(hw, IXGBE_CRCERRS);
4537 for (i = 0; i < 8; i++) { 4540 for (i = 0; i < 8; i++) {