aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMitch Williams <mitch.a.williams@intel.com>2010-03-23 14:34:38 -0400
committerDavid S. Miller <davem@davemloft.net>2010-03-24 02:19:56 -0400
commitfa3d9a6d55014b5bce5575aeab1cf711cff748ab (patch)
tree3d2f23ce2e699dbf5093d047f70129c51eac011c
parent1bf1e347ef254ed8a13e7971a30e1bf3983da3d1 (diff)
igb: count Rx FIFO errors correctly
Don't aggregate rx_no_buffer_count into rx_fifo_errors. RNBC counts packets that get queued temporarily in the adapter's FIFO. These packets are not dropped and are not errors. The correct counter is rx_missed_errors (MPC). Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/igb/igb_main.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index 45a0e4fd5871..70dc03bb9cb2 100644
--- a/drivers/net/igb/igb_main.c
+++ b/drivers/net/igb/igb_main.c
@@ -3963,7 +3963,7 @@ void igb_update_stats(struct igb_adapter *adapter)
3963 struct net_device_stats *net_stats = igb_get_stats(adapter->netdev); 3963 struct net_device_stats *net_stats = igb_get_stats(adapter->netdev);
3964 struct e1000_hw *hw = &adapter->hw; 3964 struct e1000_hw *hw = &adapter->hw;
3965 struct pci_dev *pdev = adapter->pdev; 3965 struct pci_dev *pdev = adapter->pdev;
3966 u32 rnbc, reg; 3966 u32 reg, mpc;
3967 u16 phy_tmp; 3967 u16 phy_tmp;
3968 int i; 3968 int i;
3969 u64 bytes, packets; 3969 u64 bytes, packets;
@@ -4021,7 +4021,9 @@ void igb_update_stats(struct igb_adapter *adapter)
4021 adapter->stats.symerrs += rd32(E1000_SYMERRS); 4021 adapter->stats.symerrs += rd32(E1000_SYMERRS);
4022 adapter->stats.sec += rd32(E1000_SEC); 4022 adapter->stats.sec += rd32(E1000_SEC);
4023 4023
4024 adapter->stats.mpc += rd32(E1000_MPC); 4024 mpc = rd32(E1000_MPC);
4025 adapter->stats.mpc += mpc;
4026 net_stats->rx_fifo_errors += mpc;
4025 adapter->stats.scc += rd32(E1000_SCC); 4027 adapter->stats.scc += rd32(E1000_SCC);
4026 adapter->stats.ecol += rd32(E1000_ECOL); 4028 adapter->stats.ecol += rd32(E1000_ECOL);
4027 adapter->stats.mcc += rd32(E1000_MCC); 4029 adapter->stats.mcc += rd32(E1000_MCC);
@@ -4036,9 +4038,7 @@ void igb_update_stats(struct igb_adapter *adapter)
4036 adapter->stats.gptc += rd32(E1000_GPTC); 4038 adapter->stats.gptc += rd32(E1000_GPTC);
4037 adapter->stats.gotc += rd32(E1000_GOTCL); 4039 adapter->stats.gotc += rd32(E1000_GOTCL);
4038 rd32(E1000_GOTCH); /* clear GOTCL */ 4040 rd32(E1000_GOTCH); /* clear GOTCL */
4039 rnbc = rd32(E1000_RNBC); 4041 adapter->stats.rnbc += rd32(E1000_RNBC);
4040 adapter->stats.rnbc += rnbc;
4041 net_stats->rx_fifo_errors += rnbc;
4042 adapter->stats.ruc += rd32(E1000_RUC); 4042 adapter->stats.ruc += rd32(E1000_RUC);
4043 adapter->stats.rfc += rd32(E1000_RFC); 4043 adapter->stats.rfc += rd32(E1000_RFC);
4044 adapter->stats.rjc += rd32(E1000_RJC); 4044 adapter->stats.rjc += rd32(E1000_RJC);