summaryrefslogtreecommitdiffstats
path: root/drivers/bcma
diff options
context:
space:
mode:
authorVladimir Oltean <vladimir.oltean@nxp.com>2022-09-08 18:48:13 +0200
committerDavid S. Miller <davem@davemloft.net>2022-09-09 11:59:12 +0200
commite32036e1ae7bb71b64559313f9ea8790a0acaa51 (patch)
tree938ca00afdd99818b8a1703579c6a9142f154842 /drivers/bcma
parentnet: mscc: ocelot: exclude stats from bulk regions based on reg, not name (diff)
downloadlinux-e32036e1ae7bb71b64559313f9ea8790a0acaa51.tar.xz
linux-e32036e1ae7bb71b64559313f9ea8790a0acaa51.zip
net: mscc: ocelot: add support for all sorts of standardized counters present in DSA
DSA is integrated with the new standardized ethtool -S --groups option, but the felix driver only exports unstructured statistics. Reuse the array of 64-bit statistics collected by ocelot_check_stats_work(), but just export select values from it. Since ocelot_check_stats_work() runs periodically to avoid 32-bit overflow, and the ethtool calling context is sleepable, we update the 64-bit stats one more time, to provide up-to-date values. The locking scheme with a mutex followed by a spinlock is a bit hard to digest, so we create and use a ocelot_port_stats_run() helper with a callback that populates the ethool stats group the caller is interested in. The exported stats are: ethtool -S swp0 --groups eth-phy ethtool -S swp0 --groups eth-mac ethtool -S swp0 --groups eth-ctrl ethtool -S swp0 --groups rmon ethtool --include-statistics --show-pause swp0 Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/bcma')
0 files changed, 0 insertions, 0 deletions