From: Alexander Duyck Date: Wed, 28 Mar 2012 08:03:32 +0000 (+0000) Subject: ixgbe: Track instances of buffer available but no DMA resources present X-Git-Tag: v3.5-rc1~109^2~176 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=a4d4f629167ceb7ed0d7c5811d32ee75afe10612;p=~emulex%2Finfiniband.git ixgbe: Track instances of buffer available but no DMA resources present This change makes it so that we can track instances of where a packet was dropped due to a packet being received when there are no DMA buffers available in the ring. For some reason this was only being enabled with RSC, however it makes more sense to always have this feature on so that we can track any cases where we might drop a buffer due to an Rx ring being full. Signed-off-by: Alexander Duyck Tested-by: Ross Brattain Signed-off-by: Jeff Kirsher --- diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index 688c7bb9218..09409ae9b68 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c @@ -4967,9 +4967,6 @@ void ixgbe_update_stats(struct ixgbe_adapter *adapter) if (adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED) { u64 rsc_count = 0; u64 rsc_flush = 0; - for (i = 0; i < 16; i++) - adapter->hw_rx_no_dma_resources += - IXGBE_READ_REG(hw, IXGBE_QPRDC(i)); for (i = 0; i < adapter->num_rx_queues; i++) { rsc_count += adapter->rx_ring[i]->rx_stats.rsc_count; rsc_flush += adapter->rx_ring[i]->rx_stats.rsc_flush; @@ -5072,6 +5069,9 @@ void ixgbe_update_stats(struct ixgbe_adapter *adapter) hwstats->b2ospc += IXGBE_READ_REG(hw, IXGBE_B2OSPC); hwstats->b2ogprc += IXGBE_READ_REG(hw, IXGBE_B2OGPRC); case ixgbe_mac_82599EB: + for (i = 0; i < 16; i++) + adapter->hw_rx_no_dma_resources += + IXGBE_READ_REG(hw, IXGBE_QPRDC(i)); hwstats->gorc += IXGBE_READ_REG(hw, IXGBE_GORCL); IXGBE_READ_REG(hw, IXGBE_GORCH); /* to clear */ hwstats->gotc += IXGBE_READ_REG(hw, IXGBE_GOTCL);