linux/tools/bpf/bpftool
Paul Chaignon c04fb2b0bd bpftool: Probe for bounded loop support
This patch introduces a new probe to check whether the verifier supports
bounded loops as introduced in commit 2589726d12 ("bpf: introduce
bounded loops"). This patch will allow BPF users such as Cilium to probe
for loop support on startup and only unconditionally unroll loops on
older kernels.

The results are displayed as part of the miscellaneous section, as shown
below.

  $ bpftool feature probe | grep loops
  Bounded loop support is available
  $ bpftool feature probe macro | grep LOOPS
  #define HAVE_BOUNDED_LOOPS
  $ bpftool feature probe -j | jq .misc
  {
    "have_large_insn_limit": true,
    "have_bounded_loops": true
  }

Signed-off-by: Paul Chaignon <paul@isovalent.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: Quentin Monnet <quentin@isovalent.com>
Link: https://lore.kernel.org/bpf/f7807c0b27d79f48e71de7b5a99c680ca4bd0151.1641314075.git.paul@isovalent.com
2022-01-05 13:31:40 +01:00
..
bash-completion bpftool: Update the lists of names for maps and prog-attach types 2021-11-14 18:35:02 -08:00
Documentation bpftool: Update doc (use susbtitutions) and test_bpftool_synctypes.py 2021-11-16 13:56:22 +01:00
skeleton tools, bpftool: Remove two unused variables. 2020-10-29 15:23:18 +01:00
.gitignore bpftool: Fix SPDX tag for Makefiles and .gitignore 2021-11-10 09:00:52 -08:00
btf_dumper.c bpftool: Use bpf_obj_get_info_by_fd directly 2021-11-03 11:25:32 -07:00
btf.c bpftool: Use libbpf_get_error() to check error 2021-11-14 18:38:13 -08:00
cfg.c tools, bpftool: Poison and replace kernel integer typedefs 2020-05-11 21:20:46 +02:00
cfg.h tools: bpftool: replace Netronome boilerplate with SPDX license headers 2018-12-13 12:08:44 +01:00
cgroup.c tools: bpftool: Document and add bash completion for -L, -B options 2021-07-30 15:40:28 -07:00
common.c bpftool: Update the lists of names for maps and prog-attach types 2021-11-14 18:35:02 -08:00
feature.c bpftool: Probe for bounded loop support 2022-01-05 13:31:40 +01:00
gen.c bpftool: Switch bpf_object__load_xattr() to bpf_object__load() 2021-12-10 15:29:18 -08:00
iter.c bpftool: Use libbpf_get_error() to check error 2021-11-14 18:38:13 -08:00
jit_disasm.c bpftool: Properly close va_list 'ap' by va_end() on error 2021-07-06 09:19:23 +02:00
json_writer.c bpftool: Support dumping metadata 2020-09-15 18:28:27 -07:00
json_writer.h bpftool: Support dumping metadata 2020-09-15 18:28:27 -07:00
link.c bpftool: Switch to libbpf's hashmap for PIDs/names references 2021-10-25 17:31:39 -07:00
main.c bpftool: Enable line buffering for stdout 2021-12-21 15:44:51 -08:00
main.h bpftool: Enable libbpf's strict mode by default 2021-11-12 16:54:58 +01:00
Makefile bpftool: Enable cross-building with clang 2021-12-16 12:15:05 -08:00
map_perf_ring.c bpftool: Update btf_dump__new() and perf_buffer__new_raw() calls 2021-11-11 16:54:06 -08:00
map.c bpftool: Migrate off of deprecated bpf_create_map_xattr() API 2021-12-02 15:23:40 -08:00
net.c tools: bpftool: Update and synchronise option list in doc and help msg 2021-07-30 15:40:27 -07:00
netlink_dumper.c bpftool: Use consistent include paths for libbpf 2020-01-20 16:37:45 -08:00
netlink_dumper.h tools: bpftool: dual license all files 2018-12-13 12:08:44 +01:00
perf.c tools: bpftool: Update and synchronise option list in doc and help msg 2021-07-30 15:40:27 -07:00
pids.c bpftool: Switch to libbpf's hashmap for PIDs/names references 2021-10-25 17:31:39 -07:00
prog.c bpftool: Switch bpf_object__load_xattr() to bpf_object__load() 2021-12-10 15:29:18 -08:00
struct_ops.c bpftool: Switch bpf_object__load_xattr() to bpf_object__load() 2021-12-10 15:29:18 -08:00
tracelog.c tools: bpftool: add an option to prevent auto-mount of bpffs, tracefs 2018-12-18 14:47:17 +01:00
xlated_dumper.c bpftool: Use syscall/loader program in "prog load" and "gen skeleton" command. 2021-05-19 00:41:31 +02:00
xlated_dumper.h tools: bpftool: replace Netronome boilerplate with SPDX license headers 2018-12-13 12:08:44 +01:00