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 }] | { -d | --debug  }
13          }
14
15          COMMANDS := { show | list | dump | register | unregister | help }
16

STRUCT_OPS COMMANDS

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

DESCRIPTION

29          bpftool struct_ops { show | list } [STRUCT_OPS_MAP]
30                 Show  brief  information  about the struct_ops in the system.
31                 If STRUCT_OPS_MAP is specified, it shows information only for
32                 the  given  struct_ops.   Otherwise,  it lists all struct_ops
33                 currently existing in the system.
34
35                 Output will start with struct_ops map ID, followed by its map
36                 name and its struct_ops's kernel type.
37
38          bpftool struct_ops dump [STRUCT_OPS_MAP]
39                 Dump  details information about the struct_ops in the system.
40                 If STRUCT_OPS_MAP is specified, it dumps information only for
41                 the  given  struct_ops.   Otherwise,  it dumps all struct_ops
42                 currently existing in the system.
43
44          bpftool struct_ops register OBJ [LINK_DIR]
45                 Register bpf struct_ops from OBJ.  All struct_ops  under  the
46                 ELF section ".struct_ops" and ".struct_ops.link" will be reg‐
47                 istered to its kernel subsystem.  For each struct_ops in  the
48                 ".struct_ops.link"  section, a link will be created.  You can
49                 give LINK_DIR to provide a directory path where  these  links
50                 will  be pinned with the same name as their corresponding map
51                 name.
52
53          bpftool struct_ops unregister STRUCT_OPS_MAP
54                 Unregister the STRUCT_OPS_MAP from the kernel subsystem.
55
56          bpftool struct_ops help
57                 Print short help message.
58

OPTIONS

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

EXAMPLES

86       # bpftool struct_ops show
87
88          100: dctcp           tcp_congestion_ops
89          105: cubic           tcp_congestion_ops
90
91       # bpftool struct_ops unregister id 105
92
93          Unregistered tcp_congestion_ops cubic id 105
94
95       # bpftool struct_ops register bpf_cubic.o
96
97          Registered tcp_congestion_ops cubic id 110
98

SEE ALSO

100          bpf(2),      bpf-helpers(7),       bpftool(8),       bpftool-btf(8),
101          bpftool-cgroup(8),        bpftool-feature(8),        bpftool-gen(8),
102          bpftool-iter(8),  bpftool-link(8),  bpftool-map(8),  bpftool-net(8),
103          bpftool-perf(8), bpftool-prog(8)
104
105
106
107
108                                                         BPFTOOL-STRUCT_OPS(8)
Impressum