From: Christophe Fontaine <cfontain@redhat.com>
To: dev@dpdk.org
Cc: Christophe Fontaine <cfontain@redhat.com>,
Wathsala Vithanage <wathsala.vithanage@arm.com>,
Konstantin Ananyev <konstantin.ananyev@huawei.com>,
Marat Khalili <marat.khalili@huawei.com>
Subject: [PATCH v2 1/2] bpf/arm64: fix offset type to allow a negative jump
Date: Thu, 19 Mar 2026 12:44:08 +0100 [thread overview]
Message-ID: <20260319114500.9757-2-cfontain@redhat.com> (raw)
In-Reply-To: <20260319114500.9757-1-cfontain@redhat.com>
The epilogue code can be before the call to
'emit_return_zero_if_src_zero', but the code only supported a
jump forward.
Fix the type of jump_to_epilogue from unsigned to signed,
to be able to jump backward.
Signed-off-by: Christophe Fontaine <cfontain@redhat.com>
---
lib/bpf/bpf_jit_arm64.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/bpf/bpf_jit_arm64.c b/lib/bpf/bpf_jit_arm64.c
index a04ef33a9c..099822e9f1 100644
--- a/lib/bpf/bpf_jit_arm64.c
+++ b/lib/bpf/bpf_jit_arm64.c
@@ -957,7 +957,7 @@ static void
emit_return_zero_if_src_zero(struct a64_jit_ctx *ctx, bool is64, uint8_t src)
{
uint8_t r0 = ebpf_to_a64_reg(ctx, EBPF_REG_0);
- uint16_t jump_to_epilogue;
+ int32_t jump_to_epilogue;
emit_cbnz(ctx, is64, src, 3);
emit_mov_imm(ctx, is64, r0, 0);
--
2.53.0
next prev parent reply other threads:[~2026-03-19 11:45 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-10 12:20 [PATCH] bpf/arm64: support packet data load instructions Christophe Fontaine
2026-03-17 9:07 ` David Marchand
2026-03-18 11:59 ` Marat Khalili
2026-03-18 12:54 ` Morten Brørup
2026-03-18 13:07 ` Marat Khalili
2026-03-18 13:39 ` Morten Brørup
2026-03-18 15:34 ` Christophe Fontaine
2026-03-18 16:16 ` Marat Khalili
2026-03-18 16:37 ` Morten Brørup
2026-03-18 16:43 ` Marat Khalili
2026-03-18 18:10 ` Konstantin Ananyev
2026-03-19 9:20 ` Morten Brørup
2026-03-18 23:13 ` Stephen Hemminger
2026-03-19 11:44 ` [PATCH v2 0/2] " Christophe Fontaine
2026-03-19 11:44 ` Christophe Fontaine [this message]
2026-03-19 11:44 ` [PATCH v2 2/2] " Christophe Fontaine
2026-03-23 8:15 ` Christophe Fontaine
2026-03-23 9:26 ` Marat Khalili
2026-04-09 22:11 ` Wathsala Vithanage
2026-05-13 20:56 ` Christophe Fontaine
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=20260319114500.9757-2-cfontain@redhat.com \
--to=cfontain@redhat.com \
--cc=dev@dpdk.org \
--cc=konstantin.ananyev@huawei.com \
--cc=marat.khalili@huawei.com \
--cc=wathsala.vithanage@arm.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.