diff options
author | Alexei Starovoitov <ast@kernel.org> | 2020-08-21 14:01:39 -0700 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2020-08-21 14:15:42 -0700 |
commit | ad8edd0d76d0dad65868d9aaa6e3e9ed50199b29 (patch) | |
tree | c46a23fc3d9d58a4007e65db5f4502b0c6d10a1a /net/core/bpf_sk_storage.c | |
parent | 149cb3395504736485df1b93133e710dcf215c56 (diff) | |
parent | e60495eafdba24a466a6ae62da86245a958954bc (diff) | |
download | linux-ad8edd0d76d0dad65868d9aaa6e3e9ed50199b29.tar.gz linux-ad8edd0d76d0dad65868d9aaa6e3e9ed50199b29.tar.bz2 linux-ad8edd0d76d0dad65868d9aaa6e3e9ed50199b29.zip |
Merge branch 'link_query-bpf_iter'
Yonghong Song says:
====================
"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:
v3 -> v4:
. return target specific link_info even if target_name buffer
is empty. (Andrii)
v2 -> v3:
. remove extra '\t' when fdinfo prints map_id to make parsing
consistent. (Andrii)
v1 -> v2:
. fix checkpatch.pl warnings. (Jakub)
====================
Acked-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'net/core/bpf_sk_storage.c')
-rw-r--r-- | net/core/bpf_sk_storage.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/core/bpf_sk_storage.c b/net/core/bpf_sk_storage.c index b988f48153a4..281200dc0a01 100644 --- a/net/core/bpf_sk_storage.c +++ b/net/core/bpf_sk_storage.c @@ -1437,6 +1437,8 @@ static struct bpf_iter_reg bpf_sk_storage_map_reg_info = { .target = "bpf_sk_storage_map", .attach_target = bpf_iter_attach_map, .detach_target = bpf_iter_detach_map, + .show_fdinfo = bpf_iter_map_show_fdinfo, + .fill_link_info = bpf_iter_map_fill_link_info, .ctx_arg_info_size = 2, .ctx_arg_info = { { offsetof(struct bpf_iter__bpf_sk_storage_map, sk), |