1BPFTOOL-FEATURE(8) BPFTOOL-FEATURE(8)
2
3
4
6 bpftool-feature - tool for inspection of eBPF-related parameters for
7 Linux kernel or net device
8
10 bpftool [OPTIONS] feature COMMAND
11
12 OPTIONS := { { -j | --json } [{ -p | --pretty }] }
13
14 COMMANDS := { probe | help }
15
17 bpftool feature probe [COMPONENT] [macros [prefix PREFIX]]
18 bpftool feature help
19
20 COMPONENT := { kernel | dev NAME }
21
22
24 bpftool feature probe [kernel] [macros [prefix PREFIX]]
25 Probe the running kernel and dump a number of eBPF-related
26 parameters, such as availability of the bpf() system call,
27 JIT status, eBPF program types availability, eBPF helper
28 functions availability, and more.
29
30 If the macros keyword (but not the -j option) is passed, a
31 subset of the output is dumped as a list of #define macros
32 that are ready to be included in a C header file, for exam‐
33 ple. If, additionally, prefix is used to define a PREFIX, the
34 provided string will be used as a prefix to the names of the
35 macros: this can be used to avoid conflicts on macro names
36 when including the output of this command as a header file.
37
38 Keyword kernel can be omitted. If no probe target is speci‐
39 fied, probing the kernel is the default behaviour.
40
41 Note that when probed, some eBPF helpers (e.g.
42 bpf_trace_printk() or bpf_probe_write_user()) may print warn‐
43 ings to kernel logs.
44
45 bpftool feature probe dev NAME [macros [prefix PREFIX]]
46 Probe network device for supported eBPF features and dump
47 results to the console.
48
49 The two keywords macros and prefix have the same role as when
50 probing the kernel.
51
52 bpftool feature help
53 Print short help message.
54
56 -h, --help
57 Print short generic help message (similar to bpftool help).
58
59 -V, --version
60 Print version number (similar to bpftool version).
61
62 -j, --json
63 Generate JSON output. For commands that cannot produce JSON,
64 this option has no effect.
65
66 -p, --pretty
67 Generate human-readable JSON output. Implies -j.
68
69 -d, --debug
70 Print all logs available from libbpf, including debug-level
71 information.
72
74 bpf(2), bpf-helpers(7), bpftool(8), bpftool-prog(8), bpftool-map(8),
75 bpftool-cgroup(8), bpftool-net(8), bpftool-perf(8), bpftool-btf(8)
76
77
78
79
80 BPFTOOL-FEATURE(8)