diff options
author | David S. Miller <davem@davemloft.net> | 2014-06-05 16:22:02 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-06-05 16:22:02 -0700 |
commit | f666f87b9423fb534d2116206ace04495080f2b5 (patch) | |
tree | 23f929c890219d6ef412b4ff630adf501b70a3ec /net/core | |
parent | 46cfd6ea23b0a207c87269d86457727dc4485708 (diff) | |
parent | 0dcceabb0c1bf2d4c12a748df9933fad303072a7 (diff) | |
download | linux-f666f87b9423fb534d2116206ace04495080f2b5.tar.gz linux-f666f87b9423fb534d2116206ace04495080f2b5.tar.bz2 linux-f666f87b9423fb534d2116206ace04495080f2b5.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts:
drivers/net/xen-netback/netback.c
net/core/filter.c
A filter bug fix overlapped some cleanups and a conversion
over to some new insn generation macros.
A xen-netback bug fix overlapped the addition of multi-queue
support.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/filter.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/net/core/filter.c b/net/core/filter.c index 9de0c25323b4..6bd2e350e751 100644 --- a/net/core/filter.c +++ b/net/core/filter.c @@ -584,7 +584,11 @@ load_byte: * to make sure its still a 3bit field starting at a byte boundary; * taken from arch/x86/net/bpf_jit_comp.c. */ +#ifdef __BIG_ENDIAN_BITFIELD +#define PKT_TYPE_MAX (7 << 5) +#else #define PKT_TYPE_MAX 7 +#endif static unsigned int pkt_type_offset(void) { struct sk_buff skb_probe = { .pkt_type = ~0, }; @@ -685,6 +689,10 @@ static bool convert_bpf_extensions(struct sock_filter *fp, return false; insn++; *insn = BPF_ALU32_IMM(BPF_AND, BPF_REG_A, PKT_TYPE_MAX); +#ifdef __BIG_ENDIAN_BITFIELD + insn++; + *insn = BPF_ALU32_IMM(BPF_RSH, BPF_REG_A, 5); +#endif break; case SKF_AD_OFF + SKF_AD_IFINDEX: |