diff options
Diffstat (limited to 'tools/bpf/bpftool/Documentation/bpftool-prog.rst')
-rw-r--r-- | tools/bpf/bpftool/Documentation/bpftool-prog.rst | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/tools/bpf/bpftool/Documentation/bpftool-prog.rst b/tools/bpf/bpftool/Documentation/bpftool-prog.rst index 36e8d1c3c40d..e4ceee7f2dff 100644 --- a/tools/bpf/bpftool/Documentation/bpftool-prog.rst +++ b/tools/bpf/bpftool/Documentation/bpftool-prog.rst | |||
@@ -15,22 +15,23 @@ SYNOPSIS | |||
15 | *OPTIONS* := { { **-j** | **--json** } [{ **-p** | **--pretty** }] | { **-f** | **--bpffs** } } | 15 | *OPTIONS* := { { **-j** | **--json** } [{ **-p** | **--pretty** }] | { **-f** | **--bpffs** } } |
16 | 16 | ||
17 | *COMMANDS* := | 17 | *COMMANDS* := |
18 | { **show** | **dump xlated** | **dump jited** | **pin** | **help** } | 18 | { **show** | **list** | **dump xlated** | **dump jited** | **pin** | **load** | **help** } |
19 | 19 | ||
20 | MAP COMMANDS | 20 | MAP COMMANDS |
21 | ============= | 21 | ============= |
22 | 22 | ||
23 | | **bpftool** **prog show** [*PROG*] | 23 | | **bpftool** **prog { show | list }** [*PROG*] |
24 | | **bpftool** **prog dump xlated** *PROG* [{**file** *FILE* | **opcodes**}] | 24 | | **bpftool** **prog dump xlated** *PROG* [{**file** *FILE* | **opcodes**}] |
25 | | **bpftool** **prog dump jited** *PROG* [{**file** *FILE* | **opcodes**}] | 25 | | **bpftool** **prog dump jited** *PROG* [{**file** *FILE* | **opcodes**}] |
26 | | **bpftool** **prog pin** *PROG* *FILE* | 26 | | **bpftool** **prog pin** *PROG* *FILE* |
27 | | **bpftool** **prog load** *OBJ* *FILE* | ||
27 | | **bpftool** **prog help** | 28 | | **bpftool** **prog help** |
28 | | | 29 | | |
29 | | *PROG* := { **id** *PROG_ID* | **pinned** *FILE* | **tag** *PROG_TAG* } | 30 | | *PROG* := { **id** *PROG_ID* | **pinned** *FILE* | **tag** *PROG_TAG* } |
30 | 31 | ||
31 | DESCRIPTION | 32 | DESCRIPTION |
32 | =========== | 33 | =========== |
33 | **bpftool prog show** [*PROG*] | 34 | **bpftool prog { show | list }** [*PROG*] |
34 | Show information about loaded programs. If *PROG* is | 35 | Show information about loaded programs. If *PROG* is |
35 | specified show information only about given program, otherwise | 36 | specified show information only about given program, otherwise |
36 | list all programs currently loaded on the system. | 37 | list all programs currently loaded on the system. |
@@ -57,6 +58,11 @@ DESCRIPTION | |||
57 | 58 | ||
58 | Note: *FILE* must be located in *bpffs* mount. | 59 | Note: *FILE* must be located in *bpffs* mount. |
59 | 60 | ||
61 | **bpftool prog load** *OBJ* *FILE* | ||
62 | Load bpf program from binary *OBJ* and pin as *FILE*. | ||
63 | |||
64 | Note: *FILE* must be located in *bpffs* mount. | ||
65 | |||
60 | **bpftool prog help** | 66 | **bpftool prog help** |
61 | Print short help message. | 67 | Print short help message. |
62 | 68 | ||
@@ -126,8 +132,10 @@ EXAMPLES | |||
126 | | | 132 | | |
127 | | **# mount -t bpf none /sys/fs/bpf/** | 133 | | **# mount -t bpf none /sys/fs/bpf/** |
128 | | **# bpftool prog pin id 10 /sys/fs/bpf/prog** | 134 | | **# bpftool prog pin id 10 /sys/fs/bpf/prog** |
135 | | **# bpftool prog load ./my_prog.o /sys/fs/bpf/prog2** | ||
129 | | **# ls -l /sys/fs/bpf/** | 136 | | **# ls -l /sys/fs/bpf/** |
130 | | -rw------- 1 root root 0 Jul 22 01:43 prog | 137 | | -rw------- 1 root root 0 Jul 22 01:43 prog |
138 | | -rw------- 1 root root 0 Jul 22 01:44 prog2 | ||
131 | 139 | ||
132 | **# bpftool prog dum jited pinned /sys/fs/bpf/prog opcodes** | 140 | **# bpftool prog dum jited pinned /sys/fs/bpf/prog opcodes** |
133 | 141 | ||
@@ -147,4 +155,4 @@ EXAMPLES | |||
147 | 155 | ||
148 | SEE ALSO | 156 | SEE ALSO |
149 | ======== | 157 | ======== |
150 | **bpftool**\ (8), **bpftool-map**\ (8) | 158 | **bpftool**\ (8), **bpftool-map**\ (8), **bpftool-cgroup**\ (8) |