diff options
| author | Vladimir Oltean <[email protected]> | 2022-09-08 19:48:13 +0300 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2022-09-09 10:59:12 +0100 |
| commit | e32036e1ae7bb71b64559313f9ea8790a0acaa51 (patch) | |
| tree | 938ca00afdd99818b8a1703579c6a9142f154842 /tools/perf/scripts/python/stackcollapse.py | |
| parent | d3e75f1665f37cd7294355dd01bbc72f057a841d (diff) | |
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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions