tools: bpf: move the event reading loop to libbpf
There are two copies of event reading loop - in bpftool and trace_helpers "library". Consolidate them and move the code to libbpf. Return codes from trace_helpers are kept, but renamed to include LIBBPF prefix. Suggested-by:Alexei Starovoitov <ast@kernel.org> Signed-off-by:
Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by:
Quentin Monnet <quentin.monnet@netronome.com> Signed-off-by:
Daniel Borkmann <daniel@iogearbox.net>
Showing
- samples/bpf/Makefile 8 additions, 0 deletionssamples/bpf/Makefile
- samples/bpf/trace_output_user.c 3 additions, 3 deletionssamples/bpf/trace_output_user.c
- tools/bpf/bpftool/map_perf_ring.c 15 additions, 51 deletionstools/bpf/bpftool/map_perf_ring.c
- tools/lib/bpf/Makefile 1 addition, 1 deletiontools/lib/bpf/Makefile
- tools/lib/bpf/libbpf.c 61 additions, 0 deletionstools/lib/bpf/libbpf.c
- tools/lib/bpf/libbpf.h 13 additions, 0 deletionstools/lib/bpf/libbpf.h
- tools/testing/selftests/bpf/Makefile 1 addition, 1 deletiontools/testing/selftests/bpf/Makefile
- tools/testing/selftests/bpf/test_progs.c 3 additions, 3 deletionstools/testing/selftests/bpf/test_progs.c
- tools/testing/selftests/bpf/trace_helpers.c 30 additions, 57 deletionstools/testing/selftests/bpf/trace_helpers.c
- tools/testing/selftests/bpf/trace_helpers.h 4 additions, 7 deletionstools/testing/selftests/bpf/trace_helpers.h
Loading
Please register or sign in to comment