netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Borkmann <daniel@iogearbox.net>
To: Andrii Nakryiko <andriin@fb.com>
Cc: bpf@vger.kernel.org, netdev@vger.kernel.org, ast@fb.com,
	andrii.nakryiko@gmail.com, kernel-team@fb.com
Subject: Re: [PATCH bpf-next 2/3] libbpf/tools: add runqslower tool to libbpf
Date: Thu, 19 Dec 2019 16:41:37 +0100	[thread overview]
Message-ID: <20191219154137.GB4198@linux-9.fritz.box> (raw)
In-Reply-To: <20191219070659.424273-3-andriin@fb.com>

On Wed, Dec 18, 2019 at 11:06:57PM -0800, Andrii Nakryiko wrote:
> Convert one of BCC tools (runqslower [0]) to BPF CO-RE + libbpf. It matches
> its BCC-based counterpart 1-to-1, supporting all the same parameters and
> functionality.
> 
> runqslower tool utilizes BPF skeleton, auto-generated from BPF object file,
> as well as memory-mapped interface to global (read-only, in this case) data.
> Its makefile also ensures auto-generation of "relocatable" vmlinux.h, which is
> necessary for BTF-typed raw tracepoints with direct memory access.
> 
>   [0] https://github.com/iovisor/bcc/blob/11bf5d02c895df9646c117c713082eb192825293/tools/runqslower.py
> 
> Signed-off-by: Andrii Nakryiko <andriin@fb.com>
> ---
>  tools/lib/bpf/tools/runqslower/.gitignore     |   2 +
>  tools/lib/bpf/tools/runqslower/Makefile       |  60 ++++++
>  .../lib/bpf/tools/runqslower/runqslower.bpf.c | 101 ++++++++++
>  tools/lib/bpf/tools/runqslower/runqslower.c   | 187 ++++++++++++++++++
>  tools/lib/bpf/tools/runqslower/runqslower.h   |  13 ++

tools/lib/bpf/tools/ is rather weird, please add to tools/bpf/ which is the
more appropriate place we have for small tools. Could also live directly in
there, e.g. tools/bpf/runqslower.{c,h,bpf.c} and then built/run from selftests,
but under libbpf directly is too odd.

Thanks,
Daniel

  reply	other threads:[~2019-12-19 15:41 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-19  7:06 [PATCH bpf-next 0/3] Implement runqslower BCC tool with BPF CO-RE Andrii Nakryiko
2019-12-19  7:06 ` [PATCH bpf-next 1/3] bpftool: add extra CO-RE mode to btf dump command Andrii Nakryiko
2019-12-19 17:06   ` Alexei Starovoitov
2019-12-19 21:07     ` Andrii Nakryiko
2019-12-19 22:04       ` Alexei Starovoitov
2019-12-20 17:40         ` Andrii Nakryiko
2019-12-21  3:21           ` Alexei Starovoitov
2019-12-21  5:40             ` Andrii Nakryiko
2019-12-19  7:06 ` [PATCH bpf-next 2/3] libbpf/tools: add runqslower tool to libbpf Andrii Nakryiko
2019-12-19 15:41   ` Daniel Borkmann [this message]
2019-12-19 21:14     ` Andrii Nakryiko
2019-12-19 22:04       ` Alexei Starovoitov
2019-12-19 18:13   ` Yonghong Song
2019-12-19 21:16     ` Andrii Nakryiko
2019-12-19  7:06 ` [PATCH bpf-next 3/3] selftests/bpf: build runqslower from selftests Andrii Nakryiko

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=20191219154137.GB4198@linux-9.fritz.box \
    --to=daniel@iogearbox.net \
    --cc=andrii.nakryiko@gmail.com \
    --cc=andriin@fb.com \
    --cc=ast@fb.com \
    --cc=bpf@vger.kernel.org \
    --cc=kernel-team@fb.com \
    --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).