diff options
author | Daniel T. Lee <[email protected]> | 2020-05-16 13:06:06 +0900 |
---|---|---|
committer | Daniel Borkmann <[email protected]> | 2020-05-19 17:12:56 +0200 |
commit | bc1a85977b950407d67cd1e5b74f261a4bee3284 (patch) | |
tree | e4c5283ae3815b08fe2a09a34576a7ebf7931ecf /tools/perf/scripts/python/compaction-times.py | |
parent | 63841bc0833623ecd4f758ec055b543cf1bc56ba (diff) |
samples, bpf: Refactor tail call user progs with libbpf
BPF tail call uses the BPF_MAP_TYPE_PROG_ARRAY type map for calling
into other BPF programs and this PROG_ARRAY should be filled prior to
use. Currently, samples with the PROG_ARRAY type MAP fill this program
array with bpf_load. For bpf_load to fill this map, kernel BPF program
must specify the section with specific format of <prog_type>/<array_idx>
(e.g. SEC("socket/0"))
But by using libbpf instead of bpf_load, user program can specify which
programs should be added to PROG_ARRAY. The advantage of this approach
is that you can selectively add only the programs you want, rather than
adding all of them to PROG_ARRAY, and it's much more intuitive than the
traditional approach.
This commit refactors user programs with the PROG_ARRAY type MAP with
libbpf instead of using bpf_load.
Signed-off-by: Daniel T. Lee <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Acked-by: Yonghong Song <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/compaction-times.py')
0 files changed, 0 insertions, 0 deletions