Skip to content

u64_stats: Introduce u64_stats_reads()

David Yang bridge lkml netdev oe-kbuild-all 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest7 patches 4 repliesIn review

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7u64_stats: Introduce u64_stats_reads()include/linux/u64_stats_sync.h+15 -00 replies
2/7u64_stats: Doc incorrect usage with plain variablesinclude/linux/u64_stats_sync.h+32 -90 replies
3/7net: bridge: mcast: fix memcpy with u64_statsnet/bridge/br_multicast.c+1 -10 replies
4/7net: openvswitch: fix load tearing with u64_statsnet/openvswitch/datapath.c+2 -14 replies
5/7macsec: fix memcpy with u64_statsdrivers/net/macsec.c+3 -30 replies
6/7mpls: Fix load tearing with u64_statsnet/mpls/af_mpls.c+1 -10 replies
7/7vxlan: vnifilter: fix memcpy with u64_statsdrivers/net/vxlan/vxlan_vnifilter.c+1 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH net-next v2 0/7] u64_stats: Introduce u64_stats_reads()

On 64bit arches, struct u64_stats_sync is empty and provides no help against load/store tearing. memcpy() and struct copying should not be considered tear-free. Use u64_stats_reads() instead.

v1: https://lore.kernel.org/r/[email protected]
- rename to u64_stats_reads() to clarify data flow direction
- refine the implementation
- add docs
- fix struct copying too

David Yang (7):
u64_stats: Introduce u64_stats_reads()
u64_stats: Doc incorrect usage with plain variables
net: bridge: mcast: fix memcpy with u64_stats
net: openvswitch: fix load tearing with u64_stats
macsec: fix memcpy with u64_stats
mpls: Fix load tearing with u64_stats
vxlan: vnifilter: fix memcpy with u64_stats

 drivers/net/macsec.c                |  6 ++--
 drivers/net/vxlan/vxlan_vnifilter.c |  2 +-
 include/linux/u64_stats_sync.h      | 56 ++++++++++++++++++++++++-----
 net/bridge/br_multicast.c           |  2 +-
 net/mpls/af_mpls.c                  |  2 +-
 net/openvswitch/datapath.c          |  3 +-
 6 files changed, 55 insertions(+), 16 deletions(-)
Signature · 1 line
2.51.0