Skip to content
Snippets Groups Projects
Select Git revision
  • f28ef96d7b04a76575a020a9da4f92358abe68c6
  • vme-testing default
  • ci-test
  • master
  • remoteproc
  • am625-sk-ov5640
  • pcal6534-upstreaming
  • lps22df-upstreaming
  • msc-upstreaming
  • imx8mp
  • iio/noa1305
  • vme-next
  • vme-next-4.14-rc4
  • v4.14-rc4
  • v4.14-rc3
  • v4.14-rc2
  • v4.14-rc1
  • v4.13
  • vme-next-4.13-rc7
  • v4.13-rc7
  • v4.13-rc6
  • v4.13-rc5
  • v4.13-rc4
  • v4.13-rc3
  • v4.13-rc2
  • v4.13-rc1
  • v4.12
  • v4.12-rc7
  • v4.12-rc6
  • v4.12-rc5
  • v4.12-rc4
  • v4.12-rc3
32 results

bpftool-struct_ops.rst

Blame
  • user avatar
    Quentin Monnet authored and Alexei Starovoitov committed
    Nearly all man pages for bpftool have the same common set of option
    flags (--help, --version, --json, --pretty, --debug). The description is
    duplicated across all the pages, which is more difficult to maintain if
    the description of an option changes. It may also be confusing to sort
    out what options are not "common" and should not be copied when creating
    new manual pages.
    
    Let's move the description for those common options to a separate file,
    which is included with a RST directive when generating the man pages.
    
    Signed-off-by: default avatarQuentin Monnet <quentin@isovalent.com>
    Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
    Acked-by: default avatarAndrii Nakryiko <andriin@fb.com>
    Link: https://lore.kernel.org/bpf/20200909162500.17010-3-quentin@isovalent.com
    f28ef96d
    History
    bpftool-struct_ops.rst 2.66 KiB

    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

    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-btf(8), bpftool-cgroup(8), bpftool-feature(8), bpftool-gen(8), bpftool-iter(8), bpftool-link(8), bpftool-map(8), bpftool-net(8), bpftool-perf(8), bpftool-prog(8)