netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yonghong Song <yhs@fb.com>
To: Andrii Nakryiko <andriin@fb.com>,
	"andrii.nakryiko@gmail.com" <andrii.nakryiko@gmail.com>,
	"bpf@vger.kernel.org" <bpf@vger.kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	Alexei Starovoitov <ast@fb.com>,
	"daniel@iogearbox.net" <daniel@iogearbox.net>,
	Kernel Team <Kernel-team@fb.com>
Subject: Re: [PATCH v6 bpf-next 0/5] libbpf: add perf buffer abstraction and API
Date: Sat, 6 Jul 2019 17:24:16 +0000	[thread overview]
Message-ID: <9a79b554-d0fb-5b27-4af3-23ba33d96bdd@fb.com> (raw)
In-Reply-To: <20190706060220.1801632-1-andriin@fb.com>



On 7/5/19 11:02 PM, Andrii Nakryiko wrote:
> This patchset adds a high-level API for setting up and polling perf buffers
> associated with BPF_MAP_TYPE_PERF_EVENT_ARRAY map. Details of APIs are
> described in corresponding commit.
> 
> Patch #1 adds a set of APIs to set up and work with perf buffer.
> Patch #2 enhances libbpf to support auto-setting PERF_EVENT_ARRAY map size.
> Patch #3 adds test.
> Patch #4 converts bpftool map event_pipe to new API.
> Patch #5 updates README to mention perf_buffer_ prefix.
> 
> v5->v6:
> - fix C99 for loop variable initialization usage (Yonghong);
> v4->v5:
> - initialize perf_buffer_raw_opts in bpftool map event_pipe (Jakub);
> - add perf_buffer_ to README;
> v3->v4:
> - fixed bpftool event_pipe cmd error handling (Jakub);
> v2->v3:
> - added perf_buffer__new_raw for more low-level control;
> - converted bpftool map event_pipe to new API (Daniel);
> - fixed bug with error handling in create_maps (Song);
> v1->v2:
> - add auto-sizing of PERF_EVENT_ARRAY maps;
> 
> Andrii Nakryiko (5):
>    libbpf: add perf buffer API
>    libbpf: auto-set PERF_EVENT_ARRAY size to number of CPUs
>    selftests/bpf: test perf buffer API
>    tools/bpftool: switch map event_pipe to libbpf's perf_buffer
>    libbpf: add perf_buffer_ prefix to README
> 
>   tools/bpf/bpftool/map_perf_ring.c             | 201 +++------
>   tools/lib/bpf/README.rst                      |   3 +-
>   tools/lib/bpf/libbpf.c                        | 397 +++++++++++++++++-
>   tools/lib/bpf/libbpf.h                        |  49 +++
>   tools/lib/bpf/libbpf.map                      |   4 +
>   .../selftests/bpf/prog_tests/perf_buffer.c    |  94 +++++
>   .../selftests/bpf/progs/test_perf_buffer.c    |  25 ++
>   7 files changed, 628 insertions(+), 145 deletions(-)
>   create mode 100644 tools/testing/selftests/bpf/prog_tests/perf_buffer.c
>   create mode 100644 tools/testing/selftests/bpf/progs/test_perf_buffer.c

With a minor comment on patch 3/5 in a different thread,
LGTM. Ack for the whole series.
Acked-by: Yonghong Song <yhs@fb.com>


      parent reply	other threads:[~2019-07-06 17:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-06  6:02 [PATCH v6 bpf-next 0/5] libbpf: add perf buffer abstraction and API Andrii Nakryiko
2019-07-06  6:02 ` [PATCH v6 bpf-next 1/5] libbpf: add perf buffer API Andrii Nakryiko
2019-07-06  6:02 ` [PATCH v6 bpf-next 2/5] libbpf: auto-set PERF_EVENT_ARRAY size to number of CPUs Andrii Nakryiko
2019-07-06  6:02 ` [PATCH v6 bpf-next 3/5] selftests/bpf: test perf buffer API Andrii Nakryiko
2019-07-06 17:18   ` Yonghong Song
2019-07-06 17:44     ` Andrii Nakryiko
2019-07-06  6:02 ` [PATCH v6 bpf-next 4/5] tools/bpftool: switch map event_pipe to libbpf's perf_buffer Andrii Nakryiko
2019-07-06  6:02 ` [PATCH v6 bpf-next 5/5] libbpf: add perf_buffer_ prefix to README Andrii Nakryiko
2019-07-06 17:24 ` Yonghong Song [this message]

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=9a79b554-d0fb-5b27-4af3-23ba33d96bdd@fb.com \
    --to=yhs@fb.com \
    --cc=Kernel-team@fb.com \
    --cc=andrii.nakryiko@gmail.com \
    --cc=andriin@fb.com \
    --cc=ast@fb.com \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --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).