[PATCH bpf-next 0/2] bpf, mips: Add JIT support for v4 instructions

From: Johan Almbladh

Date: Fri Sep 25 2026 - 19:20:46 EST


The MIPS eBPF JIT currently lacks support for several BPF instructions
introduced by later revisions of the BPF ISA. This series adds JIT
support for unconditional BSWAP and JMP32_JA. Together with the recent
work of Nicholas Dudar, this completes support for the BPF v4 ISA in
the JIT.

The series was applied with Nicholas Dudar's patch for MEMSX added on
top ("bpf, mips: Add BPF_MEMSX support to the JITs"). The JIT was then
tested on QEMU MIPS targets, with the following results.

MIPS32r1/r2/r6 big and little endian:
test_bpf: Summary: 1062 PASSED, 0 FAILED, [1050/1050 JIT'ed]

MIPS64r1/r2/r6 big and little endian:
test_bpf: Summary: 1061 PASSED, 0 FAILED, [1049/1049 JIT'ed]

All JIT-eligible tests were JITed and all tests pass on all 12 QEMU
MIPS targets. No physical MIPS hardware was used in the tests.

Johan Almbladh (2):
bpf, mips: Add JIT support for unconditional BSWAP
bpf, mips: Add JIT support for JMP32_JA

arch/mips/net/bpf_jit_comp.c | 2 +-
arch/mips/net/bpf_jit_comp.h | 2 +-
arch/mips/net/bpf_jit_comp32.c | 11 +++++++++++
arch/mips/net/bpf_jit_comp64.c | 11 +++++++++++
4 files changed, 24 insertions(+), 2 deletions(-)


base-commit: 6ac134ec930642d5b574b63a72a0e999c2470c64
--
2.43.0