Re: [PATCH bpf-next v3 16/21] tools/libbpf: add bpf_iter support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 6, 2020 at 10:42 PM Yonghong Song <yhs@xxxxxx> wrote:
>
> Two new libbpf APIs are added to support bpf_iter:
>   - bpf_program__attach_iter
>     Given a bpf program and additional parameters, which is
>     none now, returns a bpf_link.
>   - bpf_iter_create
>     syscall level API to create a bpf iterator.
>
> The macro BPF_SEQ_PRINTF are also introduced. The format
> looks like:
>   BPF_SEQ_PRINTF(seq, "task id %d\n", pid);
>
> This macro can help bpf program writers with
> nicer bpf_seq_printf syntax similar to the kernel one.
>
> Signed-off-by: Yonghong Song <yhs@xxxxxx>
> ---

Looks great!

Acked-by: Andrii Nakryiko <andriin@xxxxxx>

>  tools/lib/bpf/bpf.c         | 10 +++++++
>  tools/lib/bpf/bpf.h         |  2 ++
>  tools/lib/bpf/bpf_tracing.h | 16 ++++++++++++
>  tools/lib/bpf/libbpf.c      | 52 +++++++++++++++++++++++++++++++++++++
>  tools/lib/bpf/libbpf.h      |  9 +++++++
>  tools/lib/bpf/libbpf.map    |  2 ++
>  6 files changed, 91 insertions(+)
>

[...]



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux