netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/13] ARM BPF jit compiler improvements
@ 2018-07-10 12:33 Russell King - ARM Linux
  2018-07-10 12:36 ` [PATCH net-next 01/13] ARM: net: bpf: enumerate the JIT scratch stack layout Russell King
                   ` (12 more replies)
  0 siblings, 13 replies; 19+ messages in thread
From: Russell King - ARM Linux @ 2018-07-10 12:33 UTC (permalink / raw)
  To: netdev, linux-arm-kernel; +Cc: Daniel Borkmann

Hi,

This series improves the ARM BPF JIT compiler by:
- enumerating the stack layout rather than using constants that happen
  to be multiples of four
- rejig the BPF "register" accesses to use negative numbers instead of
  positive, which could be confused with register numbers in the bpf2a32
  array.
- since we maintain the ARM FP register as a pointer to the top of our
  scratch space (or, with frame pointers enabled, a valid ARM frame
  pointer register), we can access our scratch space using FP, which is
  constant across all BPF programs, including tail-called programs.
- use immediate forms of ARM instructions where possible, rather than
  first loading the immediate into an ARM register.
- use load-with-shift instruction rather than seperate shift instruction
  followed by load
- avoid reloading index and array in the tail-call code
- use double-word load/store instructions where available

 arch/arm/net/bpf_jit_32.c | 927 +++++++++++++++++++++++-----------------------
 arch/arm/net/bpf_jit_32.h |  44 +--
 2 files changed, 493 insertions(+), 478 deletions(-)

-- 
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 13.8Mbps down 630kbps up
According to speedtest.net: 13Mbps down 490kbps up

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2018-07-10 21:58 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-10 12:33 [PATCH 00/13] ARM BPF jit compiler improvements Russell King - ARM Linux
2018-07-10 12:36 ` [PATCH net-next 01/13] ARM: net: bpf: enumerate the JIT scratch stack layout Russell King
2018-07-10 18:30   ` Daniel Borkmann
2018-07-10 21:57     ` Russell King - ARM Linux
2018-07-10 12:36 ` [PATCH net-next 02/13] ARM: net: bpf: provide load/store ops with negative immediates Russell King
2018-07-10 12:36 ` [PATCH net-next 03/13] ARM: net: bpf: use negative numbers for stacked registers Russell King
2018-07-10 12:36 ` [PATCH net-next 04/13] ARM: net: bpf: remove is_on_stack() and sstk/dstk Russell King
2018-07-10 12:36 ` [PATCH net-next 05/13] ARM: net: bpf: provide accessor functions for BPF registers Russell King
2018-07-10 12:36 ` [PATCH net-next 06/13] ARM: net: bpf: 64-bit " Russell King
2018-07-10 12:36 ` [PATCH net-next 07/13] ARM: net: bpf: access eBPF scratch space using ARM FP register Russell King
2018-07-10 12:36 ` [PATCH net-next 08/13] ARM: net: bpf: use immediate forms of instructions where possible Russell King
2018-07-10 19:12   ` kbuild test robot
2018-07-10 12:36 ` [PATCH net-next 09/13] ARM: net: bpf: use ldr instructions with shifted rm register Russell King
2018-07-10 12:36 ` [PATCH net-next 10/13] ARM: net: bpf: avoid reloading 'index' Russell King
2018-07-10 12:37 ` [PATCH net-next 11/13] ARM: net: bpf: avoid reloading 'array' Russell King
2018-07-10 12:37 ` [PATCH net-next 12/13] ARM: net: bpf: always use odd/even register pair Russell King
2018-07-10 12:37 ` [PATCH net-next 13/13] ARM: net: bpf: use double-word load/stores where available Russell King
2018-07-10 17:03   ` Olof Johansson
2018-07-10 17:14     ` Russell King - ARM Linux

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).