summaryrefslogtreecommitdiff
path: root/tools/bpf/bpftool/json_writer.h
diff options
context:
space:
mode:
authorPaul Chaignon <paul@isovalent.com>2022-01-04 18:59:57 +0100
committerDaniel Borkmann <daniel@iogearbox.net>2022-01-05 13:31:40 +0100
commitc04fb2b0bd9275969be3b0a95f9c3ef76b1bfb73 (patch)
treef722f5d8116e423f73b95c2ccfe2b4e9ba5c903a /tools/bpf/bpftool/json_writer.h
parentb22bf1b9979a608827dea98c61ed9ec297bcc513 (diff)
bpftool: Probe for bounded loop support
This patch introduces a new probe to check whether the verifier supports bounded loops as introduced in commit 2589726d12a1 ("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
Diffstat (limited to 'tools/bpf/bpftool/json_writer.h')
0 files changed, 0 insertions, 0 deletions