From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
Marat Khalili <marat.khalili@huawei.com>,
Konstantin Ananyev <konstantin.ananyev@huawei.com>
Subject: [PATCH v8 08/10] test/bpf: check that JIT was generated
Date: Thu, 27 Aug 2026 14:41:47 -0700 [thread overview]
Message-ID: <20260827214236.1415047-9-stephen@networkplumber.org> (raw)
In-Reply-To: <20260827214236.1415047-1-stephen@networkplumber.org>
Avoid silently ignoring JIT failures. The test cases should
all succeed JIT compilation; if not it is a bug in the JIT
implementation and should be reported.
Introduce a configuration setting RTE_BPF_JIT_SUPPORTED
which is cleaner than using an ARCH specific #ifdef.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Marat Khalili <marat.khalili@huawei.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
---
app/test/test_bpf.c | 8 ++++++++
lib/bpf/meson.build | 2 ++
2 files changed, 10 insertions(+)
diff --git a/app/test/test_bpf.c b/app/test/test_bpf.c
index 413d47357f..184438a549 100644
--- a/app/test/test_bpf.c
+++ b/app/test/test_bpf.c
@@ -3748,6 +3748,14 @@ run_test(const struct bpf_test *tst)
rv, strerror(rv));
}
}
+#ifdef RTE_BPF_JIT_SUPPORTED
+ else {
+ /* a JIT backend exists for this arch, so it must compile */
+ printf("%s@%d: %s: no JIT code generated;\n",
+ __func__, __LINE__, tst->name);
+ ret = -1;
+ }
+#endif
rte_bpf_destroy(bpf);
return ret;
diff --git a/lib/bpf/meson.build b/lib/bpf/meson.build
index b74a5c2321..74cff1eaed 100644
--- a/lib/bpf/meson.build
+++ b/lib/bpf/meson.build
@@ -29,8 +29,10 @@ sources = files(
)
if arch_subdir == 'x86' and dpdk_conf.get('RTE_ARCH_64')
+ dpdk_conf.set('RTE_BPF_JIT_SUPPORTED', 1)
sources += files('bpf_jit_x86.c')
elif dpdk_conf.has('RTE_ARCH_ARM64')
+ dpdk_conf.set('RTE_BPF_JIT_SUPPORTED', 1)
sources += files('bpf_jit_arm64.c')
endif
--
2.53.0
next prev parent reply other threads:[~2026-08-27 21:43 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <0260608203322.1116296-1-stephen@networkplumber.org>
2026-07-22 16:05 ` [PATCH v7 00/10] bpf: bug fixes Stephen Hemminger
2026-07-22 16:05 ` [PATCH v7 01/10] bpf/x86: fix JIT encoding of fixed-width immediates Stephen Hemminger
2026-07-22 16:05 ` [PATCH v7 02/10] test/bpf: add JSET test with small immediate Stephen Hemminger
2026-07-22 16:05 ` [PATCH v7 03/10] bpf: mask shift count in interpreter per RFC 9669 Stephen Hemminger
2026-07-22 16:05 ` [PATCH v7 04/10] bpf/arm64: mask shift count " Stephen Hemminger
2026-07-22 16:05 ` [PATCH v7 05/10] test/bpf: add test for large shift Stephen Hemminger
2026-07-22 16:05 ` [PATCH v7 06/10] bpf/arm64: fix offset type to allow a negative jump Stephen Hemminger
2026-07-22 16:05 ` [PATCH v7 07/10] bpf/arm64: add BPF_ABS/BPF_IND packet load support Stephen Hemminger
2026-07-22 16:05 ` [PATCH v7 08/10] test/bpf: check that JIT was generated Stephen Hemminger
2026-07-22 16:05 ` [PATCH v7 09/10] test/bpf: check that bpf_convert can be JIT'd Stephen Hemminger
2026-07-22 16:05 ` [PATCH v7 10/10] bpf: fix uninitialized warning Stephen Hemminger
2026-07-23 8:12 ` Marat Khalili
2026-08-27 21:41 ` [PATCH v8 00/10] bpf: JIT and interpreter fixes Stephen Hemminger
2026-08-27 21:41 ` [PATCH v8 01/10] bpf/x86: fix JIT encoding of fixed-width immediates Stephen Hemminger
2026-08-27 21:41 ` [PATCH v8 02/10] test/bpf: add JSET test with small immediate Stephen Hemminger
2026-08-27 21:41 ` [PATCH v8 03/10] bpf: mask shift count in interpreter per RFC 9669 Stephen Hemminger
2026-08-27 21:41 ` [PATCH v8 04/10] bpf/arm64: mask shift count " Stephen Hemminger
2026-08-27 21:41 ` [PATCH v8 05/10] test/bpf: add test for large shift Stephen Hemminger
2026-08-27 21:41 ` [PATCH v8 06/10] bpf/arm64: fix offset type to allow a negative jump Stephen Hemminger
2026-08-27 21:41 ` [PATCH v8 07/10] Subject: [PATCH 07/10] bpf/arm64: add BPF_ABS/BPF_IND packet load support Stephen Hemminger
2026-08-27 21:41 ` Stephen Hemminger [this message]
2026-08-27 21:41 ` [PATCH v8 09/10] test/bpf: check that bpf_convert can be JIT'd Stephen Hemminger
2026-08-27 21:41 ` [PATCH v8 10/10] bpf: fix uninitialized warning Stephen Hemminger
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=20260827214236.1415047-9-stephen@networkplumber.org \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
--cc=konstantin.ananyev@huawei.com \
--cc=marat.khalili@huawei.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