bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf-next 0/3] Single-cpu updates for per-cpu maps
@ 2019-12-18 14:22 Paul Chaignon
  2019-12-18 14:23 ` [PATCH bpf-next 1/3] bpf: " Paul Chaignon
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Paul Chaignon @ 2019-12-18 14:22 UTC (permalink / raw)
  To: bpf
  Cc: paul.chaignon, netdev, Alexei Starovoitov, Daniel Borkmann,
	Martin KaFai Lau, Song Liu, Yonghong Song, Andrii Nakryiko

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


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

end of thread, other threads:[~2019-12-19  9:14 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-18 14:22 [PATCH bpf-next 0/3] Single-cpu updates for per-cpu maps Paul Chaignon
2019-12-18 14:23 ` [PATCH bpf-next 1/3] bpf: " 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

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