[PATCH bpf-next 0/3] add batched ops support for percpu array

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

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




[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux