Commit 45cea721 authored by Kui-Feng Lee's avatar Kui-Feng Lee Committed by Alexei Starovoitov
Browse files

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: default avatarKui-Feng Lee <kuifeng@meta.com>
Reviewed-by: default avatarQuentin Monnet <quentin@isovalent.com>
Link: https://lore.kernel.org/r/20230420002822.345222-2-kuifeng@meta.com


Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent 0232b788
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -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.