bpftool-struct_ops
tool to register/unregister/introspect BPF struct_ops
tool to register/unregister/introspect BPF struct_ops
OPTIONS := { { -j | --json } [{ -p | --pretty }] | { -d | --debug } }
COMMANDS := { show | list | dump | register | unregister | help }
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
Output will start with struct_ops map ID, followed by its map name and its struct_ops's kernel type.
# 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