BPF Archive on lore.kernel.org
 help / color / Atom feed
* [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	[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, back to index

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

BPF Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/bpf/0 bpf/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 bpf bpf/ https://lore.kernel.org/bpf \
		bpf@vger.kernel.org bpf@archiver.kernel.org
	public-inbox-index bpf


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.bpf


AGPL code for this site: git clone https://public-inbox.org/ public-inbox