net: stmmac: xgmac: add ethtool per-queue irq statistic support
authorTeoh Ji Sheng <ji.sheng.teoh@intel.com>
Mon, 8 May 2023 14:43:40 +0000 (22:43 +0800)
committerJakub Kicinski <kuba@kernel.org>
Wed, 10 May 2023 02:59:19 +0000 (19:59 -0700)
Commit af9bf70154eb ("net: stmmac: add ethtool per-queue irq statistic
support") introduced ethtool per-queue statistics support to display
number of interrupts generated by DMA tx and DMA rx for DWMAC4 core.
This patch extend the support to XGMAC core.

Signed-off-by: Teoh Ji Sheng <ji.sheng.teoh@intel.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Link: https://lore.kernel.org/r/20230508144339.3014402-1-ji.sheng.teoh@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c

index dfd53264e0360730290cb6d62ba871c249f5de59..070bd912580b7aecf24a127cf7d8d2bf2215161a 100644 (file)
@@ -368,10 +368,12 @@ static int dwxgmac2_dma_interrupt(struct stmmac_priv *priv,
 
                if (likely(intr_status & XGMAC_RI)) {
                        x->rx_normal_irq_n++;
+                       x->rxq_stats[chan].rx_normal_irq_n++;
                        ret |= handle_rx;
                }
                if (likely(intr_status & (XGMAC_TI | XGMAC_TBU))) {
                        x->tx_normal_irq_n++;
+                       x->txq_stats[chan].tx_normal_irq_n++;
                        ret |= handle_tx;
                }
        }