Skip to content

Few x64 jit improvements to shrink image size

Daniel Borkmann netdev 1 version Applied

Status from this message: Applied to bpf-next, thanks Daniel.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 1 replyApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/6bpf, x64: save one byte per shl/shr/sar when imm is 1arch/x86/net/bpf_jit_comp.c+5 -10 replies
2/6bpf, x64: save several bytes by using mov over movabsq when possiblearch/x86/net/bpf_jit_comp.c+74 -510 replies
3/6bpf, x64: save several bytes when mul dest is r0/r3 anywayarch/x86/net/bpf_jit_comp.c+11 -100 replies
4/6bpf, x64: save few bytes when mul is in alu32arch/x86/net/bpf_jit_comp.c+28 -150 replies
5/6bpf, x64: save 5 bytes in prologue when ebpf insns came from cbpfarch/x86/net/bpf_jit_comp.c+16 -120 replies
6/6bpf: add various jit test casestools/testing/selftests/bpf/test_verifier.c+89 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH bpf-next 0/6] Few x64 jit improvements to shrink image size

Couple of minor improvements to the x64 JIT I had still around from pre merge window in order to shrink the image size further. Added test cases for kselftests too as well as running Cilium workloads on them w/o issues.

Thanks!

Daniel Borkmann (6):
bpf, x64: save one byte per shl/shr/sar when imm is 1 bpf, x64: save several bytes by using mov over movabsq when possible bpf, x64: save several bytes when mul dest is r0/r3 anyway bpf, x64: save few bytes when mul is in alu32
bpf, x64: save 5 bytes in prologue when ebpf insns came from cbpf
bpf: add various jit test cases

 arch/x86/net/bpf_jit_comp.c                 | 219 +++++++++++++++++-----------
 tools/testing/selftests/bpf/test_verifier.c |  89 +++++++++++
 2 files changed, 221 insertions(+), 87 deletions(-)
Signature · 1 line
2.9.5