Re: [PATCH 00/14] Initial BPF-JIT support for MIPS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Florian,

On 04/08/2014 07:38 PM, Florian Fainelli wrote:
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!



I used in fact only R2 devices. I also use R2 specific instructions such as "ins" and "wsbh". I haven't really considered supporting older ISAs for a couple of reasons. R2 has been around for a long time so a ~7y old device is probably R2 capable. Furthermore, I was not sure whether mips32/64R1 devices are likely to run the latest kernel (and/or use BPF-JIT at all). But I could easily be wrong. Having said that, it's possible to support R1 devices but I'd like to avoid the overhead so a few #ifdefs are needed in the code. My personal preference is to support R2 in the initial patch, and add R1 support later on (along with the optimizations I have in mind).

--
markos


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux