netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrii Nakryiko <andriin@fb.com>
To: <bpf@vger.kernel.org>, <netdev@vger.kernel.org>, <ast@fb.com>,
	<daniel@iogearbox.net>
Cc: <andrii.nakryiko@gmail.com>, <kernel-team@fb.com>,
	Andrii Nakryiko <andriin@fb.com>
Subject: [PATCH v2 bpf-next 0/6] Implement runqslower BCC tool with BPF CO-RE
Date: Sun, 12 Jan 2020 23:31:37 -0800	[thread overview]
Message-ID: <20200113073143.1779940-1-andriin@fb.com> (raw)

Based on recent BPF CO-RE, tp_btf, and BPF skeleton changes, re-implement
BCC-based runqslower tool as a portable pre-compiled BPF CO-RE-based tool.
Make sure it's built as part of selftests to ensure it doesn't bit rot.

As part of this patch set, augment `format c` output of `bpftool btf dump`
sub-command with applying `preserve_access_index` attribute to all structs and
unions. This makes all such structs and unions automatically relocatable under
BPF CO-RE, which improves user experience of writing TRACING programs with
direct kernel memory read access.

Also, further clean up selftest/bpf Makefile output and make it conforming to
libbpf and bpftool succinct output format.

v1->v2:
- build in-tree bpftool for runqslower (Yonghong);
- drop `format core` and augment `format c` instead (Alexei);
- move runqslower under tools/bpf (Daniel).

Andrii Nakryiko (6):
  tools: sync uapi/linux/if_link.h
  libbpf: clean up bpf_helper_defs.h generation output
  selftests/bpf: conform selftests/bpf Makefile output to libbpf and
    bpftool
  bpftool: apply preserve_access_index attribute to all types in BTF
    dump
  tools/bpf: add runqslower tool to tools/bpf
  selftests/bpf: build runqslower from selftests

 scripts/bpf_helpers_doc.py            |   2 -
 tools/bpf/Makefile                    |  20 ++-
 tools/bpf/bpftool/btf.c               |   8 ++
 tools/bpf/runqslower/.gitignore       |   1 +
 tools/bpf/runqslower/Makefile         |  80 +++++++++++
 tools/bpf/runqslower/runqslower.bpf.c | 100 ++++++++++++++
 tools/bpf/runqslower/runqslower.c     | 187 ++++++++++++++++++++++++++
 tools/bpf/runqslower/runqslower.h     |  13 ++
 tools/include/uapi/linux/if_link.h    |   1 +
 tools/lib/bpf/Makefile                |   2 +-
 tools/testing/selftests/bpf/Makefile  |  54 ++++----
 11 files changed, 437 insertions(+), 31 deletions(-)
 create mode 100644 tools/bpf/runqslower/.gitignore
 create mode 100644 tools/bpf/runqslower/Makefile
 create mode 100644 tools/bpf/runqslower/runqslower.bpf.c
 create mode 100644 tools/bpf/runqslower/runqslower.c
 create mode 100644 tools/bpf/runqslower/runqslower.h

-- 
2.17.1


             reply	other threads:[~2020-01-13  7:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-13  7:31 Andrii Nakryiko [this message]
2020-01-13  7:31 ` [PATCH v2 bpf-next 1/6] tools: sync uapi/linux/if_link.h Andrii Nakryiko
2020-01-13  7:31 ` [PATCH v2 bpf-next 2/6] libbpf: clean up bpf_helper_defs.h generation output Andrii Nakryiko
2020-01-13  7:31 ` [PATCH v2 bpf-next 3/6] selftests/bpf: conform selftests/bpf Makefile output to libbpf and bpftool Andrii Nakryiko
2020-01-13  7:31 ` [PATCH v2 bpf-next 4/6] bpftool: apply preserve_access_index attribute to all types in BTF dump Andrii Nakryiko
2020-01-13  7:31 ` [PATCH v2 bpf-next 5/6] tools/bpf: add runqslower tool to tools/bpf Andrii Nakryiko
2020-01-14 13:22   ` Jiri Olsa
2020-01-14 17:25     ` Alexei Starovoitov
2020-01-14 18:42       ` Jiri Olsa
2020-01-13  7:31 ` [PATCH v2 bpf-next 6/6] selftests/bpf: build runqslower from selftests Andrii Nakryiko
2020-01-14  2:15 ` [PATCH v2 bpf-next 0/6] Implement runqslower BCC tool with BPF CO-RE Alexei Starovoitov

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=20200113073143.1779940-1-andriin@fb.com \
    --to=andriin@fb.com \
    --cc=andrii.nakryiko@gmail.com \
    --cc=ast@fb.com \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --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).