PPC: bpf_jit_comp: add SKF_AD_PKTTYPE instruction
authorDenis Kirjanov <kda@linux-powerpc.org>
Thu, 30 Oct 2014 06:12:15 +0000 (09:12 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 3 Nov 2014 20:29:42 +0000 (15:29 -0500)
commit4e2357611323d562fe255d9d71309b3ece30b8cd
tree26db9651c4e5adc1c2bfb1dfcd1b28c46fd47a6b
parent547f2735c20023d7b50a791b1b17cacb652e9237
PPC: bpf_jit_comp: add SKF_AD_PKTTYPE instruction

Add BPF extension SKF_AD_PKTTYPE to ppc JIT to load
skb->pkt_type field.

Before:
[   88.262622] test_bpf: #11 LD_IND_NET 86 97 99 PASS
[   88.265740] test_bpf: #12 LD_PKTTYPE 109 107 PASS

After:
[   80.605964] test_bpf: #11 LD_IND_NET 44 40 39 PASS
[   80.607370] test_bpf: #12 LD_PKTTYPE 9 9 PASS

CC: Alexei Starovoitov<alexei.starovoitov@gmail.com>
CC: Michael Ellerman<mpe@ellerman.id.au>
Cc: Matt Evans <matt@ozlabs.org>
Signed-off-by: Denis Kirjanov <kda@linux-powerpc.org>
v2: Added test rusults
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/powerpc/include/asm/ppc-opcode.h
arch/powerpc/net/bpf_jit.h
arch/powerpc/net/bpf_jit_comp.c