tools: bpftool: reimplement bpf_prog_load() for prog load
authorJakub Kicinski <jakub.kicinski@netronome.com>
Tue, 10 Jul 2018 21:43:03 +0000 (14:43 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 11 Jul 2018 20:13:34 +0000 (22:13 +0200)
commitc8406848badd0a0b040b0d286e612678662a2ab3
tree268065cfe8a88a0dd001d3fb0808526d473568bf
parent07f2d4eac2a850fc9649b27aa935cdcd263fb1ff
tools: bpftool: reimplement bpf_prog_load() for prog load

bpf_prog_load() is a very useful helper but it doesn't give us full
flexibility of modifying the BPF objects before loading.  Open code
bpf_prog_load() in bpftool so we can add extra logic in following
commits.

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/prog.c