]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
amd-xgbe: Add receive buffer unavailable statistic
authorLendacky, Thomas <Thomas.Lendacky@amd.com>
Wed, 30 Sep 2015 13:53:10 +0000 (08:53 -0500)
committerDavid S. Miller <davem@davemloft.net>
Mon, 5 Oct 2015 10:23:26 +0000 (03:23 -0700)
Add a statistic that tracks how many times an interrupt is generated for
a receive buffer not being available to the hardware which prevents the
hardware from being able to DMA the received data.

Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/amd/xgbe/xgbe-drv.c
drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c
drivers/net/ethernet/amd/xgbe/xgbe.h

index aae9d5ecd1822b16a2812de3bee503f59113adaa..24212d256a011bbf7ba3be84500b293444b00b96 100644 (file)
@@ -360,6 +360,9 @@ static irqreturn_t xgbe_isr(int irq, void *data)
                        }
                }
 
+               if (XGMAC_GET_BITS(dma_ch_isr, DMA_CH_SR, RBU))
+                       pdata->ext_stats.rx_buffer_unavailable++;
+
                /* Restart the device on a Fatal Bus Error */
                if (XGMAC_GET_BITS(dma_ch_isr, DMA_CH_SR, FBE))
                        schedule_work(&pdata->restart_work);
index 95b63730aa58c2b8474a75af9e509b7aaf598c0f..204fb3afb18292925b27f4cecf28c57c54ad3d45 100644 (file)
@@ -179,6 +179,7 @@ static const struct xgbe_stats xgbe_gstring_stats[] = {
        XGMAC_MMC_STAT("rx_watchdog_errors", rxwatchdogerror),
        XGMAC_MMC_STAT("rx_pause_frames", rxpauseframes),
        XGMAC_EXT_STAT("rx_split_header_packets", rx_split_header_packets),
+       XGMAC_EXT_STAT("rx_buffer_unavailable", rx_buffer_unavailable),
 };
 
 #define XGBE_STATS_COUNT       ARRAY_SIZE(xgbe_gstring_stats)
index 5f9a1ab1e387c61caca0dfdbadd1ee169ef31a9c..a5f5a7869609d00100e4a47b194b34b5a46a2052 100644 (file)
@@ -582,6 +582,7 @@ struct xgbe_mmc_stats {
 struct xgbe_ext_stats {
        u64 tx_tso_packets;
        u64 rx_split_header_packets;
+       u64 rx_buffer_unavailable;
 };
 
 struct xgbe_hw_if {