Merge branch 'fixes-for-ocelot-driver-statistics'
authorJakub Kicinski <kuba@kernel.org>
Thu, 18 Aug 2022 04:58:48 +0000 (21:58 -0700)
committerJakub Kicinski <kuba@kernel.org>
Thu, 18 Aug 2022 04:58:49 +0000 (21:58 -0700)
commit5b6a07297bdca1701dc983bf084d6c0b2569ff18
treed25dbab401a3db4b43d6c9342b7854c4e1074ae2
parent211987f3ac734000ea1548784b2a4539a974fbc8
parente780e3193e889fd8358b862f7cd18ec5a4901caf
Merge branch 'fixes-for-ocelot-driver-statistics'

Vladimir Oltean says:

====================
Fixes for Ocelot driver statistics

This series contains bug fixes for the ocelot drivers (both switchdev
and DSA). Some concern the counters exposed to ethtool -S, and others to
the counters exposed to ifconfig. I'm aware that the changes are fairly
large, but I wanted to prioritize on a proper approach to addressing the
issues rather than a quick hack.

Some of the noticed problems:
- bad register offsets for some counters
- unhandled concurrency leading to corrupted counters
- unhandled 32-bit wraparound of ifconfig counters

The issues on the ocelot switchdev driver were noticed through code
inspection, I do not have the hardware to test.

This patch set necessarily converts ocelot->stats_lock from a mutex to a
spinlock. I know this affects Colin Foster's development with the SPI
controlled VSC7512. I have other changes prepared for net-next that
convert this back into a mutex (along with other changes in this area).
====================

Link: https://lore.kernel.org/r/20220816135352.1431497-1-vladimir.oltean@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>