Commit d51019a4 authored by PJ Waskiewicz's avatar PJ Waskiewicz Committed by David S. Miller

ixgbe: Fix an accounting problem when the Rx FIFO is full

The rx_no_dma_resources counter reported by ethtool -S ethX is not
counting correctly.  In 82599, the queue mappings for the counters need
to be mapped properly, and accounted for properly.
Signed-off-by: default avatarPeter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Acked-by: default avatarMallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1339b9e9
...@@ -3629,6 +3629,12 @@ void ixgbe_update_stats(struct ixgbe_adapter *adapter) ...@@ -3629,6 +3629,12 @@ void ixgbe_update_stats(struct ixgbe_adapter *adapter)
u64 total_mpc = 0; u64 total_mpc = 0;
u32 i, missed_rx = 0, mpc, bprc, lxon, lxoff, xon_off_tot; u32 i, missed_rx = 0, mpc, bprc, lxon, lxoff, xon_off_tot;
if (hw->mac.type == ixgbe_mac_82599EB) {
for (i = 0; i < 16; i++)
adapter->hw_rx_no_dma_resources +=
IXGBE_READ_REG(hw, IXGBE_QPRDC(i));
}
adapter->stats.crcerrs += IXGBE_READ_REG(hw, IXGBE_CRCERRS); adapter->stats.crcerrs += IXGBE_READ_REG(hw, IXGBE_CRCERRS);
for (i = 0; i < 8; i++) { for (i = 0; i < 8; i++) {
/* for packet buffers not used, the register should read 0 */ /* for packet buffers not used, the register should read 0 */
...@@ -3648,7 +3654,6 @@ void ixgbe_update_stats(struct ixgbe_adapter *adapter) ...@@ -3648,7 +3654,6 @@ void ixgbe_update_stats(struct ixgbe_adapter *adapter)
adapter->stats.pxoffrxc[i] += IXGBE_READ_REG(hw, adapter->stats.pxoffrxc[i] += IXGBE_READ_REG(hw,
IXGBE_PXOFFRXCNT(i)); IXGBE_PXOFFRXCNT(i));
adapter->stats.qprdc[i] += IXGBE_READ_REG(hw, IXGBE_QPRDC(i)); adapter->stats.qprdc[i] += IXGBE_READ_REG(hw, IXGBE_QPRDC(i));
adapter->hw_rx_no_dma_resources += adapter->stats.qprdc[i];
} else { } else {
adapter->stats.pxonrxc[i] += IXGBE_READ_REG(hw, adapter->stats.pxonrxc[i] += IXGBE_READ_REG(hw,
IXGBE_PXONRXC(i)); IXGBE_PXONRXC(i));
......
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