summaryrefslogtreecommitdiff
path: root/samples/kprobes
diff options
context:
space:
mode:
authorDaniel T. Lee <danieltimlee@gmail.com>2020-07-07 21:48:54 +0300
committerDaniel Borkmann <daniel@iogearbox.net>2020-07-08 02:33:14 +0300
commitcc7f641d637bef0b31194d28667553f77c4ef947 (patch)
treea86630f75e705e00f793d6c8b5c5bd3a58886ea6 /samples/kprobes
parent88795b4adb01a30fbfd75ef1c1ef73b4442e38b2 (diff)
downloadlinux-cc7f641d637bef0b31194d28667553f77c4ef947.tar.xz
samples: bpf: Refactor BPF map performance test with libbpf
Previously, in order to set the numa_node attribute at the time of map creation using "libbpf", it was necessary to call bpf_create_map_node() directly (bpf_load approach), instead of calling bpf_object_load() that handles everything on its own, including map creation. And because of this problem, this sample had problems with refactoring from bpf_load to libbbpf. However, by commit 1bdb6c9a1c43 ("libbpf: Add a bunch of attribute getters/setters for map definitions") added the numa_node attribute and allowed it to be set in the map. By using libbpf instead of bpf_load, the inner map definition has been explicitly declared with BTF-defined format. Also, the element of ARRAY_OF_MAPS was also statically specified using the BTF format. And for this reason some logic in fixup_map() was not needed and changed or removed. Signed-off-by: Daniel T. Lee <danieltimlee@gmail.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Andrii Nakryiko <andriin@fb.com> Link: https://lore.kernel.org/bpf/20200707184855.30968-4-danieltimlee@gmail.com
Diffstat (limited to 'samples/kprobes')
0 files changed, 0 insertions, 0 deletions