From: Milan Landaverde <milan@mdaverde.com>
To: unlisted-recipients:; (no To-header on input)
Cc: milan@mdaverde.com, "Alexei Starovoitov" <ast@kernel.org>,
"Daniel Borkmann" <daniel@iogearbox.net>,
"Andrii Nakryiko" <andrii@kernel.org>,
"Martin KaFai Lau" <kafai@fb.com>,
"Song Liu" <songliubraving@fb.com>, "Yonghong Song" <yhs@fb.com>,
"John Fastabend" <john.fastabend@gmail.com>,
"KP Singh" <kpsingh@kernel.org>,
"Quentin Monnet" <quentin@isovalent.com>,
"Paul Chaignon" <paul@isovalent.com>,
"Niklas Söderlund" <niklas.soderlund@corigine.com>,
netdev@vger.kernel.org, bpf@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH bpf-next 0/2] bpftool: fix feature output when helper probes fail
Date: Wed, 4 May 2022 12:13:30 -0400 [thread overview]
Message-ID: <20220504161356.3497972-1-milan@mdaverde.com> (raw)
Currently in bpftool's feature probe, we incorrectly tell the user that
all of the helper functions are supported for program types where helper
probing fails or is explicitly unsupported[1]:
$ bpftool feature probe
...
eBPF helpers supported for program type tracing:
- bpf_map_lookup_elem
- bpf_map_update_elem
- bpf_map_delete_elem
...
- bpf_redirect_neigh
- bpf_check_mtu
- bpf_sys_bpf
- bpf_sys_close
This patch adjusts bpftool to relay to the user when helper support
can't be determined:
$ bpftool feature probe
...
eBPF helpers supported for program type lirc_mode2:
Program type not supported
eBPF helpers supported for program type tracing:
Could not determine which helpers are available
eBPF helpers supported for program type struct_opts:
Could not determine which helpers are available
eBPF helpers supported for program type ext:
Could not determine which helpers are available
Rather than imply that no helpers are available for the program type, we
let the user know that helper function probing failed entirely.
[1] https://lore.kernel.org/bpf/20211217171202.3352835-2-andrii@kernel.org/
Milan Landaverde (2):
bpftool: adjust for error codes from libbpf probes
bpftool: output message if no helpers found in feature probing
tools/bpf/bpftool/feature.c | 22 +++++++++++++++++-----
1 file changed, 17 insertions(+), 5 deletions(-)
--
2.32.0
next reply other threads:[~2022-05-04 16:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-04 16:13 Milan Landaverde [this message]
2022-05-04 16:13 ` [PATCH bpf-next 1/2] bpftool: adjust for error codes from libbpf probes Milan Landaverde
2022-05-04 16:13 ` [PATCH bpf-next 2/2] bpftool: output message if no helpers found in feature probing Milan Landaverde
2022-05-05 10:15 ` [PATCH bpf-next 0/2] bpftool: fix feature output when helper probes fail Quentin Monnet
2022-05-10 0:30 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220504161356.3497972-1-milan@mdaverde.com \
--to=milan@mdaverde.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=john.fastabend@gmail.com \
--cc=kafai@fb.com \
--cc=kpsingh@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=niklas.soderlund@corigine.com \
--cc=paul@isovalent.com \
--cc=quentin@isovalent.com \
--cc=songliubraving@fb.com \
--cc=yhs@fb.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox