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
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
45                 Register bpf struct_ops from OBJ.  All struct_ops  under  the
46                 ELF  section  ".struct_ops"  will be registered to its kernel
47                 subsystem.
48
49          bpftool struct_ops unregister STRUCT_OPS_MAP
50                 Unregister the STRUCT_OPS_MAP from the kernel subsystem.
51
52          bpftool struct_ops help
53                 Print short help message.
54

OPTIONS

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

EXAMPLES

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

SEE ALSO

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