Commit af9bf701 authored by Vijayakannan Ayyathurai's avatar Vijayakannan Ayyathurai Committed by David S. Miller

net: stmmac: add ethtool per-queue irq statistic support

Adding ethtool per-queue statistics support to show number of interrupts
generated at DMA tx and DMA rx. All the counters are incremented at
dwmac4_dma_interrupt function.
Signed-off-by: default avatarVijayakannan Ayyathurai <vijayakannan.ayyathurai@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 68e9c5de
......@@ -60,10 +60,12 @@
struct stmmac_txq_stats {
unsigned long tx_pkt_n;
unsigned long tx_normal_irq_n;
};
struct stmmac_rxq_stats {
unsigned long rx_pkt_n;
unsigned long rx_normal_irq_n;
};
/* Extra statistic and debug information exposed by ethtool */
......
......@@ -170,10 +170,12 @@ int dwmac4_dma_interrupt(void __iomem *ioaddr,
x->normal_irq_n++;
if (likely(intr_status & DMA_CHAN_STATUS_RI)) {
x->rx_normal_irq_n++;
x->rxq_stats[chan].rx_normal_irq_n++;
ret |= handle_rx;
}
if (likely(intr_status & DMA_CHAN_STATUS_TI)) {
x->tx_normal_irq_n++;
x->txq_stats[chan].tx_normal_irq_n++;
ret |= handle_tx;
}
if (unlikely(intr_status & DMA_CHAN_STATUS_TBU))
......
......@@ -263,11 +263,13 @@ static const struct stmmac_stats stmmac_mmc[] = {
static const char stmmac_qstats_tx_string[][ETH_GSTRING_LEN] = {
"tx_pkt_n",
"tx_irq_n",
#define STMMAC_TXQ_STATS ARRAY_SIZE(stmmac_qstats_tx_string)
};
static const char stmmac_qstats_rx_string[][ETH_GSTRING_LEN] = {
"rx_pkt_n",
"rx_irq_n",
#define STMMAC_RXQ_STATS ARRAY_SIZE(stmmac_qstats_rx_string)
};
......
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