diff options
| author | 2026-10-05 00:06:20 +0800 | |
|---|---|---|
| committer | 2026-10-08 16:26:15 -0700 | |
| commit | ed4453587dc0082a6b6b5a52c89d6b84d713e8ac (patch) | |
| tree | a7762b70f653ed4d2dbcf3df5d30b34eb20c80b8 /scripts/Makefile.thinlto | |
| parent | net: dsa: motorcomm: Use u64_stats_t for MIB stats (diff) | |
net: dsa: motorcomm: Fix MIB synchronization
The previous MIB sync was based on the false assumption that 64-bit
variables are always atomic. To fix that:
* .get_stats64() uses u64_stats_sync, together with u64_stats_t;
* others take the free mutex lock if possible.
To minimize time of the write side of u64_stats_sync, a per-port buffer
is used so that all the stat can be written back altogether after all IO
operations.
The odds of this issue are very low and it does not affect the control
flow, while fixing it would require a thorough refactoring (together with
the previous commit), so it may not be worth backporting.
Signed-off-by: David Yang <mmyangfl@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/20261004160622.948037-7-mmyangfl@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
