1BPFTOOL-STRUCT_OPS(8)                                    BPFTOOL-STRUCT_OPS(8)
2
3
4

NAME

6       bpftool-struct_ops   -   tool   to  register/unregister/introspect  BPF
7       struct_ops
8

SYNOPSIS

10          bpftool [OPTIONS] struct_ops COMMAND
11
12          OPTIONS := { { -j | --json } [{ -p | --pretty }] }
13
14          COMMANDS := { show | list | dump | register | unregister | help }
15

STRUCT_OPS COMMANDS

17       bpftool struct_ops { show | list } [STRUCT_OPS_MAP]
18       bpftool struct_ops dump [STRUCT_OPS_MAP]
19       bpftool struct_ops register OBJ
20       bpftool struct_ops unregister STRUCT_OPS_MAP
21       bpftool struct_ops help
22
23       STRUCT_OPS_MAP := { id STRUCT_OPS_MAP_ID | name STRUCT_OPS_MAP_NAME }
24       OBJ := /a/file/of/bpf_struct_ops.o
25
26

DESCRIPTION

28          bpftool struct_ops { show | list } [STRUCT_OPS_MAP]
29                 Show brief information about the struct_ops  in  the  system.
30                 If STRUCT_OPS_MAP is specified, it shows information only for
31                 the given struct_ops.  Otherwise,  it  lists  all  struct_ops
32                 currently existing in the system.
33
34                 Output will start with struct_ops map ID, followed by its map
35                 name and its struct_ops's kernel type.
36
37          bpftool struct_ops dump [STRUCT_OPS_MAP]
38                 Dump details information about the struct_ops in the  system.
39                 If STRUCT_OPS_MAP is specified, it dumps information only for
40                 the given struct_ops.  Otherwise,  it  dumps  all  struct_ops
41                 currently existing in the system.
42
43          bpftool struct_ops register OBJ
44                 Register  bpf  struct_ops from OBJ.  All struct_ops under the
45                 ELF section ".struct_ops" will be registered  to  its  kernel
46                 subsystem.
47
48          bpftool struct_ops unregister STRUCT_OPS_MAP
49                 Unregister the STRUCT_OPS_MAP from the kernel subsystem.
50
51          bpftool struct_ops help
52                 Print short help message.
53

OPTIONS

55          -h, --help
56                 Print short help message (similar to bpftool help).
57
58          -V, --version
59                 Print  version  number  (similar  to  bpftool  version),  and
60                 optional features that were included when  bpftool  was  com‐
61                 piled.  Optional  features  include linking against libbfd to
62                 provide the disassembler for JIT-ted programs  (bpftool  prog
63                 dump  jited)  and  usage of BPF skeletons (some features like
64                 bpftool prog  profile  or  showing  pids  associated  to  BPF
65                 objects may rely on it).
66
67          -j, --json
68                 Generate  JSON output. For commands that cannot produce JSON,
69                 this option has no effect.
70
71          -p, --pretty
72                 Generate human-readable JSON output. Implies -j.
73
74          -d, --debug
75                 Print all logs available, even debug-level information.  This
76                 includes  logs from libbpf as well as from the verifier, when
77                 attempting to load programs.
78

EXAMPLES

80       # bpftool struct_ops show
81
82          100: dctcp           tcp_congestion_ops
83          105: cubic           tcp_congestion_ops
84
85       # bpftool struct_ops unregister id 105
86
87          Unregistered tcp_congestion_ops cubic id 105
88
89       # bpftool struct_ops register bpf_cubic.o
90
91          Registered tcp_congestion_ops cubic id 110
92

SEE ALSO

94          bpf(2),      bpf-helpers(7),       bpftool(8),       bpftool-btf(8),
95          bpftool-cgroup(8),        bpftool-feature(8),        bpftool-gen(8),
96          bpftool-iter(8),  bpftool-link(8),  bpftool-map(8),  bpftool-net(8),
97          bpftool-perf(8), bpftool-prog(8)
98
99
100
101
102                                                         BPFTOOL-STRUCT_OPS(8)
Impressum