Revert "tty: hvc: Fix data abort due to race in hvc_open"
[linux/fpc-iii.git] / tools / bpf / bpftool / Documentation / bpftool-struct_ops.rst
blobf045cc89dd6d4d4627e04e8038981bb08fbe0515
1 ==================
2 bpftool-struct_ops
3 ==================
4 -------------------------------------------------------------------------------
5 tool to register/unregister/introspect BPF struct_ops
6 -------------------------------------------------------------------------------
8 :Manual section: 8
10 SYNOPSIS
11 ========
13         **bpftool** [*OPTIONS*] **struct_ops** *COMMAND*
15         *OPTIONS* := { { **-j** | **--json** } [{ **-p** | **--pretty** }] }
17         *COMMANDS* :=
18         { **show** | **list** | **dump** | **register** | **unregister** | **help** }
20 STRUCT_OPS COMMANDS
21 ===================
23 |       **bpftool** **struct_ops { show | list }** [*STRUCT_OPS_MAP*]
24 |       **bpftool** **struct_ops dump** [*STRUCT_OPS_MAP*]
25 |       **bpftool** **struct_ops register** *OBJ*
26 |       **bpftool** **struct_ops unregister** *STRUCT_OPS_MAP*
27 |       **bpftool** **struct_ops help**
29 |       *STRUCT_OPS_MAP* := { **id** *STRUCT_OPS_MAP_ID* | **name** *STRUCT_OPS_MAP_NAME* }
30 |       *OBJ* := /a/file/of/bpf_struct_ops.o
33 DESCRIPTION
34 ===========
35         **bpftool struct_ops { show | list }** [*STRUCT_OPS_MAP*]
36                   Show brief information about the struct_ops in the system.
37                   If *STRUCT_OPS_MAP* is specified, it shows information only
38                   for the given struct_ops.  Otherwise, it lists all struct_ops
39                   currently existing in the system.
41                   Output will start with struct_ops map ID, followed by its map
42                   name and its struct_ops's kernel type.
44         **bpftool struct_ops dump** [*STRUCT_OPS_MAP*]
45                   Dump details information about the struct_ops in the system.
46                   If *STRUCT_OPS_MAP* is specified, it dumps information only
47                   for the given struct_ops.  Otherwise, it dumps all struct_ops
48                   currently existing in the system.
50         **bpftool struct_ops register** *OBJ*
51                   Register bpf struct_ops from *OBJ*.  All struct_ops under
52                   the ELF section ".struct_ops" will be registered to
53                   its kernel subsystem.
55         **bpftool struct_ops unregister**  *STRUCT_OPS_MAP*
56                   Unregister the *STRUCT_OPS_MAP* from the kernel subsystem.
58         **bpftool struct_ops help**
59                   Print short help message.
61 OPTIONS
62 =======
63         -h, --help
64                   Print short generic help message (similar to **bpftool help**).
66         -V, --version
67                   Print version number (similar to **bpftool version**).
69         -j, --json
70                   Generate JSON output. For commands that cannot produce JSON, this
71                   option has no effect.
73         -p, --pretty
74                   Generate human-readable JSON output. Implies **-j**.
76         -d, --debug
77                   Print all logs available, even debug-level information. This
78                   includes logs from libbpf as well as from the verifier, when
79                   attempting to load programs.
81 EXAMPLES
82 ========
83 **# bpftool struct_ops show**
87     100: dctcp           tcp_congestion_ops
88     105: cubic           tcp_congestion_ops
90 **# bpftool struct_ops unregister id 105**
94    Unregistered tcp_congestion_ops cubic id 105
96 **# bpftool struct_ops register bpf_cubic.o**
100    Registered tcp_congestion_ops cubic id 110
103 SEE ALSO
104 ========
105         **bpf**\ (2),
106         **bpf-helpers**\ (7),
107         **bpftool**\ (8),
108         **bpftool-prog**\ (8),
109         **bpftool-map**\ (8),
110         **bpftool-cgroup**\ (8),
111         **bpftool-feature**\ (8),
112         **bpftool-net**\ (8),
113         **bpftool-perf**\ (8),
114         **bpftool-btf**\ (8)
115         **bpftool-gen**\ (8)
116