* [PATCH bpf] bpftool: fix BTF raw dump of FWD's fwd_kind
@ 2019-05-17 6:21 Andrii Nakryiko
2019-05-17 12:24 ` Daniel Borkmann
0 siblings, 1 reply; 2+ messages in thread
From: Andrii Nakryiko @ 2019-05-17 6:21 UTC (permalink / raw)
To: andrii.nakryiko, netdev, bpf, ast, daniel; +Cc: Andrii Nakryiko
kflag bit determines whether FWD is for struct or union. Use that bit.
Fixes: c93cc69004df ("bpftool: add ability to dump BTF types")
Signed-off-by: Andrii Nakryiko <andriin@fb.com>
---
tools/bpf/bpftool/btf.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/bpf/bpftool/btf.c b/tools/bpf/bpftool/btf.c
index 58a2cd002a4b..7317438ecd9e 100644
--- a/tools/bpf/bpftool/btf.c
+++ b/tools/bpf/bpftool/btf.c
@@ -208,8 +208,8 @@ static int dump_btf_type(const struct btf *btf, __u32 id,
break;
}
case BTF_KIND_FWD: {
- const char *fwd_kind = BTF_INFO_KIND(t->info) ? "union"
- : "struct";
+ const char *fwd_kind = BTF_INFO_KFLAG(t->info) ? "union"
+ : "struct";
if (json_output)
jsonw_string_field(w, "fwd_kind", fwd_kind);
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH bpf] bpftool: fix BTF raw dump of FWD's fwd_kind
2019-05-17 6:21 [PATCH bpf] bpftool: fix BTF raw dump of FWD's fwd_kind Andrii Nakryiko
@ 2019-05-17 12:24 ` Daniel Borkmann
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Borkmann @ 2019-05-17 12:24 UTC (permalink / raw)
To: Andrii Nakryiko, andrii.nakryiko, netdev, bpf, ast
On 05/17/2019 08:21 AM, Andrii Nakryiko wrote:
> kflag bit determines whether FWD is for struct or union. Use that bit.
>
> Fixes: c93cc69004df ("bpftool: add ability to dump BTF types")
> Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Applied, thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-05-17 12:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-17 6:21 [PATCH bpf] bpftool: fix BTF raw dump of FWD's fwd_kind Andrii Nakryiko
2019-05-17 12:24 ` Daniel Borkmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).