Thread (13 messages) flat view 13 messages, 2 authors, 7d ago

Re: [PATCH net-next v2 5/6] net: dsa: motorcomm: Fix MIB synchronization

From: Andrew Lunn <andrew@lunn.ch>
Date: 2026-09-07 20:21:15
Also in: lkml

On Sat, Sep 05, 2026 at 12:29:47AM +0800, David Yang wrote:
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 IO
operations.

Signed-off-by: David Yang <mmyangfl@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help