tools: bpf: move the event reading loop to libbpf
authorJakub Kicinski <jakub.kicinski@netronome.com>
Thu, 10 May 2018 17:24:40 +0000 (10:24 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 10 May 2018 23:40:52 +0000 (01:40 +0200)
commitd0cabbb021bee5c4b831a0235af9534ad07f8d3d
tree7843337206d80588110d9112d49836624b09be64
parent5f9380572b4bb24f60cd492b17331db6ee34a516
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>
samples/bpf/Makefile
samples/bpf/trace_output_user.c
tools/bpf/bpftool/map_perf_ring.c
tools/lib/bpf/Makefile
tools/lib/bpf/libbpf.c
tools/lib/bpf/libbpf.h
tools/testing/selftests/bpf/Makefile
tools/testing/selftests/bpf/test_progs.c
tools/testing/selftests/bpf/trace_helpers.c
tools/testing/selftests/bpf/trace_helpers.h