Re: [PATCH net-next] selftests/bpf: get rid of -D__x86_64__

2017-05-12 Thread Andrew Lunn
On Fri, May 12, 2017 at 10:46:24AM -0400, David Miller wrote: > From: Alexei Starovoitov > Date: Thu, 11 May 2017 22:07:04 -0700 > > > On 5/11/17 6:29 PM, David Miller wrote: > >> This whole thing go me thinking however. What do you expect to happen > >> on 32-bit architectures implementing an e

Re: [PATCH net-next] selftests/bpf: get rid of -D__x86_64__

2017-05-12 Thread David Miller
From: Alexei Starovoitov Date: Thu, 11 May 2017 22:07:04 -0700 > On 5/11/17 6:29 PM, David Miller wrote: >> This whole thing go me thinking however. What do you expect to happen >> on 32-bit architectures implementing an eBPF JIT? > > I doubt any 32-bit cpu architectures will do JIT in the near

Re: [PATCH net-next] selftests/bpf: get rid of -D__x86_64__

2017-05-11 Thread Alexei Starovoitov
On 5/11/17 6:29 PM, David Miller wrote: This whole thing go me thinking however. What do you expect to happen on 32-bit architectures implementing an eBPF JIT? I doubt any 32-bit cpu architectures will do JIT in the near future. Doing 64-bit operations everywhere is too painful in assembler. H

Re: [PATCH net-next] selftests/bpf: get rid of -D__x86_64__

2017-05-11 Thread David Miller
From: Alexei Starovoitov Date: Thu, 11 May 2017 15:58:33 -0700 > Can we than move gnu/stubs.h into include/uapi as well and remove > the first -I. ? > Or keep them separate, since this linux/types.h is bpf's arch types.h > whereas gnu/stubs.h is a hack for glibc /usr/include/features.h ? > I'm fi

Re: [PATCH net-next] selftests/bpf: get rid of -D__x86_64__

2017-05-11 Thread Alexei Starovoitov
On 5/11/17 12:02 PM, David Miller wrote: From: Alexei Starovoitov Date: Thu, 4 May 2017 16:34:08 -0700 Hence I think the cleanest solution is to have bpf arch's types.h either installed with llvm/gcc or picked from selftests's dir. Something like this? yes :) Ack. [P

Re: [PATCH net-next] selftests/bpf: get rid of -D__x86_64__

2017-05-11 Thread David Miller
From: Alexei Starovoitov Date: Thu, 4 May 2017 16:34:08 -0700 > Hence I think the cleanest solution is to have bpf arch's types.h > either installed with llvm/gcc or picked from selftests's dir. Something like this? [PATCH] bpf: Provide a linux/types.h override for bpf self

Re: [PATCH net-next] selftests/bpf: get rid of -D__x86_64__

2017-05-04 Thread Alexei Starovoitov
On 5/4/17 6:37 AM, David Miller wrote: From: Alexei Starovoitov Date: Wed, 3 May 2017 20:30:22 -0700 I would buy that debian folks indeed care about multi-arch, but what above does is making #include to be a nop for any cross-compiler on sparc that included it. No, if you installed cross co

Re: [PATCH net-next] selftests/bpf: get rid of -D__x86_64__

2017-05-04 Thread David Miller
From: Alexei Starovoitov Date: Wed, 3 May 2017 20:30:22 -0700 > I would buy that debian folks indeed care about multi-arch, but > what above does is making #include to be a nop > for any cross-compiler on sparc that included it. No, if you installed cross compiler for arch X it would add anothe

Re: [PATCH net-next] selftests/bpf: get rid of -D__x86_64__

2017-05-03 Thread Alexei Starovoitov
On 5/3/17 10:35 AM, David Miller wrote: From: Alexei Starovoitov Date: Wed, 3 May 2017 09:54:42 -0700 /usr/include/asm/types.h -> asm-generic/int-ll64.h as far as I can see that should be the same on most archs. Why doesn't it work for sparc? You can't assume anything about the kernel header

Re: [PATCH net-next] selftests/bpf: get rid of -D__x86_64__

2017-05-03 Thread David Miller
From: Alexei Starovoitov Date: Wed, 3 May 2017 09:54:42 -0700 > /usr/include/asm/types.h -> asm-generic/int-ll64.h > as far as I can see that should be the same on most archs. > Why doesn't it work for sparc? You can't assume anything about the kernel headers installed, on my debian Sparc box /u

Re: [PATCH net-next] selftests/bpf: get rid of -D__x86_64__

2017-05-03 Thread Alexei Starovoitov
On 5/3/17 9:06 AM, David Miller wrote: From: David Miller Date: Wed, 03 May 2017 09:52:51 -0400 (EDT) From: Alexei Starovoitov Date: Tue, 2 May 2017 21:14:43 -0700 -D__x86_64__ workaround was used to make /usr/include/features.h to follow expected path through the system include headers. Th

Re: [PATCH net-next] selftests/bpf: get rid of -D__x86_64__

2017-05-03 Thread David Miller
From: David Miller Date: Wed, 03 May 2017 09:52:51 -0400 (EDT) > From: Alexei Starovoitov > Date: Tue, 2 May 2017 21:14:43 -0700 > >> -D__x86_64__ workaround was used to make /usr/include/features.h >> to follow expected path through the system include headers. >> This is not portable. >> Inste

Re: [PATCH net-next] selftests/bpf: get rid of -D__x86_64__

2017-05-03 Thread David Miller
From: Alexei Starovoitov Date: Tue, 2 May 2017 21:14:43 -0700 > -D__x86_64__ workaround was used to make /usr/include/features.h > to follow expected path through the system include headers. > This is not portable. > Instead define dummy stubs.h which is used by 'clang -target bpf' > > Fixes: 68

[PATCH net-next] selftests/bpf: get rid of -D__x86_64__

2017-05-02 Thread Alexei Starovoitov
-D__x86_64__ workaround was used to make /usr/include/features.h to follow expected path through the system include headers. This is not portable. Instead define dummy stubs.h which is used by 'clang -target bpf' Fixes: 6882804c916b ("selftests/bpf: add a test for overlapping packet range checks"