]> git.itanic.dy.fi Git - linux-stable/commit
net: mscc: ocelot: export ethtool MAC Merge stats for Felix VSC9959
authorVladimir Oltean <vladimir.oltean@nxp.com>
Thu, 19 Jan 2023 12:27:03 +0000 (14:27 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 23 Jan 2023 12:44:18 +0000 (12:44 +0000)
commitab3f97a9610a8d90dc9934517e82c3272d4e98a0
treeaa5fb5cf4f1a2d967731715f8aefe6de851af6aa
parent497eea9f8ed5987ade08e23725fdb0f25cd2ffcd
net: mscc: ocelot: export ethtool MAC Merge stats for Felix VSC9959

The Felix VSC9959 switch supports frame preemption and has a MAC Merge
layer. In addition to the structured stats that exist for the eMAC,
export the counters associated with its pMAC (pause, RMON, MAC, PHY,
control) plus the high-level MAC Merge layer stats. The unstructured
ethtool counters, as well as the rtnl_link_stats64 were left to report
only the eMAC counters.

Because statistics processing is quite self-contained in ocelot_stats.c
now, I've opted for introducing an ocelot->mm_supported bool, based on
which the common switch lib does everything, rather than pushing the
TSN-specific code in felix_vsc9959.c, as happens for other TSN stuff.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/ocelot/felix.c
drivers/net/dsa/ocelot/felix_vsc9959.c
drivers/net/ethernet/mscc/ocelot_stats.c
include/soc/mscc/ocelot.h