netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 net 0/2] rfs: annotate lockless accesses
@ 2023-06-06  7:41 Eric Dumazet
  2023-06-06  7:41 ` [PATCH v2 net 1/2] rfs: annotate lockless accesses to sk->sk_rxhash Eric Dumazet
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Eric Dumazet @ 2023-06-06  7:41 UTC (permalink / raw)
  To: David S . Miller, Jakub Kicinski, Paolo Abeni
  Cc: Simon Horman, netdev, eric.dumazet, Eric Dumazet

rfs runs without locks held, so we should annotate
read and writes to shared variables.

It should prevent compilers forcing writes
in the following situation:

  if (var != val)
     var = val;

A compiler could indeed simply avoid the conditional:

    var = val;

This matters if var is shared between many cpus.

v2: aligns one closing bracket (Simon)
    adds Fixes: tags (Jakub)

Eric Dumazet (2):
  rfs: annotate lockless accesses to sk->sk_rxhash
  rfs: annotate lockless accesses to RFS sock flow table

 include/linux/netdevice.h |  7 +++++--
 include/net/sock.h        | 18 +++++++++++++-----
 net/core/dev.c            |  6 ++++--
 3 files changed, 22 insertions(+), 9 deletions(-)

-- 
2.41.0.rc0.172.g3f132b7071-goog


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

end of thread, other threads:[~2023-06-07  9:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-06  7:41 [PATCH v2 net 0/2] rfs: annotate lockless accesses Eric Dumazet
2023-06-06  7:41 ` [PATCH v2 net 1/2] rfs: annotate lockless accesses to sk->sk_rxhash Eric Dumazet
2023-06-06  9:40   ` Simon Horman
2023-06-06 17:40   ` Kuniyuki Iwashima
2023-06-06  7:41 ` [PATCH v2 net 2/2] rfs: annotate lockless accesses to RFS sock flow table Eric Dumazet
2023-06-06  9:40   ` Simon Horman
2023-06-06 17:42   ` Kuniyuki Iwashima
2023-06-07  9:20 ` [PATCH v2 net 0/2] rfs: annotate lockless accesses 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).