1.. SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 3================== 4bpftool-struct_ops 5================== 6------------------------------------------------------------------------------- 7tool to register/unregister/introspect BPF struct_ops 8------------------------------------------------------------------------------- 9 10:Manual section: 8 11 12.. include:: substitutions.rst 13 14SYNOPSIS 15======== 16 17 **bpftool** [*OPTIONS*] **struct_ops** *COMMAND* 18 19 *OPTIONS* := { |COMMON_OPTIONS| } 20 21 *COMMANDS* := 22 { **show** | **list** | **dump** | **register** | **unregister** | **help** } 23 24STRUCT_OPS COMMANDS 25=================== 26 27| **bpftool** **struct_ops { show | list }** [*STRUCT_OPS_MAP*] 28| **bpftool** **struct_ops dump** [*STRUCT_OPS_MAP*] 29| **bpftool** **struct_ops register** *OBJ* 30| **bpftool** **struct_ops unregister** *STRUCT_OPS_MAP* 31| **bpftool** **struct_ops help** 32| 33| *STRUCT_OPS_MAP* := { **id** *STRUCT_OPS_MAP_ID* | **name** *STRUCT_OPS_MAP_NAME* } 34| *OBJ* := /a/file/of/bpf_struct_ops.o 35 36 37DESCRIPTION 38=========== 39 **bpftool struct_ops { show | list }** [*STRUCT_OPS_MAP*] 40 Show brief information about the struct_ops in the system. 41 If *STRUCT_OPS_MAP* is specified, it shows information only 42 for the given struct_ops. Otherwise, it lists all struct_ops 43 currently existing in the system. 44 45 Output will start with struct_ops map ID, followed by its map 46 name and its struct_ops's kernel type. 47 48 **bpftool struct_ops dump** [*STRUCT_OPS_MAP*] 49 Dump details information about the struct_ops in the system. 50 If *STRUCT_OPS_MAP* is specified, it dumps information only 51 for the given struct_ops. Otherwise, it dumps all struct_ops 52 currently existing in the system. 53 54 **bpftool struct_ops register** *OBJ* 55 Register bpf struct_ops from *OBJ*. All struct_ops under 56 the ELF section ".struct_ops" will be registered to 57 its kernel subsystem. 58 59 **bpftool struct_ops unregister** *STRUCT_OPS_MAP* 60 Unregister the *STRUCT_OPS_MAP* from the kernel subsystem. 61 62 **bpftool struct_ops help** 63 Print short help message. 64 65OPTIONS 66======= 67 .. include:: common_options.rst 68 69EXAMPLES 70======== 71**# bpftool struct_ops show** 72 73:: 74 75 100: dctcp tcp_congestion_ops 76 105: cubic tcp_congestion_ops 77 78**# bpftool struct_ops unregister id 105** 79 80:: 81 82 Unregistered tcp_congestion_ops cubic id 105 83 84**# bpftool struct_ops register bpf_cubic.o** 85 86:: 87 88 Registered tcp_congestion_ops cubic id 110 89