sparc: bpf_jit: add SKF_AD_PKTTYPE support to JIT
Subsystems (5)
PATCH 1/1 sparc: bpf_jit: add SKF_AD_PKTTYPE support to JIT
commit 233577a22089 ("net: filter: constify detection of pkt_type_offset") allows us to implement simple PKTTYPE support in sparc JIT
Signed-off-by Alexei Starovoitov <[email protected]>
--- arch/sparc/net/bpf_jit_comp.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-)
arch/sparc/net/bpf_jit_comp.c +2 -7
@@ -579,16 +579,11 @@ void bpf_jit_compile(struct bpf_prog *fp)case BPF_ANC |SKF_AD_PROTOCOL :emit_skb_load16 (protocol, r_A);break ; -#if 0 -/* GCC won't let us take the address of -* a bit field even though we very much -* know what we are doing here. -*/ case BPF_ANC |SKF_AD_PKTTYPE : -__emit_skb_load8 (pkt_type, r_A); +__emit_skb_load8 (__pkt_type_offset, r_A); +emit_andi (r_A,PKT_TYPE_MAX , r_A);emit_alu_K (SRL ,5 );break ; -#endif case BPF_ANC |SKF_AD_IFINDEX :emit_skb_loadptr (dev, r_A);emit_cmpi (r_A,0 );
Signature · 1 line
1.7.9.5
From: Alexei Starovoitov <[email protected]>
Date: Tue, 16 Sep 2014 12:35:35 -0700
Quoted 4 lines
commit
233577a22089("net: filter: constify detection ofpkt_type_offset") allows us to implement simple PKTTYPE support in sparc JITSigned-off-by Alexei Starovoitov <[email protected]>
Applied, thanks for doing this work Alexei.