Re: [PATCH net-next] x86: bpf_jit: small optimization in emit_bpf_tail_call()

2017-08-31 Thread David Miller
From: Eric Dumazet Date: Thu, 31 Aug 2017 04:53:42 -0700 > From: Eric Dumazet > > Saves 4 bytes replacing following instructions : > > lea rax, [rsi + rdx * 8 + offsetof(...)] > mov rax, qword ptr [rax] > cmp rax, 0 > > by : > > mov rax, [rsi + rdx * 8 + offsetof(...)] > test rax, rax > >

Re: [PATCH net-next] x86: bpf_jit: small optimization in emit_bpf_tail_call()

2017-08-31 Thread Alexei Starovoitov
On Thu, Aug 31, 2017 at 04:53:42AM -0700, Eric Dumazet wrote: > From: Eric Dumazet > > Saves 4 bytes replacing following instructions : > > lea rax, [rsi + rdx * 8 + offsetof(...)] > mov rax, qword ptr [rax] > cmp rax, 0 > > by : > > mov rax, [rsi + rdx * 8 + offsetof(...)] > test rax, rax >

Re: [PATCH net-next] x86: bpf_jit: small optimization in emit_bpf_tail_call()

2017-08-31 Thread Daniel Borkmann
On 08/31/2017 01:53 PM, Eric Dumazet wrote: From: Eric Dumazet Saves 4 bytes replacing following instructions : lea rax, [rsi + rdx * 8 + offsetof(...)] mov rax, qword ptr [rax] cmp rax, 0 by : mov rax, [rsi + rdx * 8 + offsetof(...)] test rax, rax Signed-off-by: Eric Dumazet Cc: Alexei St

[PATCH net-next] x86: bpf_jit: small optimization in emit_bpf_tail_call()

2017-08-31 Thread Eric Dumazet
From: Eric Dumazet Saves 4 bytes replacing following instructions : lea rax, [rsi + rdx * 8 + offsetof(...)] mov rax, qword ptr [rax] cmp rax, 0 by : mov rax, [rsi + rdx * 8 + offsetof(...)] test rax, rax Signed-off-by: Eric Dumazet Cc: Alexei Starovoitov Cc: Daniel Borkmann --- arch/x8