All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] powerpc: bpf: Use correct mask while accessing the VLAN tag
@ 2014-06-24  9:59 ` Denis Kirjanov
  0 siblings, 0 replies; 7+ messages in thread
From: Denis Kirjanov @ 2014-06-24  9:59 UTC (permalink / raw)
  To: netdev; +Cc: Denis Kirjanov, linuxppc-dev

Use the proper mask which is 0xefff
---
 arch/powerpc/net/bpf_jit_comp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/net/bpf_jit_comp.c b/arch/powerpc/net/bpf_jit_comp.c
index 6dcdade..af0ed4d 100644
--- a/arch/powerpc/net/bpf_jit_comp.c
+++ b/arch/powerpc/net/bpf_jit_comp.c
@@ -393,7 +393,7 @@ static int bpf_jit_build_body(struct sk_filter *fp, u32 *image,
 			PPC_LHZ_OFFS(r_A, r_skb, offsetof(struct sk_buff,
 							  vlan_tci));
 			if (code == (BPF_ANC | SKF_AD_VLAN_TAG))
-				PPC_ANDI(r_A, r_A, VLAN_VID_MASK);
+				PPC_ANDI(r_A, r_A, ~VLAN_TAG_PRESENT);
 			else
 				PPC_ANDI(r_A, r_A, VLAN_TAG_PRESENT);
 			break;
-- 
2.0.0

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-06-24 15:29 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-24  9:59 [PATCH 1/2] powerpc: bpf: Use correct mask while accessing the VLAN tag Denis Kirjanov
2014-06-24  9:59 ` Denis Kirjanov
2014-06-24  9:59 ` [PATCH 2/2] powerpc: bpf: Fix the broken LD_VLAN_TAG_PRESENT test Denis Kirjanov
2014-06-24  9:59   ` Denis Kirjanov
2014-06-24 14:23   ` Sergei Shtylyov
2014-06-24 14:52     ` Denis Kirjanov
2014-06-24 15:29 ` [PATCH 1/2] powerpc: bpf: Use correct mask while accessing the VLAN tag Alexei Starovoitov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.