aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgbe/ixgbe_main.c
diff options
context:
space:
mode:
authorPJ Waskiewicz <peter.p.waskiewicz.jr@intel.com>2009-03-13 18:12:48 -0400
committerDavid S. Miller <davem@davemloft.net>2009-03-14 15:41:07 -0400
commitd51019a4daac885ac4dead9d45d3a2a61189d9fd (patch)
treee358e1a155a6e7dc71b2572c9f706a30ab502b40 /drivers/net/ixgbe/ixgbe_main.c
parent1339b9e975902dcb8ef81ace678cfb6626d4bf3f (diff)
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: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Acked-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ixgbe/ixgbe_main.c')
-rw-r--r--drivers/net/ixgbe/ixgbe_main.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index d0b98708e6ce..86c8bad609b9 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -3629,6 +3629,12 @@ void ixgbe_update_stats(struct ixgbe_adapter *adapter)
3629 u64 total_mpc = 0; 3629 u64 total_mpc = 0;
3630 u32 i, missed_rx = 0, mpc, bprc, lxon, lxoff, xon_off_tot; 3630 u32 i, missed_rx = 0, mpc, bprc, lxon, lxoff, xon_off_tot;
3631 3631
3632 if (hw->mac.type == ixgbe_mac_82599EB) {
3633 for (i = 0; i < 16; i++)
3634 adapter->hw_rx_no_dma_resources +=
3635 IXGBE_READ_REG(hw, IXGBE_QPRDC(i));
3636 }
3637
3632 adapter->stats.crcerrs += IXGBE_READ_REG(hw, IXGBE_CRCERRS); 3638 adapter->stats.crcerrs += IXGBE_READ_REG(hw, IXGBE_CRCERRS);
3633 for (i = 0; i < 8; i++) { 3639 for (i = 0; i < 8; i++) {
3634 /* for packet buffers not used, the register should read 0 */ 3640 /* for packet buffers not used, the register should read 0 */
@@ -3648,7 +3654,6 @@ void ixgbe_update_stats(struct ixgbe_adapter *adapter)
3648 adapter->stats.pxoffrxc[i] += IXGBE_READ_REG(hw, 3654 adapter->stats.pxoffrxc[i] += IXGBE_READ_REG(hw,
3649 IXGBE_PXOFFRXCNT(i)); 3655 IXGBE_PXOFFRXCNT(i));
3650 adapter->stats.qprdc[i] += IXGBE_READ_REG(hw, IXGBE_QPRDC(i)); 3656 adapter->stats.qprdc[i] += IXGBE_READ_REG(hw, IXGBE_QPRDC(i));
3651 adapter->hw_rx_no_dma_resources += adapter->stats.qprdc[i];
3652 } else { 3657 } else {
3653 adapter->stats.pxonrxc[i] += IXGBE_READ_REG(hw, 3658 adapter->stats.pxonrxc[i] += IXGBE_READ_REG(hw,
3654 IXGBE_PXONRXC(i)); 3659 IXGBE_PXONRXC(i));