Skip to content

RV64 BPF JIT Optimizations

Luke Nelson bpf linux-riscv lkml netdev 1 version Applied

Status from this message: Applied, thanks everyone!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 2 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/4bpf, riscv: Enable missing verifier_zext optimizations on RV64arch/riscv/net/bpf_jit_comp64.c+4 -40 replies
2/4bpf, riscv: Optimize FROM_LE using verifier_zext on RV64arch/riscv/net/bpf_jit_comp64.c+14 -60 replies
3/4bpf, riscv: Optimize BPF_JMP BPF_K when imm == 0 on RV64arch/riscv/net/bpf_jit_comp64.c+10 -50 replies
4/4bpf, riscv: Optimize BPF_JSET BPF_K using andi on RV64arch/riscv/net/bpf_jit_comp64.c+19 -80 replies

Reviews trailers per patch

None of the 4 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchBjörn Töpel
SeriesR-b A-b
1/4
2/4
3/4
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH bpf-next 0/4] RV64 BPF JIT Optimizations

This patch series introduces a set of optimizations to the BPF JIT on RV64. The optimizations are related to the verifier zero-extension optimization and BPF_JMP BPF_K.

We tested the optimizations on a QEMU riscv64 virt machine, using lib/test_bpf and test_verifier, and formally verified their correctness using Serval.

Luke Nelson (4):
bpf, riscv: Enable missing verifier_zext optimizations on RV64 bpf, riscv: Optimize FROM_LE using verifier_zext on RV64 bpf, riscv: Optimize BPF_JMP BPF_K when imm == 0 on RV64 bpf, riscv: Optimize BPF_JSET BPF_K using andi on RV64

 arch/riscv/net/bpf_jit_comp64.c | 64 ++++++++++++++++++++++-----------
 1 file changed, 44 insertions(+), 20 deletions(-)
Cc Xi Wang <[email protected]>
Signature · 1 line
2.17.1