From: David Vernet <void@manifault.com>
To: bpf@vger.kernel.org
Cc: ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org,
martin.lau@linux.dev, song@kernel.org, yhs@meta.com,
john.fastabend@gmail.com, kpsingh@kernel.org, sdf@google.com,
haoluo@google.com, jolsa@kernel.org,
linux-kernel@vger.kernel.org, kernel-team@meta.com,
tj@kernel.org
Subject: [PATCH bpf-next v2 0/4] Enable struct_ops programs to be sleepable
Date: Tue, 24 Jan 2023 10:07:58 -0600 [thread overview]
Message-ID: <20230124160802.1122124-1-void@manifault.com> (raw)
This is part 2 of https://lore.kernel.org/bpf/20230123232228.646563-1-void@manifault.com/
Changelog:
----------
v1 -> v2:
- Add support for specifying sleepable struct_ops programs with
struct_ops.s in libbpf (Alexei).
- Move failure test case into new dummy_st_ops_fail.c prog file.
- Update test_dummy_sleepable() to use struct_ops.s instead of manually
setting prog flags. Also remove open_load_skel() helper which is no
longer needed.
- Fix verifier tests to expect new sleepable prog failure message.
David Vernet (4):
bpf: Allow BPF_PROG_TYPE_STRUCT_OPS programs to be sleepable
libbpf: Support sleepable struct_ops.s section
bpf: Pass const struct bpf_prog * to .check_member
bpf/selftests: Verify struct_ops prog sleepable behavior
include/linux/bpf.h | 4 +-
kernel/bpf/verifier.c | 7 ++-
net/bpf/bpf_dummy_struct_ops.c | 18 ++++++
net/bpf/test_run.c | 6 ++
net/ipv4/bpf_tcp_ca.c | 3 +-
tools/lib/bpf/libbpf.c | 1 +
.../selftests/bpf/prog_tests/dummy_st_ops.c | 56 ++++++++++++++-----
.../selftests/bpf/progs/dummy_st_ops_common.h | 20 +++++++
.../selftests/bpf/progs/dummy_st_ops_fail.c | 41 ++++++++++++++
...{dummy_st_ops.c => dummy_st_ops_success.c} | 18 +++---
10 files changed, 145 insertions(+), 29 deletions(-)
create mode 100644 tools/testing/selftests/bpf/progs/dummy_st_ops_common.h
create mode 100644 tools/testing/selftests/bpf/progs/dummy_st_ops_fail.c
rename tools/testing/selftests/bpf/progs/{dummy_st_ops.c => dummy_st_ops_success.c} (75%)
--
2.39.0
next reply other threads:[~2023-01-24 16:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-24 16:07 David Vernet [this message]
2023-01-24 16:07 ` [PATCH bpf-next v2 1/4] bpf: Allow BPF_PROG_TYPE_STRUCT_OPS programs to be sleepable David Vernet
2023-01-24 16:08 ` [PATCH bpf-next v2 2/4] libbpf: Support sleepable struct_ops.s section David Vernet
2023-01-24 16:08 ` [PATCH bpf-next v2 3/4] bpf: Pass const struct bpf_prog * to .check_member David Vernet
2023-01-24 16:08 ` [PATCH bpf-next v2 4/4] bpf/selftests: Verify struct_ops prog sleepable behavior David Vernet
2023-01-24 19:52 ` Martin KaFai Lau
2023-01-24 21:11 ` David Vernet
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=20230124160802.1122124-1-void@manifault.com \
--to=void@manifault.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=haoluo@google.com \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kernel-team@meta.com \
--cc=kpsingh@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.lau@linux.dev \
--cc=sdf@google.com \
--cc=song@kernel.org \
--cc=tj@kernel.org \
--cc=yhs@meta.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox