Skip to content

net: add atomic dev->stats infra

Eric Dumazet netdev 1 version Applied

Status from this message: This series was applied to netdev/net-next.git (master)

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 0 repliesApplied 4/4

Patches in v1 All 4 applied

#Subject and filesSizeRepliesApplied
1/4net: add atomic_long_t to net_device_stats fieldsinclude/linux/netdevice.h include/net/dst.h net/core/dev.c+40 -370 repliesApplied
2/4ipv6/sit: use DEV_STATS_INC() to avoid data-racesnet/ipv6/sit.c+11 -110 repliesApplied
3/4ipv6: tunnels: use DEV_STATS_INC()net/ipv6/ip6_gre.c net/ipv6/ip6_tunnel.c net/ipv6/ip6_vti.c +1 more+28 -350 repliesApplied
4/4ipv4: tunnels: use DEV_STATS_INC()net/ipv4/ip_gre.c net/ipv4/ip_tunnel.c net/ipv4/ip_vti.c +2 more+38 -380 repliesApplied

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH net-next 0/4] net: add atomic dev->stats infra

Long standing KCSAN issues are caused by data-race around some dev->stats changes.

Most performance critical paths already use per-cpu variables, or per-queue ones.

It is reasonable (and more correct) to use atomic operations for the slow paths.

First patch adds the infrastructure, then three patches address the most common paths that syzbot is playing with.

Eric Dumazet (4):
net: add atomic_long_t to net_device_stats fields ipv6/sit: use DEV_STATS_INC() to avoid data-races
ipv6: tunnels: use DEV_STATS_INC()
ipv4: tunnels: use DEV_STATS_INC()

 include/linux/netdevice.h | 58 +++++++++++++++++++++++----------------
 include/net/dst.h         |  5 ++--
 net/core/dev.c            | 14 ++--------
 net/ipv4/ip_gre.c         | 10 +++----
 net/ipv4/ip_tunnel.c      | 32 ++++++++++-----------
 net/ipv4/ip_vti.c         | 20 +++++++-------
 net/ipv4/ipip.c           |  2 +-
 net/ipv4/ipmr.c           | 12 ++++----
 net/ipv6/ip6_gre.c        | 11 +++-----
 net/ipv6/ip6_tunnel.c     | 26 ++++++++----------
 net/ipv6/ip6_vti.c        | 16 +++++------
 net/ipv6/ip6mr.c          | 10 +++----
 net/ipv6/sit.c            | 22 +++++++--------
 13 files changed, 117 insertions(+), 121 deletions(-)
Signature · 1 line
2.38.1.431.g37b22c650d-goog