0001 .. SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
0002
0003 ==================
0004 bpftool-struct_ops
0005 ==================
0006 -------------------------------------------------------------------------------
0007 tool to register/unregister/introspect BPF struct_ops
0008 -------------------------------------------------------------------------------
0009
0010 :Manual section: 8
0011
0012 .. include:: substitutions.rst
0013
0014 SYNOPSIS
0015 ========
0016
0017 **bpftool** [*OPTIONS*] **struct_ops** *COMMAND*
0018
0019 *OPTIONS* := { |COMMON_OPTIONS| }
0020
0021 *COMMANDS* :=
0022 { **show** | **list** | **dump** | **register** | **unregister** | **help** }
0023
0024 STRUCT_OPS COMMANDS
0025 ===================
0026
0027 | **bpftool** **struct_ops { show | list }** [*STRUCT_OPS_MAP*]
0028 | **bpftool** **struct_ops dump** [*STRUCT_OPS_MAP*]
0029 | **bpftool** **struct_ops register** *OBJ*
0030 | **bpftool** **struct_ops unregister** *STRUCT_OPS_MAP*
0031 | **bpftool** **struct_ops help**
0032 |
0033 | *STRUCT_OPS_MAP* := { **id** *STRUCT_OPS_MAP_ID* | **name** *STRUCT_OPS_MAP_NAME* }
0034 | *OBJ* := /a/file/of/bpf_struct_ops.o
0035
0036
0037 DESCRIPTION
0038 ===========
0039 **bpftool struct_ops { show | list }** [*STRUCT_OPS_MAP*]
0040 Show brief information about the struct_ops in the system.
0041 If *STRUCT_OPS_MAP* is specified, it shows information only
0042 for the given struct_ops. Otherwise, it lists all struct_ops
0043 currently existing in the system.
0044
0045 Output will start with struct_ops map ID, followed by its map
0046 name and its struct_ops's kernel type.
0047
0048 **bpftool struct_ops dump** [*STRUCT_OPS_MAP*]
0049 Dump details information about the struct_ops in the system.
0050 If *STRUCT_OPS_MAP* is specified, it dumps information only
0051 for the given struct_ops. Otherwise, it dumps all struct_ops
0052 currently existing in the system.
0053
0054 **bpftool struct_ops register** *OBJ*
0055 Register bpf struct_ops from *OBJ*. All struct_ops under
0056 the ELF section ".struct_ops" will be registered to
0057 its kernel subsystem.
0058
0059 **bpftool struct_ops unregister** *STRUCT_OPS_MAP*
0060 Unregister the *STRUCT_OPS_MAP* from the kernel subsystem.
0061
0062 **bpftool struct_ops help**
0063 Print short help message.
0064
0065 OPTIONS
0066 =======
0067 .. include:: common_options.rst
0068
0069 EXAMPLES
0070 ========
0071 **# bpftool struct_ops show**
0072
0073 ::
0074
0075 100: dctcp tcp_congestion_ops
0076 105: cubic tcp_congestion_ops
0077
0078 **# bpftool struct_ops unregister id 105**
0079
0080 ::
0081
0082 Unregistered tcp_congestion_ops cubic id 105
0083
0084 **# bpftool struct_ops register bpf_cubic.o**
0085
0086 ::
0087
0088 Registered tcp_congestion_ops cubic id 110