netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/4] net: add atomic dev->stats infra
@ 2022-11-15  8:53 Eric Dumazet
  2022-11-15  8:53 ` [PATCH net-next 1/4] net: add atomic_long_t to net_device_stats fields Eric Dumazet
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Eric Dumazet @ 2022-11-15  8:53 UTC (permalink / raw)
  To: David S . Miller, Jakub Kicinski, Paolo Abeni
  Cc: netdev, eric.dumazet, Eric Dumazet

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

-- 
2.38.1.431.g37b22c650d-goog


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

end of thread, other threads:[~2022-11-16 13:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-15  8:53 [PATCH net-next 0/4] net: add atomic dev->stats infra Eric Dumazet
2022-11-15  8:53 ` [PATCH net-next 1/4] net: add atomic_long_t to net_device_stats fields Eric Dumazet
2022-11-15  8:53 ` [PATCH net-next 2/4] ipv6/sit: use DEV_STATS_INC() to avoid data-races Eric Dumazet
2022-11-15  8:53 ` [PATCH net-next 3/4] ipv6: tunnels: use DEV_STATS_INC() Eric Dumazet
2022-11-15  8:53 ` [PATCH net-next 4/4] ipv4: " Eric Dumazet
2022-11-16 13:30 ` [PATCH net-next 0/4] net: add atomic dev->stats infra patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).