bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf-next v2 0/3] add batched ops support for percpu
@ 2021-04-06 18:53 Pedro Tammela
  2021-04-06 18:53 ` [PATCH bpf-next v2 1/3] bpf: add batched ops support for percpu array Pedro Tammela
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Pedro Tammela @ 2021-04-06 18:53 UTC (permalink / raw)
  To: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
	Martin KaFai Lau, Song Liu, Yonghong Song, John Fastabend,
	KP Singh, Shuah Khan, Pedro Tammela, Matthieu Baerts,
	David Verbeiren, open list:BPF (Safe dynamic programs and tools),
	open list:BPF (Safe dynamic programs and tools),
	open list, open list:KERNEL SELFTEST FRAMEWORK

This patchset introduces batched operations for the per-cpu variant of
the array map.

It also introduces a standard way to define per-cpu values via the
'BPF_PERCPU_TYPE()' macro, which handles the alignment transparently.
This was already implemented in the selftests and was merely refactored
out to libbpf, with some simplifications for reuse.

The tests were updated to reflect all the new changes.

v1 -> v2:
- Amended a more descriptive commit message

Pedro Tammela (3):
  bpf: add batched ops support for percpu array
  libbpf: selftests: refactor 'BPF_PERCPU_TYPE()' and 'bpf_percpu()'
    macros
  bpf: selftests: update array map tests for per-cpu batched ops

 kernel/bpf/arraymap.c                         |   2 +
 tools/lib/bpf/bpf.h                           |  10 ++
 tools/testing/selftests/bpf/bpf_util.h        |   7 --
 .../bpf/map_tests/array_map_batch_ops.c       | 114 +++++++++++++-----
 .../bpf/map_tests/htab_map_batch_ops.c        |  48 ++++----
 .../selftests/bpf/prog_tests/map_init.c       |   5 +-
 tools/testing/selftests/bpf/test_maps.c       |  16 +--
 7 files changed, 133 insertions(+), 69 deletions(-)

-- 
2.25.1


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

end of thread, other threads:[~2021-04-07 20:15 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-06 18:53 [PATCH bpf-next v2 0/3] add batched ops support for percpu Pedro Tammela
2021-04-06 18:53 ` [PATCH bpf-next v2 1/3] bpf: add batched ops support for percpu array Pedro Tammela
2021-04-06 18:53 ` [PATCH bpf-next v2 2/3] libbpf: selftests: refactor 'BPF_PERCPU_TYPE()' and 'bpf_percpu()' macros Pedro Tammela
2021-04-07 18:31   ` Andrii Nakryiko
2021-04-07 19:30     ` Pedro Tammela
2021-04-07 19:51       ` Andrii Nakryiko
2021-04-07 20:14         ` Pedro Tammela
2021-04-06 18:53 ` [PATCH bpf-next v2 3/3] bpf: selftests: update array map tests for per-cpu batched ops Pedro Tammela

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