Skip to content

Single-cpu updates for per-cpu maps

Paul Chaignon bpf netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3bpf: Single-cpu updates for per-cpu mapsinclude/uapi/linux/bpf.h kernel/bpf/arraymap.c kernel/bpf/hashtab.c +3 more+74 -354 replies
2/3selftests/bpf: Tests for single-cpu updates of per-cpu mapstools/testing/selftests/bpf/test_maps.c+33 -10 replies
3/3bpftool: Support single-cpu updates for per-cpu mapstools/bpf/bpftool/Documentation/bpftool-map.rst tools/bpf/bpftool/bash-completion/bpftool tools/bpf/bpftool/map.c+61 -240 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH bpf-next 0/3] Single-cpu updates for per-cpu maps

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(-)
Signature · 1 line
2.24.0