From: Yonghong Song <yhs@fb.com>
To: <bpf@vger.kernel.org>, <netdev@vger.kernel.org>
Cc: Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>, <kernel-team@fb.com>
Subject: [PATCH bpf-next v2 0/3] bpf: implement link_query for bpf iterators
Date: Thu, 20 Aug 2020 15:49:17 -0700 [thread overview]
Message-ID: <20200820224917.483062-1-yhs@fb.com> (raw)
"link" has been an important concept for bpf ecosystem to connect
bpf program with other properties. Currently, the information related
information can be queried from userspace through bpf command
BPF_LINK_GET_NEXT_ID, BPF_LINK_GET_FD_BY_ID and BPF_OBJ_GET_INFO_BY_FD.
The information is also available by "cating" /proc/<pid>/fdinfo/<link_fd>.
Raw_tracepoint, tracing, cgroup, netns and xdp links are already
supported in the kernel and bpftool.
This patch added support for bpf iterator. Patch #1 added generic support
for link querying interface. Patch #2 implemented callback functions
for map element bpf iterators. Patch #3 added bpftool support.
Changelogs:
v1 -> v2:
. fix checkpatch.pl warnings.
Yonghong Song (3):
bpf: implement link_query for bpf iterators
bpf: implement link_query callbacks in map element iterators
bpftool: implement link_query for bpf iterators
include/linux/bpf.h | 10 ++++++
include/uapi/linux/bpf.h | 7 ++++
kernel/bpf/bpf_iter.c | 58 ++++++++++++++++++++++++++++++++++
kernel/bpf/map_iter.c | 15 +++++++++
net/core/bpf_sk_storage.c | 2 ++
tools/bpf/bpftool/link.c | 44 ++++++++++++++++++++++++--
tools/include/uapi/linux/bpf.h | 7 ++++
7 files changed, 140 insertions(+), 3 deletions(-)
--
2.24.1
next reply other threads:[~2020-08-20 22:49 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-20 22:49 Yonghong Song [this message]
2020-08-20 22:49 ` [PATCH bpf-next v2 1/3] bpf: implement link_query for bpf iterators Yonghong Song
2020-08-21 6:31 ` Andrii Nakryiko
2020-08-21 6:42 ` Yonghong Song
2020-08-21 16:44 ` Andrii Nakryiko
2020-08-21 17:46 ` Yonghong Song
2020-08-20 22:49 ` [PATCH bpf-next v2 2/3] bpf: implement link_query callbacks in map element iterators Yonghong Song
2020-08-21 6:33 ` Andrii Nakryiko
2020-08-21 6:44 ` Yonghong Song
2020-08-20 22:49 ` [PATCH bpf-next v2 3/3] bpftool: implement link_query for bpf iterators Yonghong Song
2020-08-21 6:35 ` Andrii Nakryiko
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=20200820224917.483062-1-yhs@fb.com \
--to=yhs@fb.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=kernel-team@fb.com \
--cc=netdev@vger.kernel.org \
/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).