Commit fa3d9a6d authored by Mitch Williams's avatar Mitch Williams Committed by David S. Miller

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: default avatarMitch Williams <mitch.a.williams@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1bf1e347
...@@ -3963,7 +3963,7 @@ void igb_update_stats(struct igb_adapter *adapter) ...@@ -3963,7 +3963,7 @@ void igb_update_stats(struct igb_adapter *adapter)
struct net_device_stats *net_stats = igb_get_stats(adapter->netdev); struct net_device_stats *net_stats = igb_get_stats(adapter->netdev);
struct e1000_hw *hw = &adapter->hw; struct e1000_hw *hw = &adapter->hw;
struct pci_dev *pdev = adapter->pdev; struct pci_dev *pdev = adapter->pdev;
u32 rnbc, reg; u32 reg, mpc;
u16 phy_tmp; u16 phy_tmp;
int i; int i;
u64 bytes, packets; u64 bytes, packets;
...@@ -4021,7 +4021,9 @@ void igb_update_stats(struct igb_adapter *adapter) ...@@ -4021,7 +4021,9 @@ void igb_update_stats(struct igb_adapter *adapter)
adapter->stats.symerrs += rd32(E1000_SYMERRS); adapter->stats.symerrs += rd32(E1000_SYMERRS);
adapter->stats.sec += rd32(E1000_SEC); adapter->stats.sec += rd32(E1000_SEC);
adapter->stats.mpc += rd32(E1000_MPC); mpc = rd32(E1000_MPC);
adapter->stats.mpc += mpc;
net_stats->rx_fifo_errors += mpc;
adapter->stats.scc += rd32(E1000_SCC); adapter->stats.scc += rd32(E1000_SCC);
adapter->stats.ecol += rd32(E1000_ECOL); adapter->stats.ecol += rd32(E1000_ECOL);
adapter->stats.mcc += rd32(E1000_MCC); adapter->stats.mcc += rd32(E1000_MCC);
...@@ -4036,9 +4038,7 @@ void igb_update_stats(struct igb_adapter *adapter) ...@@ -4036,9 +4038,7 @@ void igb_update_stats(struct igb_adapter *adapter)
adapter->stats.gptc += rd32(E1000_GPTC); adapter->stats.gptc += rd32(E1000_GPTC);
adapter->stats.gotc += rd32(E1000_GOTCL); adapter->stats.gotc += rd32(E1000_GOTCL);
rd32(E1000_GOTCH); /* clear GOTCL */ rd32(E1000_GOTCH); /* clear GOTCL */
rnbc = rd32(E1000_RNBC); adapter->stats.rnbc += rd32(E1000_RNBC);
adapter->stats.rnbc += rnbc;
net_stats->rx_fifo_errors += rnbc;
adapter->stats.ruc += rd32(E1000_RUC); adapter->stats.ruc += rd32(E1000_RUC);
adapter->stats.rfc += rd32(E1000_RFC); adapter->stats.rfc += rd32(E1000_RFC);
adapter->stats.rjc += rd32(E1000_RJC); adapter->stats.rjc += rd32(E1000_RJC);
......
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