Re: [PATCH bpf-next 6/9] samples: bpf: refactor test_overhead program with libbpf

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

 



On Tue, Nov 17, 2020 at 6:57 AM Daniel T. Lee <danieltimlee@xxxxxxxxx> wrote:
>
> This commit refactors the existing program with libbpf bpf loader.
> Since the kprobe, tracepoint and raw_tracepoint bpf program can be
> attached with single bpf_program__attach() interface, so the
> corresponding function of libbpf is used here.
>
> Rather than specifying the number of cpus inside the code, this commit
> uses the number of available cpus with _SC_NPROCESSORS_ONLN.
>
> Signed-off-by: Daniel T. Lee <danieltimlee@xxxxxxxxx>
> ---
>  samples/bpf/Makefile             |  2 +-
>  samples/bpf/test_overhead_user.c | 82 +++++++++++++++++++++++---------
>  2 files changed, 60 insertions(+), 24 deletions(-)
>

LGTM.

Acked-by: Andrii Nakryiko <andrii@xxxxxxxxxx>

[...]



[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