From: Yafang Shao <laoar.shao@gmail.com>
To: ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org,
kafai@fb.com, songliubraving@fb.com, yhs@fb.com,
john.fastabend@gmail.com, kpsingh@kernel.org,
quentin@isovalent.com
Cc: netdev@vger.kernel.org, bpf@vger.kernel.org,
Yafang Shao <laoar.shao@gmail.com>
Subject: [PATCH bpf-next 4/4] bpftool: Show also the name of type BPF_OBJ_LINK
Date: Wed, 29 Jun 2022 15:48:32 +0000 [thread overview]
Message-ID: <20220629154832.56986-5-laoar.shao@gmail.com> (raw)
In-Reply-To: <20220629154832.56986-1-laoar.shao@gmail.com>
For example,
/sys/fs/bpf/maps.debug is a bpf link, when you run `bpftool map show` to
show it,
- before
$ bpftool map show pinned /sys/fs/bpf/maps.debug
Error: incorrect object type: unknown
- after
$ bpftool map show pinned /sys/fs/bpf/maps.debug
Error: incorrect object type: link
Signed-off-by: Yafang Shao <laoar.shao@gmail.com>
---
tools/bpf/bpftool/common.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/bpf/bpftool/common.c b/tools/bpf/bpftool/common.c
index a0d4acd7c54a..5e979269c89a 100644
--- a/tools/bpf/bpftool/common.c
+++ b/tools/bpf/bpftool/common.c
@@ -251,6 +251,7 @@ const char *get_fd_type_name(enum bpf_obj_type type)
[BPF_OBJ_UNKNOWN] = "unknown",
[BPF_OBJ_PROG] = "prog",
[BPF_OBJ_MAP] = "map",
+ [BPF_OBJ_LINK] = "link",
};
if (type < 0 || type >= ARRAY_SIZE(names) || !names[type])
--
2.17.1
next prev parent reply other threads:[~2022-06-29 15:49 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-29 15:48 [PATCH bpf-next 0/4] bpf: Minor fixes Yafang Shao
2022-06-29 15:48 ` [PATCH bpf-next 1/4] bpf: Make non-preallocated allocation low priority Yafang Shao
2022-06-30 21:47 ` Daniel Borkmann
2022-07-02 2:30 ` Yafang Shao
2022-07-02 4:14 ` Roman Gushchin
2022-07-02 15:08 ` Yafang Shao
2022-07-02 3:54 ` Roman Gushchin
2022-06-29 15:48 ` [PATCH bpf-next 2/4] bpf: Warn on non-preallocated case for missed trace types Yafang Shao
2022-06-29 15:48 ` [PATCH bpf-next 3/4] bpf: Don't do preempt check when migrate is disabled Yafang Shao
2022-06-30 20:43 ` Hao Luo
2022-07-02 2:34 ` Yafang Shao
2022-06-29 15:48 ` Yafang Shao [this message]
2022-06-29 16:22 ` [PATCH bpf-next 4/4] bpftool: Show also the name of type BPF_OBJ_LINK Quentin Monnet
2022-06-30 21:55 ` Daniel Borkmann
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=20220629154832.56986-5-laoar.shao@gmail.com \
--to=laoar.shao@gmail.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=netdev@vger.kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).