[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250321081707.GM892515@horms.kernel.org>
Date: Fri, 21 Mar 2025 08:17:07 +0000
From: Simon Horman <horms@...nel.org>
To: Vladimir Oltean <vladimir.oltean@....com>
Cc: netdev@...r.kernel.org, Andrew Lunn <andrew@...n.ch>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Richard Cochran <richardcochran@...il.com>,
Florian Fainelli <f.fainelli@...il.com>
Subject: Re: [PATCH net 1/3] net: dsa: sja1105: fix displaced ethtool
statistics counters
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@....com>
Reviewed-by: Simon Horman <horms@...nel.org>
Powered by blists - more mailing lists