From: Simon Horman <simon.horman@corigine.com>
To: Eric Dumazet <edumazet@google.com>
Cc: "David S . Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
netdev@vger.kernel.org, eric.dumazet@gmail.com
Subject: Re: [PATCH v2 net 1/2] rfs: annotate lockless accesses to sk->sk_rxhash
Date: Tue, 6 Jun 2023 11:40:03 +0200 [thread overview]
Message-ID: <ZH7+8xU9uVBpaXQl@corigine.com> (raw)
In-Reply-To: <20230606074115.3789733-2-edumazet@google.com>
On Tue, Jun 06, 2023 at 07:41:14AM +0000, Eric Dumazet wrote:
> Add READ_ONCE()/WRITE_ONCE() on accesses to sk->sk_rxhash.
>
> This also prevents a (smart ?) compiler to remove the condition in:
>
> if (sk->sk_rxhash != newval)
> sk->sk_rxhash = newval;
>
> We need the condition to avoid dirtying a shared cache line.
>
> Fixes: fec5e652e58f ("rfs: Receive Flow Steering")
> Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
next prev parent reply other threads:[~2023-06-06 9:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZH7+8xU9uVBpaXQl@corigine.com \
--to=simon.horman@corigine.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=eric.dumazet@gmail.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.