libbpf: remove qidconf and better support external bpf programs.
authorJonathan Lemon <jonathan.lemon@gmail.com>
Thu, 6 Jun 2019 20:59:43 +0000 (13:59 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 11 Jun 2019 06:31:26 +0000 (23:31 -0700)
commit10a13bb40e541d8cb1d5f36403aae3a0f1a2ee58
tree839d4fe910c772d234fffa6bdda215017a5b90bb
parent940e7be34ab3d04b7e0b6dd57bdbda1d225c3d8c
libbpf: remove qidconf and better support external bpf programs.

Use the recent change to XSKMAP bpf_map_lookup_elem() to test if
there is a xsk present in the map instead of duplicating the work
with qidconf.

Fix things so callers using XSK_LIBBPF_FLAGS__INHIBIT_PROG_LOAD
bypass any internal bpf maps, so xsk_socket__{create|delete} works
properly.

Clean up error handling path.

Signed-off-by: Jonathan Lemon <jonathan.lemon@gmail.com>
Acked-by: Song Liu <songliubraving@fb.com>
Tested-by: Björn Töpel <bjorn.topel@intel.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/lib/bpf/xsk.c