lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210816105323.GA13779@linux.intel.com>
Date:   Mon, 16 Aug 2021 18:53:23 +0800
From:   Wong Vee Khee <vee.khee.wong@...ux.intel.com>
To:     Vijayakannan Ayyathurai <vijayakannan.ayyathurai@...el.com>
Cc:     peppe.cavallaro@...com, alexandre.torgue@...s.st.com,
        joabreu@...opsys.com, davem@...emloft.net, kuba@...nel.org,
        mcoquelin.stm32@...il.com, vee.khee.wong@...el.com,
        weifeng.voon@...el.com, netdev@...r.kernel.org,
        linux-stm32@...md-mailman.stormreply.com,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next v1 3/3] net: stmmac: add ethtool per-queue irq
 statistic support

On Mon, Aug 16, 2021 at 02:16:00PM +0800, Vijayakannan Ayyathurai wrote:
> 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.
>

Acked-by: Wong Vee Khee <vee.khee.wong@...ux.intel.com>
 
> Signed-off-by: Vijayakannan Ayyathurai <vijayakannan.ayyathurai@...el.com>
> ---
>  drivers/net/ethernet/stmicro/stmmac/common.h         | 2 ++
>  drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c     | 2 ++
>  drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c | 2 ++
>  3 files changed, 6 insertions(+)
> 
> diff --git a/drivers/net/ethernet/stmicro/stmmac/common.h b/drivers/net/ethernet/stmicro/stmmac/common.h
> index 79333deef2e2..b6d945ea903d 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/common.h
> +++ b/drivers/net/ethernet/stmicro/stmmac/common.h
> @@ -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 */
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c b/drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c
> index f83db62938dd..9292a1fab7d3 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c
> @@ -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))
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
> index 10c0895d0b43..595c3ccdcbb7 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
> @@ -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)
>  };
>  

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ