netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: ast@plumgrid.com
Cc: dborkman@redhat.com, netdev@vger.kernel.org
Subject: Re: [PATCH net] net: filter: fix SKF_AD_PKTTYPE extension on big-endian
Date: Thu, 05 Jun 2014 15:41:17 -0700 (PDT)	[thread overview]
Message-ID: <20140605.154117.1636370741582387143.davem@davemloft.net> (raw)
In-Reply-To: <1402004376-1814-1-git-send-email-ast@plumgrid.com>

From: Alexei Starovoitov <ast@plumgrid.com>
Date: Thu,  5 Jun 2014 14:39:36 -0700

> BPF classic->internal converter broke SKF_AD_PKTTYPE extension, since
> pkt_type_offset() was failing to find skb->pkt_type field which is defined as:
> __u8 pkt_type:3,
>      fclone:2,
>      ipvs_property:1,
>      peeked:1,
>      nf_trace:1;
> 
> Fix it by searching for 3 most significant bits and shift them by 5 at run-time
> 
> Fixes: bd4cf0ed331a ("net: filter: rework/optimize internal BPF interpreter's instruction set")
> Signed-off-by: Alexei Starovoitov <ast@plumgrid.com>
> Acked-by: Daniel Borkmann <dborkman@redhat.com>
> Tested-by: Daniel Borkmann <dborkman@redhat.com>
> ---
> 
> backported BPF testsuite to 'net' and tested with qemu-sparc64.
> Daniel tested it on s390.
> 
> Dave,
> The fix doesn't apply cleanly to 'net-next'.
> There 2nd hunk needs to be:
>                insn++;
>                *insn = BPF_ALU32_IMM(BPF_RSH, BPF_REG_A, 5);
> I have 'net-next' patch ready and tested as well. Let me know if I should
> send it or you'll take care of it while doing the merge of 'net'.

Applied, and I'll take care of this when I merge net into net-next,
thanks.

      reply	other threads:[~2014-06-05 22:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-05 21:39 [PATCH net] net: filter: fix SKF_AD_PKTTYPE extension on big-endian Alexei Starovoitov
2014-06-05 22:41 ` David Miller [this message]

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=20140605.154117.1636370741582387143.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=ast@plumgrid.com \
    --cc=dborkman@redhat.com \
    --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).