From: Ilya Leoshkevich <iii@linux.ibm.com>
To: Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Andrii Nakryiko <andrii@kernel.org>
Cc: bpf@vger.kernel.org, Heiko Carstens <hca@linux.ibm.com>,
Vasily Gorbik <gor@linux.ibm.com>,
Alexander Gordeev <agordeev@linux.ibm.com>,
Ilya Leoshkevich <iii@linux.ibm.com>
Subject: [PATCH bpf-next v2 06/10] s390/bpf: Implement unconditional byte swap
Date: Tue, 19 Sep 2023 12:09:08 +0200 [thread overview]
Message-ID: <20230919101336.2223655-7-iii@linux.ibm.com> (raw)
In-Reply-To: <20230919101336.2223655-1-iii@linux.ibm.com>
Implement the cpuv4 unconditional byte swap, which is encoded as
BPF_ALU64 | BPF_END | BPF_FROM_LE. Since s390x is big-endian, it's
the same as the existing BPF_ALU | BPF_END | BPF_FROM_LE.
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
---
arch/s390/net/bpf_jit_comp.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/s390/net/bpf_jit_comp.c b/arch/s390/net/bpf_jit_comp.c
index e00e7cda298f..ea8ae2163109 100644
--- a/arch/s390/net/bpf_jit_comp.c
+++ b/arch/s390/net/bpf_jit_comp.c
@@ -1253,6 +1253,7 @@ static noinline int bpf_jit_insn(struct bpf_jit *jit, struct bpf_prog *fp,
}
break;
case BPF_ALU | BPF_END | BPF_FROM_LE:
+ case BPF_ALU64 | BPF_END | BPF_FROM_LE:
switch (imm) {
case 16: /* dst = (u16) cpu_to_le16(dst) */
/* lrvr %dst,%dst */
--
2.41.0
next prev parent reply other threads:[~2023-09-19 10:14 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-19 10:09 [PATCH bpf-next v2 00/10] Implement cpuv4 support for s390x Ilya Leoshkevich
2023-09-19 10:09 ` [PATCH bpf-next v2 01/10] bpf: Disable zero-extension for BPF_MEMSX Ilya Leoshkevich
2023-09-21 12:35 ` Puranjay Mohan
2023-09-19 10:09 ` [PATCH bpf-next v2 02/10] selftests/bpf: Unmount the cgroup2 work directory Ilya Leoshkevich
2023-09-19 10:09 ` [PATCH bpf-next v2 03/10] selftests/bpf: Add big-endian support to the ldsx test Ilya Leoshkevich
2023-09-19 10:09 ` [PATCH bpf-next v2 04/10] s390/bpf: Implement BPF_MOV | BPF_X with sign-extension Ilya Leoshkevich
2023-09-19 10:09 ` [PATCH bpf-next v2 05/10] s390/bpf: Implement BPF_MEMSX Ilya Leoshkevich
2023-09-19 10:09 ` Ilya Leoshkevich [this message]
2023-09-19 10:09 ` [PATCH bpf-next v2 07/10] s390/bpf: Implement unconditional jump with 32-bit offset Ilya Leoshkevich
2023-09-19 10:09 ` [PATCH bpf-next v2 08/10] s390/bpf: Implement signed division Ilya Leoshkevich
2023-09-19 10:09 ` [PATCH bpf-next v2 09/10] selftests/bpf: Enable the cpuv4 tests for s390x Ilya Leoshkevich
2023-09-19 10:09 ` [PATCH bpf-next v2 10/10] selftests/bpf: Trim DENYLIST.s390x Ilya Leoshkevich
2023-09-21 21:30 ` [PATCH bpf-next v2 00/10] Implement cpuv4 support for s390x patchwork-bot+netdevbpf
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=20230919101336.2223655-7-iii@linux.ibm.com \
--to=iii@linux.ibm.com \
--cc=agordeev@linux.ibm.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.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