All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Chaignon <paul.chaignon@orange.com>
To: bpf@vger.kernel.org
Cc: paul.chaignon@gmail.com, netdev@vger.kernel.org,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Martin KaFai Lau <kafai@fb.com>, Song Liu <songliubraving@fb.com>,
	Yonghong Song <yhs@fb.com>, Andrii Nakryiko <andriin@fb.com>
Subject: [PATCH bpf-next 0/3] Single-cpu updates for per-cpu maps
Date: Wed, 18 Dec 2019 15:22:54 +0100	[thread overview]
Message-ID: <cover.1576673841.git.paul.chaignon@orange.com> (raw)

Currently, userspace programs have to update the values of all CPUs at
once when updating per-cpu maps.  This limitation prevents the update of a
single CPU's value without the risk of missing concurrent updates on other
CPU's values.

The first patch allows userspace to update the value of a specific CPU in
per-cpu maps.  The second and last patches add test cases and support in
bpftool respectively.

Paul Chaignon (3):
  bpf: Single-cpu updates for per-cpu maps
  selftests/bpf: Tests for single-cpu updates of per-cpu maps
  bpftool: Support single-cpu updates for per-cpu maps

 include/uapi/linux/bpf.h                      |  4 ++
 kernel/bpf/arraymap.c                         | 19 +++--
 kernel/bpf/hashtab.c                          | 49 +++++++------
 kernel/bpf/local_storage.c                    | 16 +++--
 kernel/bpf/syscall.c                          | 17 +++--
 .../bpf/bpftool/Documentation/bpftool-map.rst | 13 ++--
 tools/bpf/bpftool/bash-completion/bpftool     |  2 +-
 tools/bpf/bpftool/map.c                       | 70 ++++++++++++++-----
 tools/include/uapi/linux/bpf.h                |  4 ++
 tools/testing/selftests/bpf/test_maps.c       | 34 ++++++++-
 10 files changed, 168 insertions(+), 60 deletions(-)

-- 
2.24.0


             reply	other threads:[~2019-12-18 14:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-18 14:22 Paul Chaignon [this message]
2019-12-18 14:23 ` [PATCH bpf-next 1/3] bpf: Single-cpu updates for per-cpu maps Paul Chaignon
2019-12-18 18:00   ` Alexei Starovoitov
2019-12-19  9:14     ` Paul Chaignon
2019-12-18 19:10   ` Yonghong Song
2019-12-19  0:49     ` Andrii Nakryiko
2019-12-18 14:23 ` [PATCH bpf-next 2/3] selftests/bpf: Tests for single-cpu updates of " Paul Chaignon
2019-12-18 14:23 ` [PATCH bpf-next 3/3] bpftool: Support single-cpu updates for " Paul Chaignon

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=cover.1576673841.git.paul.chaignon@orange.com \
    --to=paul.chaignon@orange.com \
    --cc=andriin@fb.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=kafai@fb.com \
    --cc=netdev@vger.kernel.org \
    --cc=paul.chaignon@gmail.com \
    --cc=songliubraving@fb.com \
    --cc=yhs@fb.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.