From: "Daniel T. Lee" <danieltimlee@gmail.com>
To: Daniel Borkmann <daniel@iogearbox.net>,
Alexei Starovoitov <ast@kernel.org>
Cc: netdev@vger.kernel.org, bpf@vger.kernel.org,
Andrii Nakryiko <andrii.nakryiko@gmail.com>,
John Fastabend <john.fastabend@gmail.com>
Subject: [PATCH bpf-next 0/3] samples: bpf: refactor kprobe tracing progs with libbpf
Date: Tue, 12 May 2020 23:43:36 +0900 [thread overview]
Message-ID: <20200512144339.1617069-1-danieltimlee@gmail.com> (raw)
Currently, the kprobe BPF program attachment method for bpf_load is
pretty outdated. The implementation of bpf_load "directly" controls and
manages(create, delete) the kprobe events of DEBUGFS. On the other hand,
using using the libbpf automatically manages the kprobe event.
(under bpf_link interface)
This patchset refactors kprobe tracing programs with using libbpf API
for loading bpf program instead of previous bpf_load implementation.
Daniel T. Lee (3):
samples: bpf: refactor kprobe tracing user progs with libbpf
samples: bpf: refactor tail call user progs with libbpf
samples: bpf: refactor kprobe, tail call kern progs map definition
samples/bpf/Makefile | 16 ++++----
samples/bpf/sampleip_kern.c | 12 +++---
samples/bpf/sockex3_kern.c | 36 ++++++++---------
samples/bpf/sockex3_user.c | 66 ++++++++++++++++++++++----------
samples/bpf/trace_event_kern.c | 24 ++++++------
samples/bpf/tracex1_user.c | 41 ++++++++++++++++----
samples/bpf/tracex2_kern.c | 32 +++++++++-------
samples/bpf/tracex2_user.c | 55 +++++++++++++++++++++-----
samples/bpf/tracex3_kern.c | 24 ++++++------
samples/bpf/tracex3_user.c | 65 +++++++++++++++++++++++--------
samples/bpf/tracex4_kern.c | 12 +++---
samples/bpf/tracex4_user.c | 55 ++++++++++++++++++++------
samples/bpf/tracex5_kern.c | 14 +++----
samples/bpf/tracex5_user.c | 70 ++++++++++++++++++++++++++++++----
samples/bpf/tracex6_kern.c | 38 +++++++++---------
samples/bpf/tracex6_user.c | 53 ++++++++++++++++++++++---
samples/bpf/tracex7_user.c | 43 +++++++++++++++++----
17 files changed, 471 insertions(+), 185 deletions(-)
--
2.25.1
next reply other threads:[~2020-05-12 14:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-12 14:43 Daniel T. Lee [this message]
2020-05-12 14:43 ` [PATCH bpf-next 1/3] samples: bpf: refactor kprobe tracing user progs with libbpf Daniel T. Lee
2020-05-13 1:39 ` Yonghong Song
2020-05-13 6:51 ` Daniel T. Lee
2020-05-13 15:28 ` Yonghong Song
2020-05-15 8:21 ` Daniel T. Lee
2020-05-12 14:43 ` [PATCH bpf-next 2/3] samples: bpf: refactor tail call " Daniel T. Lee
2020-05-12 14:43 ` [PATCH bpf-next 3/3] samples: bpf: refactor kprobe, tail call kern progs map definition Daniel T. Lee
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=20200512144339.1617069-1-danieltimlee@gmail.com \
--to=danieltimlee@gmail.com \
--cc=andrii.nakryiko@gmail.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=john.fastabend@gmail.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).