summaryrefslogtreecommitdiffstats
path: root/tools/bpf/bpftool/Documentation/bpftool-struct_ops.rst
blob: f045cc89dd6d4d4627e04e8038981bb08fbe0515 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
==================
bpftool-struct_ops
==================
-------------------------------------------------------------------------------
tool to register/unregister/introspect BPF struct_ops
-------------------------------------------------------------------------------

:Manual section: 8

SYNOPSIS
========

	**bpftool** [*OPTIONS*] **struct_ops** *COMMAND*

	*OPTIONS* := { { **-j** | **--json** } [{ **-p** | **--pretty** }] }

	*COMMANDS* :=
	{ **show** | **list** | **dump** | **register** | **unregister** | **help** }

STRUCT_OPS COMMANDS
===================

|	**bpftool** **struct_ops { show | list }** [*STRUCT_OPS_MAP*]
|	**bpftool** **struct_ops dump** [*STRUCT_OPS_MAP*]
|	**bpftool** **struct_ops register** *OBJ*
|	**bpftool** **struct_ops unregister** *STRUCT_OPS_MAP*
|	**bpftool** **struct_ops help**
|
|	*STRUCT_OPS_MAP* := { **id** *STRUCT_OPS_MAP_ID* | **name** *STRUCT_OPS_MAP_NAME* }
|	*OBJ* := /a/file/of/bpf_struct_ops.o


DESCRIPTION
===========
	**bpftool struct_ops { show | list }** [*STRUCT_OPS_MAP*]
		  Show brief information about the struct_ops in the system.
		  If *STRUCT_OPS_MAP* is specified, it shows information only
		  for the given struct_ops.  Otherwise, it lists all struct_ops
		  currently existing in the system.

		  Output will start with struct_ops map ID, followed by its map
		  name and its struct_ops's kernel type.

	**bpftool struct_ops dump** [*STRUCT_OPS_MAP*]
		  Dump details information about the struct_ops in the system.
		  If *STRUCT_OPS_MAP* is specified, it dumps information only
		  for the given struct_ops.  Otherwise, it dumps all struct_ops
		  currently existing in the system.

	**bpftool struct_ops register** *OBJ*
		  Register bpf struct_ops from *OBJ*.  All struct_ops under
		  the ELF section ".struct_ops" will be registered to
		  its kernel subsystem.

	**bpftool struct_ops unregister**  *STRUCT_OPS_MAP*
		  Unregister the *STRUCT_OPS_MAP* from the kernel subsystem.

	**bpftool struct_ops help**
		  Print short help message.

OPTIONS
=======
	-h, --help
		  Print short generic help message (similar to **bpftool help**).

	-V, --version
		  Print version number (similar to **bpftool version**).

	-j, --json
		  Generate JSON output. For commands that cannot produce JSON, this
		  option has no effect.

	-p, --pretty
		  Generate human-readable JSON output. Implies **-j**.

	-d, --debug
		  Print all logs available, even debug-level information. This
		  includes logs from libbpf as well as from the verifier, when
		  attempting to load programs.

EXAMPLES
========
**# bpftool struct_ops show**

::

    100: dctcp           tcp_congestion_ops
    105: cubic           tcp_congestion_ops

**# bpftool struct_ops unregister id 105**

::

   Unregistered tcp_congestion_ops cubic id 105

**# bpftool struct_ops register bpf_cubic.o**

::

   Registered tcp_congestion_ops cubic id 110


SEE ALSO
========
	**bpf**\ (2),
	**bpf-helpers**\ (7),
	**bpftool**\ (8),
	**bpftool-prog**\ (8),
	**bpftool-map**\ (8),
	**bpftool-cgroup**\ (8),
	**bpftool-feature**\ (8),
	**bpftool-net**\ (8),
	**bpftool-perf**\ (8),
	**bpftool-btf**\ (8)
	**bpftool-gen**\ (8)