From: Sven Schnelle <svens@linux.ibm.com>
To: Quentin Monnet <quentin@isovalent.com>
Cc: 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>,
Stanislav Fomichev <sdf@google.com>, Hao Luo <haoluo@google.com>,
Jiri Olsa <jolsa@kernel.org>,
bpf@vger.kernel.org, Eduard Zingerman <eddyz87@gmail.com>,
linux-s390@vger.kernel.org
Subject: Re: [PATCH bpf-next v3 3/7] bpftool: Support inline annotations when dumping the CFG of a program
Date: Wed, 12 Apr 2023 08:04:04 +0200 [thread overview]
Message-ID: <yt9d8rexy6uj.fsf@linux.ibm.com> (raw)
In-Reply-To: <20230405132120.59886-4-quentin@isovalent.com> (Quentin Monnet's message of "Wed, 5 Apr 2023 14:21:16 +0100")
Quentin Monnet <quentin@isovalent.com> writes:
> diff --git a/tools/bpf/bpftool/btf_dumper.c b/tools/bpf/bpftool/btf_dumper.c
> index e7f6ec3a8f35..583aa843df92 100644
> --- a/tools/bpf/bpftool/btf_dumper.c
> +++ b/tools/bpf/bpftool/btf_dumper.c
> @@ -821,3 +821,37 @@ void btf_dump_linfo_json(const struct btf *btf,
> BPF_LINE_INFO_LINE_COL(linfo->line_col));
> }
> }
> +
> +static void dotlabel_puts(const char *s)
> +{
> + for (; *s; ++s) {
> + switch (*s) {
> + case '\\':
> + case '"':
> + case '{':
> + case '}':
> + case '<':
> + case '>':
> + case '|':
> + case ' ':
> + putchar('\\');
> + __fallthrough;
Is __fallthrough correct? I see the following compile error on s390 in
linux-next (20230412):
CC btf_dumper.o
btf_dumper.c: In function ‘dotlabel_puts’:
btf_dumper.c:838:25: error: ‘__fallthrough’ undeclared (first use in this function); did you mean ‘fallthrough’?
838 | __fallthrough;
| ^~~~~~~~~~~~~
removing the two underscores fixes this.
> + default:
> + putchar(*s);
> + }
> + }
> +}
Thanks,
Sven
next prev parent reply other threads:[~2023-04-12 6:04 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-05 13:21 [PATCH bpf-next v3 0/7] bpftool: Add inline annotations when dumping program CFGs Quentin Monnet
2023-04-05 13:21 ` [PATCH bpf-next v3 1/7] bpftool: Fix documentation about line info display for prog dumps Quentin Monnet
2023-04-05 13:21 ` [PATCH bpf-next v3 2/7] bpftool: Fix bug for long instructions in program CFG dumps Quentin Monnet
2023-04-05 13:21 ` [PATCH bpf-next v3 3/7] bpftool: Support inline annotations when dumping the CFG of a program Quentin Monnet
2023-04-12 6:04 ` Sven Schnelle [this message]
2023-04-12 12:05 ` Quentin Monnet
2023-04-12 12:26 ` Sven Schnelle
2023-04-12 13:29 ` Quentin Monnet
2023-04-05 13:21 ` [PATCH bpf-next v3 4/7] bpftool: Return an error on prog dumps if both CFG and JSON are required Quentin Monnet
2023-04-05 13:21 ` [PATCH bpf-next v3 5/7] bpftool: Support "opcodes", "linum", "visual" simultaneously Quentin Monnet
2023-04-05 13:21 ` [PATCH bpf-next v3 6/7] bpftool: Support printing opcodes and source file references in CFG Quentin Monnet
2023-04-05 13:21 ` [PATCH bpf-next v3 7/7] bpftool: Clean up _bpftool_once_attr() calls in bash completion Quentin Monnet
2023-04-06 4:30 ` [PATCH bpf-next v3 0/7] bpftool: Add inline annotations when dumping program CFGs 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=yt9d8rexy6uj.fsf@linux.ibm.com \
--to=svens@linux.ibm.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=haoluo@google.com \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kafai@fb.com \
--cc=kpsingh@kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=quentin@isovalent.com \
--cc=sdf@google.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.