[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200508181547.24783-1-luke.r.nels@gmail.com>
Date: Fri, 8 May 2020 11:15:43 -0700
From: Luke Nelson <lukenels@...washington.edu>
To: bpf@...r.kernel.org
Cc: Luke Nelson <luke.r.nels@...il.com>, Xi Wang <xi.wang@...il.com>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Alexei Starovoitov <ast@...nel.org>,
Zi Shen Lim <zlim.lnx@...il.com>,
Martin KaFai Lau <kafai@...com>,
Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
Andrii Nakryiko <andriin@...com>,
John Fastabend <john.fastabend@...il.com>,
KP Singh <kpsingh@...omium.org>,
Mark Rutland <mark.rutland@....com>,
Alexios Zavras <alexios.zavras@...el.com>,
Marc Zyngier <maz@...nel.org>,
Ard Biesheuvel <ardb@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Christoffer Dall <christoffer.dall@...aro.org>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
netdev@...r.kernel.org, clang-built-linux@...glegroups.com
Subject: [PATCH bpf-next v2 0/3] arm64 BPF JIT Optimizations
This patch series introduces several optimizations to the arm64 BPF JIT.
The optimizations make use of arm64 immediate instructions to avoid
loading BPF immediates to temporary registers, when possible.
In the process, we discovered two bugs in the logical immediate encoding
function in arch/arm64/kernel/insn.c using Serval. The series also fixes
the two bugs before introducing the optimizations.
Tested on aarch64 QEMU virt machine using test_bpf and test_verifier.
v2:
- Cleaned up patch to insn.c.
(Marc Zyngier, Will Deacon)
Luke Nelson (3):
arm64: insn: Fix two bugs in encoding 32-bit logical immediates
bpf, arm64: Optimize AND,OR,XOR,JSET BPF_K using arm64 logical
immediates
bpf, arm64: Optimize ADD,SUB,JMP BPF_K using arm64 add/sub immediates
arch/arm64/kernel/insn.c | 14 +++----
arch/arm64/net/bpf_jit.h | 22 +++++++++++
arch/arm64/net/bpf_jit_comp.c | 73 ++++++++++++++++++++++++++++-------
3 files changed, 88 insertions(+), 21 deletions(-)
Cc: Xi Wang <xi.wang@...il.com>
--
2.17.1
Powered by blists - more mailing lists