From patchwork Tue Jun 24 09:59:28 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Denis Kirjanov X-Patchwork-Id: 363369 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 550F61400BE for ; Tue, 24 Jun 2014 20:25:03 +1000 (EST) Received: from ozlabs.org (ozlabs.org [103.22.144.67]) by lists.ozlabs.org (Postfix) with ESMTP id 40B451A03C8 for ; Tue, 24 Jun 2014 20:25:03 +1000 (EST) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from mail-lb0-f171.google.com (mail-lb0-f171.google.com [209.85.217.171]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 7BA491A0244 for ; Tue, 24 Jun 2014 20:24:25 +1000 (EST) Received: by mail-lb0-f171.google.com with SMTP id s7so115993lbd.2 for ; Tue, 24 Jun 2014 03:24:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=IVadqB5jQ0H+MpeMpSFz/8oB248ri7fB2H5BozYD3P4=; b=a4VLTYibT6CTtpTSpLJZOvTy5Jg6Ta3Y14vHMqa4Q75QydC+TWn5TmmeIBu8WhaWR5 EAjYAmCq0mMVJTYsIG+dLwe/Etg62SyQj11virYjcgioBf61oKfPFIv0KJLUSWpPRsKm SnIsqiICyEmBSnt8stM6av/YB+fspv/tDPep1Z/hyNW2qG/Dh57/XDePUYgTQcC4Ck3z DPJywQnHNFEuRXc0eQBwIq8LpOdkosmew+PaqtrGP+LvekM0fePLSBNFjZMvIAOj7Oo8 +xJy/HaoC7gQa0p+jxepxBWHPii7s5rPBAlP0pTzOgNvL56MvupXFDck4F6VFrJuIf6D uCmQ== X-Gm-Message-State: ALoCoQnUPOnwiCqHS2DNUYivCPCF2FMUY0Gu1Ur/xiGHyS+d0J5QPO/o4LtiOc1o/drHeVDb+nOu X-Received: by 10.112.146.10 with SMTP id sy10mr24311lbb.64.1403605460111; Tue, 24 Jun 2014 03:24:20 -0700 (PDT) Received: from localhost.localdomain ([5.35.52.78]) by mx.google.com with ESMTPSA id d9sm9112328lag.19.2014.06.24.03.24.18 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 24 Jun 2014 03:24:19 -0700 (PDT) From: Denis Kirjanov To: netdev@vger.kernel.org Subject: [PATCH 1/2] powerpc: bpf: Use correct mask while accessing the VLAN tag Date: Tue, 24 Jun 2014 13:59:28 +0400 Message-Id: <1403603969-24436-1-git-send-email-kda@linux-powerpc.org> X-Mailer: git-send-email 2.0.0 Cc: Denis Kirjanov , linuxppc-dev@lists.ozlabs.org X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "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;