From: Pavel Begunkov <asml.silence@gmail.com>
To: io-uring@vger.kernel.org
Cc: axboe@kernel.dk
Subject: Re: [PATCH liburing] tests: test io_uring bpf ops
Date: Tue, 24 Feb 2026 15:00:12 +0000 [thread overview]
Message-ID: <74d70b31-2320-42df-bf44-3286105961d3@gmail.com> (raw)
In-Reply-To: <a16c8d4e58335129c0548372daa6976f84662d6b.1771940194.git.asml.silence@gmail.com>
On 2/24/26 13:37, Pavel Begunkov wrote:
> Add a BPF struct ops io_uring example issuing nop requests in a loop. It
> needs clang, llvm, bpftool, libbpf, etc. to compile so it's gated on
> passing BPF_TESTS to make. The Makefile change looks sane but maybe
> there are better ways, starting with probing all the toolchain
> availability.
>
> Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
> ---
> test/Makefile | 44 ++++++++++++++-
> test/bpf-nops.c | 99 ++++++++++++++++++++++++++++++++++
> test/bpf-progs/nops_loop.bpf.c | 99 ++++++++++++++++++++++++++++++++++
> 3 files changed, 240 insertions(+), 2 deletions(-)
> create mode 100644 test/bpf-nops.c
> create mode 100644 test/bpf-progs/nops_loop.bpf.c
>
> diff --git a/test/Makefile b/test/Makefile
> index 1bbae1cc..0a4f275a 100644
> --- a/test/Makefile
> +++ b/test/Makefile
> @@ -1,6 +1,12 @@
> prefix ?= /usr
> datadir ?= $(prefix)/share
>
> +CLANG ?= clang
> +BPFTOOL ?= bpftool
> +BPF_PROGS_DIR = bpf-progs
> +BPF_OUTPUT = output/bpf/
> +BPF_VMLINUX ?= /sys/kernel/btf/vmlinux
> +
> INSTALL=install
>
> ifneq ($(MAKECMDGOALS),clean)
> @@ -298,6 +304,17 @@ ifdef CONFIG_HAVE_CXX
> endif
> all_targets += sq-full-cpp.t
>
> +bpf_tests := bpf-nops.c
> +opt_deps :=
> +
> +ifdef BPF_TESTS
> + override CFLAGS += -I$(BPF_OUTPUT)
> + override LDFLAGS += -lbpf
> + test_srcs += $(bpf_tests)
> + opt_deps += bpf-progs
> +endif
> +
> +$(info flags $(CFLAGS))
Some garbage output slipped through, I'll resend
--
Pavel Begunkov
prev parent reply other threads:[~2026-02-24 15:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-24 13:37 [PATCH liburing] tests: test io_uring bpf ops Pavel Begunkov
2026-02-24 15:00 ` Pavel Begunkov [this message]
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=74d70b31-2320-42df-bf44-3286105961d3@gmail.com \
--to=asml.silence@gmail.com \
--cc=axboe@kernel.dk \
--cc=io-uring@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