netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [stable-2.6.32 PATCH] igb: rx_fifo_errors counter fix
@ 2010-10-05 23:04 Jeff Kirsher
  2010-10-05 23:14 ` David Miller
  2010-10-05 23:19 ` Greg KH
  0 siblings, 2 replies; 3+ messages in thread
From: Jeff Kirsher @ 2010-10-05 23:04 UTC (permalink / raw)
  To: greg; +Cc: stable, netdev, gospo, bphilips, Eric Dumazet, Jeff Kirsher

From: Eric Dumazet <eric.dumazet@gmail.com>

Alexey Vlasov reported insane rx_queue_drop_packet_count
(rx_fifo_errors) values.

IGB drivers is doing an accumulation for 82575, instead using a zero
value for rqdpc_total.

Reported-by: Alexey Vlasov <renton@renton.name>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Tested-by: Emil Tantilov <emil.s.tantilov@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---

 drivers/net/igb/igb_main.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index 8111776..a13705b 100644
--- a/drivers/net/igb/igb_main.c
+++ b/drivers/net/igb/igb_main.c
@@ -3552,6 +3552,7 @@ void igb_update_stats(struct igb_adapter *adapter)
 	struct e1000_hw *hw = &adapter->hw;
 	struct pci_dev *pdev = adapter->pdev;
 	u16 phy_tmp;
+	unsigned long rqdpc_total = 0;
 
 #define PHY_IDLE_ERROR_COUNT_MASK 0x00FF
 
@@ -3645,7 +3646,6 @@ void igb_update_stats(struct igb_adapter *adapter)
 
 	if (hw->mac.type != e1000_82575) {
 		u32 rqdpc_tmp;
-		u64 rqdpc_total = 0;
 		int i;
 		/* Read out drops stats per RX queue.  Notice RQDPC (Receive
 		 * Queue Drop Packet Count) stats only gets incremented, if
@@ -3660,7 +3660,6 @@ void igb_update_stats(struct igb_adapter *adapter)
 			adapter->rx_ring[i].rx_stats.drops += rqdpc_tmp;
 			rqdpc_total += adapter->rx_ring[i].rx_stats.drops;
 		}
-		adapter->net_stats.rx_fifo_errors = rqdpc_total;
 	}
 
 	/* Note RNBC (Receive No Buffers Count) is an not an exact
@@ -3668,7 +3667,7 @@ void igb_update_stats(struct igb_adapter *adapter)
 	 * one of the reason for saving it in rx_fifo_errors, as its
 	 * potentially not a true drop.
 	 */
-	adapter->net_stats.rx_fifo_errors += adapter->stats.rnbc;
+	adapter->net_stats.rx_fifo_errors = rqdpc_total + adapter->stats.rnbc;
 
 	/* RLEC on some newer hardware can be incorrect so build
 	 * our own version based on RUC and ROC */


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [stable-2.6.32 PATCH] igb: rx_fifo_errors counter fix
  2010-10-05 23:04 [stable-2.6.32 PATCH] igb: rx_fifo_errors counter fix Jeff Kirsher
@ 2010-10-05 23:14 ` David Miller
  2010-10-05 23:19 ` Greg KH
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2010-10-05 23:14 UTC (permalink / raw)
  To: jeffrey.t.kirsher; +Cc: greg, stable, netdev, gospo, bphilips, eric.dumazet

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Tue, 05 Oct 2010 16:04:09 -0700

> From: Eric Dumazet <eric.dumazet@gmail.com>
> 
> Alexey Vlasov reported insane rx_queue_drop_packet_count
> (rx_fifo_errors) values.
> 
> IGB drivers is doing an accumulation for 82575, instead using a zero
> value for rqdpc_total.
> 
> Reported-by: Alexey Vlasov <renton@renton.name>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
> Tested-by: Emil Tantilov <emil.s.tantilov@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

Acked-by: David S. Miller <davem@davemloft.net>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [stable-2.6.32 PATCH] igb: rx_fifo_errors counter fix
  2010-10-05 23:04 [stable-2.6.32 PATCH] igb: rx_fifo_errors counter fix Jeff Kirsher
  2010-10-05 23:14 ` David Miller
@ 2010-10-05 23:19 ` Greg KH
  1 sibling, 0 replies; 3+ messages in thread
From: Greg KH @ 2010-10-05 23:19 UTC (permalink / raw)
  To: Jeff Kirsher; +Cc: stable, netdev, gospo, bphilips, Eric Dumazet

On Tue, Oct 05, 2010 at 04:04:09PM -0700, Jeff Kirsher wrote:
> From: Eric Dumazet <eric.dumazet@gmail.com>
> 
> Alexey Vlasov reported insane rx_queue_drop_packet_count
> (rx_fifo_errors) values.
> 
> IGB drivers is doing an accumulation for 82575, instead using a zero
> value for rqdpc_total.
> 
> Reported-by: Alexey Vlasov <renton@renton.name>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
> Tested-by: Emil Tantilov <emil.s.tantilov@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> ---
> 
>  drivers/net/igb/igb_main.c |    5 ++---

Why isn't this needed in Linus's tree?  If it is in Linus's tree, what
is the git commit id?

Is it needed in .35?  Please, more context...

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-10-05 23:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-05 23:04 [stable-2.6.32 PATCH] igb: rx_fifo_errors counter fix Jeff Kirsher
2010-10-05 23:14 ` David Miller
2010-10-05 23:19 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).