diff options
author | Alexander Duyck <alexander.h.duyck@intel.com> | 2012-08-08 05:23:22 +0000 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2012-09-20 02:30:32 -0700 |
commit | ae1c07a6b7ced6c0c94c99e3b53f4e7856fa8bff (patch) | |
tree | 95f4b95077c450fccede70fb20d2c922369d433a /drivers/net/ethernet/intel | |
parent | aee77e4accbeb2c86b1d294cd84fec4a12dde3bd (diff) | |
download | linux-stable-ae1c07a6b7ced6c0c94c99e3b53f4e7856fa8bff.tar.gz linux-stable-ae1c07a6b7ced6c0c94c99e3b53f4e7856fa8bff.tar.bz2 linux-stable-ae1c07a6b7ced6c0c94c99e3b53f4e7856fa8bff.zip |
igb: Remove artificial restriction on RQDPC stat reading
For some reason the reading of the RQDPC register was being artificially
limited to 4K. Instead of limiting the value we should read the value and
add the full amount. Otherwise this can lead to a misleading number of
dropped packets when the actual value is in fact much higher.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel')
-rw-r--r-- | drivers/net/ethernet/intel/igb/igb_main.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c index 19d7666dfccb..246646b61a1a 100644 --- a/drivers/net/ethernet/intel/igb/igb_main.c +++ b/drivers/net/ethernet/intel/igb/igb_main.c @@ -4681,11 +4681,13 @@ void igb_update_stats(struct igb_adapter *adapter, bytes = 0; packets = 0; for (i = 0; i < adapter->num_rx_queues; i++) { - u32 rqdpc_tmp = rd32(E1000_RQDPC(i)) & 0x0FFF; + u32 rqdpc = rd32(E1000_RQDPC(i)); struct igb_ring *ring = adapter->rx_ring[i]; - ring->rx_stats.drops += rqdpc_tmp; - net_stats->rx_fifo_errors += rqdpc_tmp; + if (rqdpc) { + ring->rx_stats.drops += rqdpc; + net_stats->rx_fifo_errors += rqdpc; + } do { start = u64_stats_fetch_begin_bh(&ring->rx_syncp); |