Re: [PATCH bpf-next 01/13] bpf: xor of a/x in cbpf can be done

2018-01-28 Thread Daniel Borkmann
On 01/28/2018 07:58 PM, Naveen N. Rao wrote: > in 32 bit alu > > Daniel Borkmann wrote: >> Very minor optimization; saves 1 byte per program in x86_64 >> JIT in cBPF prologue. > > ... but increases program size by 4 bytes on ppc64 :( > In general, this is an area I've been wanting to spend some t

Re: [PATCH bpf-next 01/13] bpf: xor of a/x in cbpf can be done

2018-01-28 Thread Naveen N. Rao
in 32 bit alu Daniel Borkmann wrote: Very minor optimization; saves 1 byte per program in x86_64 JIT in cBPF prologue. ... but increases program size by 4 bytes on ppc64 :( In general, this is an area I've been wanting to spend some time on. Powerpc doesn't have 32-bit sub-registers, so we n

[PATCH bpf-next 01/13] bpf: xor of a/x in cbpf can be done in 32 bit alu

2018-01-26 Thread Daniel Borkmann
Very minor optimization; saves 1 byte per program in x86_64 JIT in cBPF prologue. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov --- net/core/filter.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/core/filter.c b/net/core/filter.c index 18da42a..cba2f7