]> Gentwo Git Trees - linux/.git/commit
net: dsa: append ethtool counters of all hidden ports to conduit
authorVladimir Oltean <vladimir.oltean@nxp.com>
Sat, 22 Nov 2025 11:23:11 +0000 (13:23 +0200)
committerJakub Kicinski <kuba@kernel.org>
Wed, 26 Nov 2025 01:33:55 +0000 (17:33 -0800)
commitf647ed2ca78ec4efcc436915b441da9de0974926
tree9a59b0508fb7ba8d8e3433c347da039724084634
parent8afabd27fe46ebf991b4aea20b74e08196c15c0c
net: dsa: append ethtool counters of all hidden ports to conduit

Currently there is no way to see packet counters on cascade ports, and
no clarity on how the API for that would look like.

Because it's something that is currently needed, just extend the hack
where ethtool -S on the conduit interface dumps CPU port counters, and
also use it to dump counters of cascade ports.

Note that the "pXX_" naming convention changes to "sXX_pYY", to
distinguish between ports having the same index but belonging to
different switches. This has a slight chance of causing regressions to
existing tooling:

- grepping for "p04_counter_name" still works, but might return more
  than one string now
- grepping for "    p04_counter_name" no longer works

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/20251122112311.138784-4-vladimir.oltean@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/dsa/conduit.c