Hi, 2014-04-08 4:47 GMT-07:00 Markos Chandras <markos.chandras@xxxxxxxxxx>: > Hi, > > This adds support for BPF-JIT for MIPS. Tested on mips32 LE/BE and mips64 BE > with a few networking tools such as tcpdump and dhcp but not all opcodes have > been tested as far as I can tell. There are a few optimizations left to be made > (fastpath for load operations instead of calling the helper functions) but > these can be added later on. If someone has complex network setups in place and > would like to give it a try, that would be much appreciated. > > This patchset is for the upstream-sfr/mips-for-linux-next tree You should have probably CC'd netdev@xxxxxxxxxxxxxxx to get their review on the specific JIT implementation. BPF_JIT is made conditional to MIPS32/64R2 processors, I could not spot easily in the implementation whether this is because you are using r2-only instructions, or this is just the targets you tested. Is there any chance to make that work on MIPS32r1 CPUs for instance? Those are used in low-end devices which could benefit from such a performance boost. Thanks! > > Markos Chandras (14): > MIPS: uasm: Add u3u2u1 instruction builders > MIPS: uasm: Add u2u1 instruction builders > MIPS: uasm: Add sllv uasm instruction > MIPS: uasm: Add srlv uasm instruction > MIPS: uasm: Add divu uasm instruction > MIPS: uasm: Add mfhi uasm instruction > MIPS: uasm: Add jalr uasm instruction > MIPS: uasm: Add sltiu uasm instruction > MIPS: uasm: Add sltu uasm instruction > MIPS: uasm: Add wsbh uasm instruction > MIPS: uasm: Add lh uam instruction > MIPS: uasm: Add mul uasm instruction > MIPS: net: Add BPF JIT > MIPS: Enable the BPF_JIT symbol for MIPS > > arch/mips/Kbuild | 1 + > arch/mips/Kconfig | 1 + > arch/mips/include/asm/uasm.h | 16 + > arch/mips/include/uapi/asm/inst.h | 17 + > arch/mips/mm/uasm-micromips.c | 10 + > arch/mips/mm/uasm-mips.c | 10 + > arch/mips/mm/uasm.c | 39 +- > arch/mips/net/Makefile | 3 + > arch/mips/net/bpf_jit.c | 1327 +++++++++++++++++++++++++++++++++++++ > arch/mips/net/bpf_jit.h | 45 ++ > 10 files changed, 1462 insertions(+), 7 deletions(-) > create mode 100644 arch/mips/net/Makefile > create mode 100644 arch/mips/net/bpf_jit.c > create mode 100644 arch/mips/net/bpf_jit.h > > -- > 1.9.1 > > -- Florian