From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Denis Kirjanov <kda@linux-powerpc.org>, netdev@vger.kernel.org
Cc: linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH 2/2] powerpc: bpf: Fix the broken LD_VLAN_TAG_PRESENT test
Date: Tue, 24 Jun 2014 18:23:06 +0400 [thread overview]
Message-ID: <53A989CA.9030405@cogentembedded.com> (raw)
In-Reply-To: <1403603969-24436-2-git-send-email-kda@linux-powerpc.org>
Hello.
On 06/24/2014 01:59 PM, Denis Kirjanov wrote:
> We have to return the boolean here if the tag presents
> or not, not jusr ORing the TCI with the mask which results to:
> [ 709.412097] test_bpf: #18 LD_VLAN_TAG_PRESENT
> [ 709.412245] ret 4096 != 1
> [ 709.412332] ret 4096 != 1
> [ 709.412333] FAIL (2 times)
You need to sign off on the patch, else it won't be applied.
> ---
> arch/powerpc/net/bpf_jit_comp.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
> diff --git a/arch/powerpc/net/bpf_jit_comp.c b/arch/powerpc/net/bpf_jit_comp.c
> index af0ed4d..a3d8f58 100644
> --- a/arch/powerpc/net/bpf_jit_comp.c
> +++ b/arch/powerpc/net/bpf_jit_comp.c
> @@ -394,8 +394,10 @@ static int bpf_jit_build_body(struct sk_filter *fp, u32 *image,
> vlan_tci));
> if (code == (BPF_ANC | SKF_AD_VLAN_TAG))
> PPC_ANDI(r_A, r_A, ~VLAN_TAG_PRESENT);
> - else
> + else {
All arms of the *if* statement should have {} if one branch has {}.
> PPC_ANDI(r_A, r_A, VLAN_TAG_PRESENT);
> + PPC_SRWI(r_A, r_A, 12);
> + }
> break;
> case BPF_ANC | SKF_AD_QUEUE:
> BUILD_BUG_ON(FIELD_SIZEOF(struct sk_buff,
WBR, Sergei
next prev parent reply other threads:[~2014-06-24 14:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` [PATCH 2/2] powerpc: bpf: Fix the broken LD_VLAN_TAG_PRESENT test Denis Kirjanov
2014-06-24 14:23 ` Sergei Shtylyov [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53A989CA.9030405@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=kda@linux-powerpc.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).