OSDN Git Service

Merge branch 'link_query-bpf_iter'
authorAlexei Starovoitov <ast@kernel.org>
Fri, 21 Aug 2020 21:01:39 +0000 (14:01 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 21 Aug 2020 21:15:42 +0000 (14:15 -0700)
commitad8edd0d76d0dad65868d9aaa6e3e9ed50199b29
treec46a23fc3d9d58a4007e65db5f4502b0c6d10a1a
parent149cb3395504736485df1b93133e710dcf215c56
parente60495eafdba24a466a6ae62da86245a958954bc
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>