bpftool: implement prog load command
authorRoman Gushchin <guro@fb.com>
Wed, 13 Dec 2017 15:18:53 +0000 (15:18 +0000)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 14 Dec 2017 12:37:13 +0000 (13:37 +0100)
commit49a086c201a9356287471aa5846a427bdcecc4f7
tree0fc32d8eb8543ded1ccef6f36cbebd070dafc0b3
parentfe4d44b23f6b38194a92c6b8a50d921a071c4db4
bpftool: implement prog load command

Add the prog load command to load a bpf program from a specified
binary file and pin it to bpffs.

Usage description and examples are given in the corresponding man
page.

Syntax:
$ bpftool prog load OBJ FILE

FILE is a non-existing file on bpffs.

Signed-off-by: Roman Gushchin <guro@fb.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Cc: Martin KaFai Lau <kafai@fb.com>
Cc: Quentin Monnet <quentin.monnet@netronome.com>
Cc: David Ahern <dsahern@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
tools/bpf/bpftool/Documentation/bpftool-prog.rst
tools/bpf/bpftool/Documentation/bpftool.rst
tools/bpf/bpftool/common.c
tools/bpf/bpftool/main.h
tools/bpf/bpftool/prog.c