All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net 0/8] Fixes for Ocelot driver statistics
@ 2022-08-16 13:53 Vladimir Oltean
  2022-08-16 13:53 ` [PATCH net 1/8] net: dsa: felix: fix ethtool 256-511 and 512-1023 TX packet counters Vladimir Oltean
                   ` (8 more replies)
  0 siblings, 9 replies; 20+ messages in thread
From: Vladimir Oltean @ 2022-08-16 13:53 UTC (permalink / raw)
  To: netdev
  Cc: Andrew Lunn, Vivien Didelot, Florian Fainelli, Claudiu Manoil,
	Alexandre Belloni, UNGLinuxDriver, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Colin Foster, Maxim Kochetkov

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).

Vladimir Oltean (8):
  net: dsa: felix: fix ethtool 256-511 and 512-1023 TX packet counters
  net: mscc: ocelot: fix incorrect ndo_get_stats64 packet counters
  net: mscc: ocelot: fix address of SYS_COUNT_TX_AGING counter
  net: mscc: ocelot: turn stats_lock into a spinlock
  net: mscc: ocelot: fix race between ndo_get_stats64 and
    ocelot_check_stats_work
  net: mscc: ocelot: make struct ocelot_stat_layout array indexable
  net: mscc: ocelot: keep ocelot_stat_layout by reg address, not offset
  net: mscc: ocelot: report ndo_get_stats64 from the
    wraparound-resistant ocelot->stats

 drivers/net/dsa/ocelot/felix_vsc9959.c     | 558 +++++++++++++++++----
 drivers/net/dsa/ocelot/seville_vsc9953.c   | 553 ++++++++++++++++----
 drivers/net/ethernet/mscc/ocelot.c         |  62 ++-
 drivers/net/ethernet/mscc/ocelot_net.c     |  55 +-
 drivers/net/ethernet/mscc/ocelot_vsc7514.c | 468 +++++++++++++----
 drivers/net/ethernet/mscc/vsc7514_regs.c   |  84 +++-
 include/soc/mscc/ocelot.h                  | 179 ++++++-
 7 files changed, 1581 insertions(+), 378 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2022-08-18  6:02 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-16 13:53 [PATCH net 0/8] Fixes for Ocelot driver statistics Vladimir Oltean
2022-08-16 13:53 ` [PATCH net 1/8] net: dsa: felix: fix ethtool 256-511 and 512-1023 TX packet counters Vladimir Oltean
2022-08-16 13:53 ` [PATCH net 2/8] net: mscc: ocelot: fix incorrect ndo_get_stats64 " Vladimir Oltean
2022-08-17  6:26   ` Colin Foster
2022-08-16 13:53 ` [PATCH net 3/8] net: mscc: ocelot: fix address of SYS_COUNT_TX_AGING counter Vladimir Oltean
2022-08-16 13:53 ` [PATCH net 4/8] net: mscc: ocelot: turn stats_lock into a spinlock Vladimir Oltean
2022-08-16 13:53 ` [PATCH net 5/8] net: mscc: ocelot: fix race between ndo_get_stats64 and ocelot_check_stats_work Vladimir Oltean
2022-08-16 13:53 ` [PATCH net 6/8] net: mscc: ocelot: make struct ocelot_stat_layout array indexable Vladimir Oltean
2022-08-17  6:46   ` Colin Foster
2022-08-17 11:06     ` Vladimir Oltean
2022-08-17 13:05       ` Vladimir Oltean
2022-08-17 15:14         ` Colin Foster
2022-08-17 17:42           ` Vladimir Oltean
2022-08-17 20:47             ` Colin Foster
2022-08-17 22:03               ` Vladimir Oltean
2022-08-17 22:07                 ` Colin Foster
2022-08-18  6:01                 ` Colin Foster
2022-08-16 13:53 ` [PATCH net 7/8] net: mscc: ocelot: keep ocelot_stat_layout by reg address, not offset Vladimir Oltean
2022-08-16 13:53 ` [PATCH net 8/8] net: mscc: ocelot: report ndo_get_stats64 from the wraparound-resistant ocelot->stats Vladimir Oltean
2022-08-18  5:20 ` [PATCH net 0/8] Fixes for Ocelot driver statistics patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.