linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: MD Danish Anwar <danishanwar@ti.com>
Cc: Vignesh Raghavendra <vigneshr@ti.com>,
	Meghana Malladi <m-malladi@ti.com>,
	Diogo Ivo <diogo.ivo@siemens.com>, Lee Trager <lee@trager.us>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	Roger Quadros <rogerq@kernel.org>,
	Jonathan Corbet <corbet@lwn.net>, Simon Horman <horms@kernel.org>,
	Paolo Abeni <pabeni@redhat.com>,
	Eric Dumazet <edumazet@google.com>,
	"David S. Miller" <davem@davemloft.net>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>, <linux-doc@vger.kernel.org>,
	<netdev@vger.kernel.org>, <srk@ti.com>
Subject: Re: [PATCH net-next v2] net: ti: icssg-prueth: Add ICSSG FW Stats
Date: Thu, 6 Mar 2025 16:55:13 -0800	[thread overview]
Message-ID: <20250306165513.541ff46e@kernel.org> (raw)
In-Reply-To: <20250305111608.520042-1-danishanwar@ti.com>

On Wed, 5 Mar 2025 16:46:08 +0530 MD Danish Anwar wrote:
> + - ``FW_RTU_PKT_DROP``: Diagnostic error counter which increments when RTU drops a locally injected packet due to port being disabled or rule violation.
> + - ``FW_Q0_OVERFLOW``: TX overflow counter for queue0
> + - ``FW_Q1_OVERFLOW``: TX overflow counter for queue1
> + - ``FW_Q2_OVERFLOW``: TX overflow counter for queue2
> + - ``FW_Q3_OVERFLOW``: TX overflow counter for queue3
> + - ``FW_Q4_OVERFLOW``: TX overflow counter for queue4
> + - ``FW_Q5_OVERFLOW``: TX overflow counter for queue5
> + - ``FW_Q6_OVERFLOW``: TX overflow counter for queue6
> + - ``FW_Q7_OVERFLOW``: TX overflow counter for queue7
...

Thanks for the docs, it looks good. Now, do all of these get included
in the standard stats returned by icssg_ndo_get_stats64 ?
That's the primary source of information for the user regarding packet
loss.

>  	if (prueth->pa_stats) {
>  		for (i = 0; i < ARRAY_SIZE(icssg_all_pa_stats); i++) {
> -			reg = ICSSG_FW_STATS_BASE +
> -			      icssg_all_pa_stats[i].offset *
> -			      PRUETH_NUM_MACS + slice * sizeof(u32);
> +			reg = icssg_all_pa_stats[i].offset +
> +			      slice * sizeof(u32);
>  			regmap_read(prueth->pa_stats, reg, &val);
>  			emac->pa_stats[i] += val;

This gets called by icssg_ndo_get_stats64() which is under RCU 
protection and nothing else. I don't see any locking here, and
I hope the regmap doesn't sleep. cat /proc/net/dev to test.
You probably need to send some fixes to net.
-- 
pw-bot: cr


  reply	other threads:[~2025-03-07  0:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-05 11:16 [PATCH net-next v2] net: ti: icssg-prueth: Add ICSSG FW Stats MD Danish Anwar
2025-03-07  0:55 ` Jakub Kicinski [this message]
2025-03-07 10:30   ` MD Danish Anwar
2025-03-07 16:39     ` Jakub Kicinski
2025-03-14  6:45       ` MD Danish Anwar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250306165513.541ff46e@kernel.org \
    --to=kuba@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=corbet@lwn.net \
    --cc=danishanwar@ti.com \
    --cc=davem@davemloft.net \
    --cc=diogo.ivo@siemens.com \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=lee@trager.us \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m-malladi@ti.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=rogerq@kernel.org \
    --cc=srk@ti.com \
    --cc=vigneshr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).