summaryrefslogtreecommitdiff
path: root/tools/bpf
diff options
context:
space:
mode:
authorKui-Feng Lee <thinker.li@gmail.com>2023-04-20 03:28:22 +0300
committerAlexei Starovoitov <ast@kernel.org>2023-04-21 21:10:10 +0300
commit45cea721ea36d83969473d2abd29bcc2321cacdd (patch)
tree12fa0e18e09ac92e1122d2c034bcf3106adcfc1f /tools/bpf
parent0232b788978652571c4f4e57dc26ff8e4837926a (diff)
downloadlinux-45cea721ea36d83969473d2abd29bcc2321cacdd.tar.xz
bpftool: Update doc to explain struct_ops register subcommand.
The "struct_ops register" subcommand now allows for an optional *LINK_DIR* to be included. This specifies the directory path where bpftool will pin struct_ops links with the same name as their corresponding map names. Signed-off-by: Kui-Feng Lee <kuifeng@meta.com> Reviewed-by: Quentin Monnet <quentin@isovalent.com> Link: https://lore.kernel.org/r/20230420002822.345222-2-kuifeng@meta.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/bpf')
-rw-r--r--tools/bpf/bpftool/Documentation/bpftool-struct_ops.rst12
1 files changed, 8 insertions, 4 deletions
diff --git a/tools/bpf/bpftool/Documentation/bpftool-struct_ops.rst b/tools/bpf/bpftool/Documentation/bpftool-struct_ops.rst
index ee53a122c0c7..8022b5321dbe 100644
--- a/tools/bpf/bpftool/Documentation/bpftool-struct_ops.rst
+++ b/tools/bpf/bpftool/Documentation/bpftool-struct_ops.rst
@@ -26,7 +26,7 @@ STRUCT_OPS COMMANDS
| **bpftool** **struct_ops { show | list }** [*STRUCT_OPS_MAP*]
| **bpftool** **struct_ops dump** [*STRUCT_OPS_MAP*]
-| **bpftool** **struct_ops register** *OBJ*
+| **bpftool** **struct_ops register** *OBJ* [*LINK_DIR*]
| **bpftool** **struct_ops unregister** *STRUCT_OPS_MAP*
| **bpftool** **struct_ops help**
|
@@ -51,10 +51,14 @@ DESCRIPTION
for the given struct_ops. Otherwise, it dumps all struct_ops
currently existing in the system.
- **bpftool struct_ops register** *OBJ*
+ **bpftool struct_ops register** *OBJ* [*LINK_DIR*]
Register bpf struct_ops from *OBJ*. All struct_ops under
- the ELF section ".struct_ops" will be registered to
- its kernel subsystem.
+ the ELF section ".struct_ops" and ".struct_ops.link" will
+ be registered to its kernel subsystem. For each
+ struct_ops in the ".struct_ops.link" section, a link
+ will be created. You can give *LINK_DIR* to provide a
+ directory path where these links will be pinned with the
+ same name as their corresponding map name.
**bpftool struct_ops unregister** *STRUCT_OPS_MAP*
Unregister the *STRUCT_OPS_MAP* from the kernel subsystem.