tools: bpftool: allow reuse of maps with bpftool prog load
authorJakub Kicinski <jakub.kicinski@netronome.com>
Tue, 10 Jul 2018 21:43:07 +0000 (14:43 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 11 Jul 2018 20:13:34 +0000 (22:13 +0200)
commit3ff5a4dc5d890963e669fc99cc62ee07d1da24e8
tree227ec4a474eaa03236f5ce8df1df25d890846ee4
parent26736eb9a483715c2e971a8866f55fbb156903e2
tools: bpftool: allow reuse of maps with bpftool prog load

Add map parameter to prog load which will allow reuse of existing
maps instead of creating new ones.

We need feature detection and compat code for reallocarray, since
it's not available in many libc versions.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
tools/bpf/bpftool/Documentation/bpftool-prog.rst
tools/bpf/bpftool/bash-completion/bpftool
tools/bpf/bpftool/main.h
tools/bpf/bpftool/map.c
tools/bpf/bpftool/prog.c