bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Borkmann <daniel@iogearbox.net>
To: "Björn Töpel" <bjorn.topel@gmail.com>,
	netdev@vger.kernel.org, ast@kernel.org
Cc: "Björn Töpel" <bjorn.topel@intel.com>,
	bpf@vger.kernel.org, magnus.karlsson@intel.com,
	jonathan.lemon@gmail.com
Subject: Re: [PATCH bpf-next] xsk: update rings for load-acquire/store-release semantics
Date: Tue, 21 Jan 2020 00:27:35 +0100	[thread overview]
Message-ID: <28b2b6ba-7f43-6cab-9b3a-174fc71d5a62@iogearbox.net> (raw)
In-Reply-To: <20200120092149.13775-1-bjorn.topel@gmail.com>

On 1/20/20 10:21 AM, Björn Töpel wrote:
> From: Björn Töpel <bjorn.topel@intel.com>
> 
> Currently, the AF_XDP rings uses fences for the kernel-side
> produce/consume functions. By updating rings for
> load-acquire/store-release semantics, the full barrier (smp_mb()) on
> the consumer side can be replaced.
> 
> Signed-off-by: Björn Töpel <bjorn.topel@intel.com>

If I'm not missing something from the ring update scheme, don't you also need
to adapt to STORE.rel ->producer with matching barrier in tools/lib/bpf/xsk.h ?

Btw, alternative model could also be 09d62154f613 ("tools, perf: add and use
optimized ring_buffer_{read_head, write_tail} helpers") for the kernel side
in order to get rid of the smp_mb() on x86.

Thanks,
Daniel

  reply	other threads:[~2020-01-20 23:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-20  9:21 [PATCH bpf-next] xsk: update rings for load-acquire/store-release semantics Björn Töpel
2020-01-20 23:27 ` Daniel Borkmann [this message]
2020-01-21 11:50   ` Björn Töpel
2020-03-16 18:44     ` Will Deacon
2020-03-17 19:14       ` Björn Töpel
2020-03-17 21:03         ` Will Deacon
2020-01-21  1:24 ` John Fastabend

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=28b2b6ba-7f43-6cab-9b3a-174fc71d5a62@iogearbox.net \
    --to=daniel@iogearbox.net \
    --cc=ast@kernel.org \
    --cc=bjorn.topel@gmail.com \
    --cc=bjorn.topel@intel.com \
    --cc=bpf@vger.kernel.org \
    --cc=jonathan.lemon@gmail.com \
    --cc=magnus.karlsson@intel.com \
    --cc=netdev@vger.kernel.org \
    /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 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).