From: Simon Horman <horms@kernel.org>
To: Vladimir Oltean <vladimir.oltean@nxp.com>
Cc: netdev@vger.kernel.org, Andrew Lunn <andrew@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Richard Cochran <richardcochran@gmail.com>,
Florian Fainelli <f.fainelli@gmail.com>
Subject: Re: [PATCH net 1/3] net: dsa: sja1105: fix displaced ethtool statistics counters
Date: Fri, 21 Mar 2025 08:17:07 +0000 [thread overview]
Message-ID: <20250321081707.GM892515@horms.kernel.org> (raw)
In-Reply-To: <20250318115716.2124395-2-vladimir.oltean@nxp.com>
On Tue, Mar 18, 2025 at 01:57:14PM +0200, Vladimir Oltean wrote:
> Port counters with no name (aka
> sja1105_port_counters[__SJA1105_COUNTER_UNUSED]) are skipped when
> reporting sja1105_get_sset_count(), but are not skipped during
> sja1105_get_strings() and sja1105_get_ethtool_stats().
>
> As a consequence, the first reported counter has an empty name and a
> bogus value (reads from area 0, aka MAC, from offset 0, bits start:end
> 0:0). Also, the last counter (N_NOT_REACH on E/T, N_RX_BCAST on P/Q/R/S)
> gets pushed out of the statistics counters that get shown.
>
> Skip __SJA1105_COUNTER_UNUSED consistently, so that the bogus counter
> with an empty name disappears, and in its place appears a valid counter.
>
> Fixes: 039b167d68a3 ("net: dsa: sja1105: don't use burst SPI reads for port statistics")
> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Simon Horman <horms@kernel.org>
next prev parent reply other threads:[~2025-03-21 8:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-18 11:57 [PATCH net 0/3] sja1105 driver fixes Vladimir Oltean
2025-03-18 11:57 ` [PATCH net 1/3] net: dsa: sja1105: fix displaced ethtool statistics counters Vladimir Oltean
2025-03-21 8:17 ` Simon Horman [this message]
2025-03-18 11:57 ` [PATCH net 2/3] net: dsa: sja1105: reject other RX filters than HWTSTAMP_FILTER_PTP_V2_L2_EVENT Vladimir Oltean
2025-03-21 8:17 ` Simon Horman
2025-03-18 11:57 ` [PATCH net 3/3] net: dsa: sja1105: fix kasan out-of-bounds warning in sja1105_table_delete_entry() Vladimir Oltean
2025-03-21 8:17 ` Simon Horman
2025-03-24 22:30 ` [PATCH net 0/3] sja1105 driver fixes patchwork-bot+netdevbpf
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=20250321081707.GM892515@horms.kernel.org \
--to=horms@kernel.org \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=richardcochran@gmail.com \
--cc=vladimir.oltean@nxp.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.