diff options
author | Roman Gushchin <guro@fb.com> | 2017-12-13 15:18:53 +0000 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2017-12-14 13:37:13 +0100 |
commit | 49a086c201a9356287471aa5846a427bdcecc4f7 (patch) | |
tree | 0fc32d8eb8543ded1ccef6f36cbebd070dafc0b3 /tools/bpf/bpftool/main.h | |
parent | fe4d44b23f6b38194a92c6b8a50d921a071c4db4 (diff) | |
download | lwn-49a086c201a9356287471aa5846a427bdcecc4f7.tar.gz lwn-49a086c201a9356287471aa5846a427bdcecc4f7.zip |
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>
Diffstat (limited to 'tools/bpf/bpftool/main.h')
-rw-r--r-- | tools/bpf/bpftool/main.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/bpf/bpftool/main.h b/tools/bpf/bpftool/main.h index bff330b49791..bec1ccbb49c7 100644 --- a/tools/bpf/bpftool/main.h +++ b/tools/bpf/bpftool/main.h @@ -111,6 +111,7 @@ char *get_fdinfo(int fd, const char *key); int open_obj_pinned(char *path); int open_obj_pinned_any(char *path, enum bpf_obj_type exp_type); int do_pin_any(int argc, char **argv, int (*get_fd_by_id)(__u32)); +int do_pin_fd(int fd, const char *name); int do_prog(int argc, char **arg); int do_map(int argc, char **arg); |