All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrii Nakryiko <andriin@fb.com>
To: <songliubraving@fb.com>, <yhs@fb.com>, <ast@fb.com>,
	<kafai@fb.com>, <netdev@vger.kernel.org>, <daniel@iogearbox.net>,
	<andrii.nakryiko@gmail.com>
Cc: Andrii Nakryiko <andriin@fb.com>
Subject: [PATCH bpf-next 0/2] tools/btf: extends libbpf APIs to work with btf w/o kernel
Date: Tue, 5 Feb 2019 11:48:54 -0800	[thread overview]
Message-ID: <20190205194856.967463-1-andriin@fb.com> (raw)

This patchset changes existing btf__new() API call to only load and initialize
struct btf, while exposing new btf__load() API to attempt to load and validate
BTF in kernel. It also adds ability to copy raw BTF data out of struct btf for
further processing by external applications.

This makes utilizing libbpf's APIs that don't require kernel facilities (e.g.,
btf_dedup) simpler and more natural from external application.

Andrii Nakryiko (2):
  btf: separate btf creation and loading
  btf: expose API to work with raw btf data

 tools/lib/bpf/btf.c      | 63 +++++++++++++++++++++++++---------------
 tools/lib/bpf/btf.h      |  3 ++
 tools/lib/bpf/libbpf.c   |  2 +-
 tools/lib/bpf/libbpf.map |  3 ++
 4 files changed, 46 insertions(+), 25 deletions(-)

-- 
2.17.1


             reply	other threads:[~2019-02-05 19:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-05 19:48 Andrii Nakryiko [this message]
2019-02-05 19:48 ` [PATCH bpf-next 1/2] btf: separate btf creation and loading Andrii Nakryiko
2019-02-05 21:25   ` Yonghong Song
2019-02-05 22:34     ` Andrii Nakryiko
2019-02-05 19:48 ` [PATCH bpf-next 2/2] btf: expose API to work with raw btf data Andrii Nakryiko
2019-02-05 22:01   ` Yonghong Song

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=20190205194856.967463-1-andriin@fb.com \
    --to=andriin@fb.com \
    --cc=andrii.nakryiko@gmail.com \
    --cc=ast@fb.com \
    --cc=daniel@iogearbox.net \
    --cc=kafai@fb.com \
    --cc=netdev@vger.kernel.org \
    --cc=songliubraving@fb.com \
    --cc=yhs@fb.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.