From: Markos Chandras <Markos.Chandras@imgtec.com>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: Linux-MIPS <linux-mips@linux-mips.org>
Subject: Re: [PATCH 00/14] Initial BPF-JIT support for MIPS
Date: Wed, 9 Apr 2014 09:55:03 +0100 [thread overview]
Message-ID: <53450AE7.802@imgtec.com> (raw)
In-Reply-To: <CAGVrzcZXUWmWO3iuDGPPtKaT1O5qr50LpeSPPHxFCqovkQXzag@mail.gmail.com>
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@imgtec.com>:
>> 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@vger.kernel.org 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
next prev parent reply other threads:[~2014-04-09 8:54 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-08 11:47 [PATCH 00/14] Initial BPF-JIT support for MIPS Markos Chandras
2014-04-08 11:47 ` Markos Chandras
2014-04-08 11:47 ` [PATCH 01/14] MIPS: uasm: Add u3u2u1 instruction builders Markos Chandras
2014-04-08 11:47 ` Markos Chandras
2014-04-08 11:47 ` [PATCH 02/14] MIPS: uasm: Add u2u1 " Markos Chandras
2014-04-08 11:47 ` Markos Chandras
2014-04-08 11:47 ` [PATCH 03/14] MIPS: uasm: Add sllv uasm instruction Markos Chandras
2014-04-08 11:47 ` Markos Chandras
2014-04-08 11:47 ` [PATCH 04/14] MIPS: uasm: Add srlv " Markos Chandras
2014-04-08 11:47 ` Markos Chandras
2014-04-08 11:47 ` [PATCH 05/14] MIPS: uasm: Add divu " Markos Chandras
2014-04-08 11:47 ` Markos Chandras
2014-04-08 11:47 ` [PATCH 06/14] MIPS: uasm: Add mfhi " Markos Chandras
2014-04-08 11:47 ` Markos Chandras
2014-04-08 11:47 ` [PATCH 07/14] MIPS: uasm: Add jalr " Markos Chandras
2014-04-08 11:47 ` Markos Chandras
2014-04-08 11:47 ` [PATCH 08/14] MIPS: uasm: Add sltiu " Markos Chandras
2014-04-08 11:47 ` Markos Chandras
2014-04-08 11:47 ` [PATCH 09/14] MIPS: uasm: Add sltu " Markos Chandras
2014-04-08 11:47 ` Markos Chandras
2014-04-08 11:47 ` [PATCH 10/14] MIPS: uasm: Add wsbh " Markos Chandras
2014-04-08 11:47 ` Markos Chandras
2014-04-08 11:47 ` [PATCH 11/14] MIPS: uasm: Add lh uam instruction Markos Chandras
2014-04-08 11:47 ` Markos Chandras
2014-04-08 11:47 ` [PATCH 12/14] MIPS: uasm: Add mul uasm instruction Markos Chandras
2014-04-08 11:47 ` Markos Chandras
2014-04-08 11:47 ` [PATCH 13/14] MIPS: net: Add BPF JIT Markos Chandras
2014-04-08 11:47 ` Markos Chandras
2014-04-09 16:00 ` [PATCH v2 " Markos Chandras
2014-04-09 16:00 ` Markos Chandras
2014-04-09 22:28 ` Jonas Gorski
2014-04-10 7:46 ` Markos Chandras
2014-04-10 7:46 ` Markos Chandras
2014-04-10 3:40 ` Alexei Starovoitov
2014-04-10 8:06 ` Markos Chandras
2014-04-10 8:06 ` Markos Chandras
2014-04-24 14:50 ` [PATCH v3 " Markos Chandras
2014-04-24 14:50 ` Markos Chandras
2014-04-24 16:31 ` Paul Burton
2014-04-24 16:31 ` Paul Burton
2014-04-25 12:06 ` Markos Chandras
2014-04-25 12:06 ` Markos Chandras
2014-04-29 15:58 ` [PATCH v4 " Markos Chandras
2014-04-29 15:58 ` Markos Chandras
2014-04-08 11:47 ` [PATCH 14/14] MIPS: Enable the BPF_JIT symbol for MIPS Markos Chandras
2014-04-08 11:47 ` Markos Chandras
2014-04-09 16:02 ` [PATCH v2 " Markos Chandras
2014-04-09 16:02 ` Markos Chandras
2014-04-08 18:38 ` [PATCH 00/14] Initial BPF-JIT support " Florian Fainelli
2014-04-09 8:55 ` Markos Chandras [this message]
2014-04-09 10:11 ` Jonas Gorski
2014-04-09 10:56 ` Markos Chandras
2014-04-09 10:56 ` Markos Chandras
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53450AE7.802@imgtec.com \
--to=markos.chandras@imgtec.com \
--cc=f.fainelli@gmail.com \
--cc=linux-mips@linux-mips.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox