Re: [PATCH] RFC: arm: eBPF JIT compiler

2017-05-25 Thread Russell King - ARM Linux
On Thu, May 25, 2017 at 12:44:19PM -0700, Florian Fainelli wrote: > Using QEMU is far less complex than the patch you wrote, the tricky > point me be to find an ARMv6 root filesystem, unless you build the > module into the kernel and let it run its tests. I beg to differ - when I tried qemu during

Re: [PATCH] RFC: arm: eBPF JIT compiler

2017-05-25 Thread Florian Fainelli
On 05/25/2017 01:08 PM, Shubham Bansal wrote: > Hi Florian, > > It would be great if you could help me with it. > > Currently, what I am doing is. > > root@arm$ ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make -j4 > > Then I am using Busybox to build the root filesystem > > root@arm$ qemu-sys

Re: [PATCH] RFC: arm: eBPF JIT compiler

2017-05-25 Thread Kees Cook
For what it's worth, I did an comparison of the numbers Shubham posted in another thread for the JIT, comparing the eBPF interpreter with his new JIT. The post is here: https://www.spinics.net/lists/netdev/msg436402.html -Kees -- Kees Cook Pixel Security

Re: [PATCH] RFC: arm: eBPF JIT compiler

2017-05-25 Thread Shubham Bansal
Hi Florian, It would be great if you could help me with it. Currently, what I am doing is. root@arm$ ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make -j4 Then I am using Busybox to build the root filesystem root@arm$ qemu-system-arm -M vexpress-a9 -dtb ./linux/arch/arm/boot/dts/vexpress-v2p-c

Re: [PATCH] RFC: arm: eBPF JIT compiler

2017-05-25 Thread Florian Fainelli
On 05/25/2017 12:09 PM, Shubham Bansal wrote: > Hi Andrew, > > On Fri, May 26, 2017 at 12:18 AM, Andrew Lunn wrote: >> On Fri, May 26, 2017 at 12:05:23AM +0530, Shubham Bansal wrote: >>> Hi Andrew, >>> >>> My Apologies. >>> >>> I will remove the #ifdef CONFIG_CPU_LITTLE_ENDIAN. Do you have the >>

Re: [PATCH] RFC: arm: eBPF JIT compiler

2017-05-25 Thread Shubham Bansal
Hi Andrew, On Fri, May 26, 2017 at 12:18 AM, Andrew Lunn wrote: > On Fri, May 26, 2017 at 12:05:23AM +0530, Shubham Bansal wrote: >> Hi Andrew, >> >> My Apologies. >> >> I will remove the #ifdef CONFIG_CPU_LITTLE_ENDIAN. Do you have the >> ARMv6 machine you can test it on? > > Sorry, i don't have

Re: [PATCH] RFC: arm: eBPF JIT compiler

2017-05-25 Thread Andrew Lunn
On Fri, May 26, 2017 at 12:05:23AM +0530, Shubham Bansal wrote: > Hi Andrew, > > My Apologies. > > I will remove the #ifdef CONFIG_CPU_LITTLE_ENDIAN. Do you have the > ARMv6 machine you can test it on? Sorry, i don't have a v6. Maybe try kzm with qemu-system-qemu? Andrew

Re: [PATCH] RFC: arm: eBPF JIT compiler

2017-05-25 Thread Shubham Bansal
Hi Andrew, My Apologies. I will remove the #ifdef CONFIG_CPU_LITTLE_ENDIAN. Do you have the ARMv6 machine you can test it on? -Shubham

Re: [PATCH] RFC: arm: eBPF JIT compiler

2017-05-25 Thread Andrew Lunn
On Thu, May 25, 2017 at 11:30:36PM +0530, Shubham Bansal wrote: > Actually I intentionally put that print statement their. Hi Shubham Please don't top post. > Can you tell me what ifdef you removed ? #ifdef CONFIG_CPU_LITTLE_ENDIAN Since i said, ARM does not seem to use it. Andrew

Re: [PATCH] RFC: arm: eBPF JIT compiler

2017-05-25 Thread Andrew Lunn
On Thu, May 25, 2017 at 07:00:51PM +0200, Andrew Lunn wrote: > On Thu, May 25, 2017 at 02:01:36AM +0530, Shubham Bansal wrote: > > Hi Andrew, > > > > I am attaching the latest patch which should work on ARMv5 , ARMv6 and > > ARMv7. > > > > Please test on your machines. Apologies for the last pat

Re: [PATCH] RFC: arm: eBPF JIT compiler

2017-05-25 Thread Andrew Lunn
On Thu, May 25, 2017 at 02:01:36AM +0530, Shubham Bansal wrote: > Hi Andrew, > > I am attaching the latest patch which should work on ARMv5 , ARMv6 and ARMv7. > > Please test on your machines. Apologies for the last patch. This patch > should work though. andrew@shuttle:~/linux$ make -s -j 16 ar

Re: [PATCH] RFC: arm: eBPF JIT compiler

2017-05-25 Thread Shubham Bansal
Hi Andrew, Did you get the chance to test the patch? Best, Shubham Bansal On Thu, May 25, 2017 at 2:01 AM, Shubham Bansal wrote: > Hi Andrew, > > I am attaching the latest patch which should work on ARMv5 , ARMv6 and ARMv7. > > Please test on your machines. Apologies for the last patch. This pa

Re: [PATCH] RFC: arm: eBPF JIT compiler

2017-05-24 Thread Shubham Bansal
Hi Andrew, I am attaching the latest patch which should work on ARMv5 , ARMv6 and ARMv7. Please test on your machines. Apologies for the last patch. This patch should work though. Best, Shubham Bansal On Wed, May 24, 2017 at 4:55 AM, Andrew Lunn wrote: > root@qnap:~# test_bpf: #0 TAX jited:0

Re: [PATCH] RFC: arm: eBPF JIT compiler

2017-05-23 Thread Andrew Lunn
root@qnap:~# test_bpf: #0 TAX jited:0 241 466 241 PASS test_bpf: #1 TXA jited:1 51 117 51 PASS test_bpf: #2 ADD_SUB_MUL_K jited:0 167 PASS test_bpf: #3 DIV_MOD_KX jited:0 571 PASS test_bpf: #4 AND_OR_LSH_K jited:1 54 54 PASS test_bpf: #5 LD_IMM_0 jited:1 45 PASS test_bpf: #6 LD_IND jited:0 143 143

Re: [PATCH] RFC: arm: eBPF JIT compiler

2017-05-23 Thread Shubham Bansal
Hi Andrew, I am attaching the additional patch to make it work for ARMv5 as well. Let me know if you find any issues with this. Please apply 0002-Editted-for-ARMv5-compilation.patch after applying the first patch. Best, Shubham Bansal On Wed, May 24, 2017 at 2:16 AM, Andrew Lunn wrote: > On We

Re: [PATCH] RFC: arm: eBPF JIT compiler

2017-05-23 Thread Andrew Lunn
On Wed, May 24, 2017 at 12:03:53AM +0530, Shubham Bansal wrote: > The JIT compiler emits ARM 32 bit instructions. Currently, It supports > eBPF only. Classic BPF is supported because of the conversion by BPF > core. > > JIT is enabled with > > echo 1 > /proc/sys/net/core/bpf_jit_enable > >

Re: [PATCH] RFC: arm: eBPF JIT compiler

2017-05-23 Thread Shubham Bansal
Hi Andrew, I think I forgot to compile it for ARMv5. Let me send the patch again in few minutes. I appreciate the help. Best, Shubham Bansal On Wed, May 24, 2017 at 2:16 AM, Andrew Lunn wrote: > On Wed, May 24, 2017 at 12:03:53AM +0530, Shubham Bansal wrote: >> The JIT compiler emits ARM 32 bi

Re: [PATCH] RFC: arm: eBPF JIT compiler

2017-05-23 Thread Andrew Lunn
On Wed, May 24, 2017 at 12:03:53AM +0530, Shubham Bansal wrote: > The JIT compiler emits ARM 32 bit instructions. Currently, It supports > eBPF only. Classic BPF is supported because of the conversion by BPF > core. make mvebu_v5_defconfig make -s -j 16 arch/arm/net/bpf_jit_32.c: In function emit

Re: [PATCH] RFC: arm: eBPF JIT compiler

2017-05-23 Thread Shubham Bansal
Hi Russell, On Wed, May 24, 2017 at 12:30 AM, Russell King - ARM Linux wrote: > Hi, > > On Wed, May 24, 2017 at 12:03:53AM +0530, Shubham Bansal wrote: >> The JIT compiler emits ARM 32 bit instructions. Currently, It supports >> eBPF only. Classic BPF is supported because of the conversion by BPF

Re: [PATCH] RFC: arm: eBPF JIT compiler

2017-05-23 Thread Russell King - ARM Linux
Hi, On Wed, May 24, 2017 at 12:03:53AM +0530, Shubham Bansal wrote: > The JIT compiler emits ARM 32 bit instructions. Currently, It supports > eBPF only. Classic BPF is supported because of the conversion by BPF > core. > > JIT is enabled with > > echo 1 > /proc/sys/net/core/bpf_jit_enable