Commit ae1c07a6 authored by Alexander Duyck's avatar Alexander Duyck Committed by Jeff Kirsher

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: default avatarAlexander Duyck <alexander.h.duyck@intel.com>
Tested-by: default avatarJeff Pieper   <jeffrey.e.pieper@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent aee77e4a
...@@ -4681,11 +4681,13 @@ void igb_update_stats(struct igb_adapter *adapter, ...@@ -4681,11 +4681,13 @@ void igb_update_stats(struct igb_adapter *adapter,
bytes = 0; bytes = 0;
packets = 0; packets = 0;
for (i = 0; i < adapter->num_rx_queues; i++) { 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]; struct igb_ring *ring = adapter->rx_ring[i];
ring->rx_stats.drops += rqdpc_tmp; if (rqdpc) {
net_stats->rx_fifo_errors += rqdpc_tmp; ring->rx_stats.drops += rqdpc;
net_stats->rx_fifo_errors += rqdpc;
}
do { do {
start = u64_stats_fetch_begin_bh(&ring->rx_syncp); start = u64_stats_fetch_begin_bh(&ring->rx_syncp);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment