aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-12-12 21:07:07 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-12-12 21:07:07 -0500
commit6be35c700f742e911ecedd07fcc43d4439922334 (patch)
treeca9f37214d204465fcc2d79c82efd291e357c53c /arch/sparc
parente37aa63e87bd581f9be5555ed0ba83f5295c92fc (diff)
parent520dfe3a3645257bf83660f672c47f8558f3d4c4 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
Pull networking changes from David Miller: 1) Allow to dump, monitor, and change the bridge multicast database using netlink. From Cong Wang. 2) RFC 5961 TCP blind data injection attack mitigation, from Eric Dumazet. 3) Networking user namespace support from Eric W. Biederman. 4) tuntap/virtio-net multiqueue support by Jason Wang. 5) Support for checksum offload of encapsulated packets (basically, tunneled traffic can still be checksummed by HW). From Joseph Gasparakis. 6) Allow BPF filter access to VLAN tags, from Eric Dumazet and Daniel Borkmann. 7) Bridge port parameters over netlink and BPDU blocking support from Stephen Hemminger. 8) Improve data access patterns during inet socket demux by rearranging socket layout, from Eric Dumazet. 9) TIPC protocol updates and cleanups from Ying Xue, Paul Gortmaker, and Jon Maloy. 10) Update TCP socket hash sizing to be more in line with current day realities. The existing heurstics were choosen a decade ago. From Eric Dumazet. 11) Fix races, queue bloat, and excessive wakeups in ATM and associated drivers, from Krzysztof Mazur and David Woodhouse. 12) Support DOVE (Distributed Overlay Virtual Ethernet) extensions in VXLAN driver, from David Stevens. 13) Add "oops_only" mode to netconsole, from Amerigo Wang. 14) Support set and query of VEB/VEPA bridge mode via PF_BRIDGE, also allow DCB netlink to work on namespaces other than the initial namespace. From John Fastabend. 15) Support PTP in the Tigon3 driver, from Matt Carlson. 16) tun/vhost zero copy fixes and improvements, plus turn it on by default, from Michael S. Tsirkin. 17) Support per-association statistics in SCTP, from Michele Baldessari. And many, many, driver updates, cleanups, and improvements. Too numerous to mention individually. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1722 commits) net/mlx4_en: Add support for destination MAC in steering rules net/mlx4_en: Use generic etherdevice.h functions. net: ethtool: Add destination MAC address to flow steering API bridge: add support of adding and deleting mdb entries bridge: notify mdb changes via netlink ndisc: Unexport ndisc_{build,send}_skb(). uapi: add missing netconf.h to export list pkt_sched: avoid requeues if possible solos-pci: fix double-free of TX skb in DMA mode bnx2: Fix accidental reversions. bna: Driver Version Updated to 3.1.2.1 bna: Firmware update bna: Add RX State bna: Rx Page Based Allocation bna: TX Intr Coalescing Fix bna: Tx and Rx Optimizations bna: Code Cleanup and Enhancements ath9k: check pdata variable before dereferencing it ath5k: RX timestamp is reported at end of frame ath9k_htc: RX timestamp is reported at end of frame ...
Diffstat (limited to 'arch/sparc')
-rw-r--r--arch/sparc/include/uapi/asm/socket.h1
-rw-r--r--arch/sparc/net/bpf_jit_comp.c19
2 files changed, 20 insertions, 0 deletions
diff --git a/arch/sparc/include/uapi/asm/socket.h b/arch/sparc/include/uapi/asm/socket.h
index bea1568ae4af..c83a937ead00 100644
--- a/arch/sparc/include/uapi/asm/socket.h
+++ b/arch/sparc/include/uapi/asm/socket.h
@@ -41,6 +41,7 @@
41 41
42#define SO_ATTACH_FILTER 0x001a 42#define SO_ATTACH_FILTER 0x001a
43#define SO_DETACH_FILTER 0x001b 43#define SO_DETACH_FILTER 0x001b
44#define SO_GET_FILTER SO_ATTACH_FILTER
44 45
45#define SO_PEERNAME 0x001c 46#define SO_PEERNAME 0x001c
46#define SO_TIMESTAMP 0x001d 47#define SO_TIMESTAMP 0x001d
diff --git a/arch/sparc/net/bpf_jit_comp.c b/arch/sparc/net/bpf_jit_comp.c
index 28368701ef79..3109ca684a99 100644
--- a/arch/sparc/net/bpf_jit_comp.c
+++ b/arch/sparc/net/bpf_jit_comp.c
@@ -3,6 +3,7 @@
3#include <linux/netdevice.h> 3#include <linux/netdevice.h>
4#include <linux/filter.h> 4#include <linux/filter.h>
5#include <linux/cache.h> 5#include <linux/cache.h>
6#include <linux/if_vlan.h>
6 7
7#include <asm/cacheflush.h> 8#include <asm/cacheflush.h>
8#include <asm/ptrace.h> 9#include <asm/ptrace.h>
@@ -312,6 +313,12 @@ do { *prog++ = BR_OPC | WDISP22(OFF); \
312#define emit_addi(R1, IMM, R3) \ 313#define emit_addi(R1, IMM, R3) \
313 *prog++ = (ADD | IMMED | RS1(R1) | S13(IMM) | RD(R3)) 314 *prog++ = (ADD | IMMED | RS1(R1) | S13(IMM) | RD(R3))
314 315
316#define emit_and(R1, R2, R3) \
317 *prog++ = (AND | RS1(R1) | RS2(R2) | RD(R3))
318
319#define emit_andi(R1, IMM, R3) \
320 *prog++ = (AND | IMMED | RS1(R1) | S13(IMM) | RD(R3))
321
315#define emit_alloc_stack(SZ) \ 322#define emit_alloc_stack(SZ) \
316 *prog++ = (SUB | IMMED | RS1(SP) | S13(SZ) | RD(SP)) 323 *prog++ = (SUB | IMMED | RS1(SP) | S13(SZ) | RD(SP))
317 324
@@ -415,6 +422,8 @@ void bpf_jit_compile(struct sk_filter *fp)
415 case BPF_S_ANC_IFINDEX: 422 case BPF_S_ANC_IFINDEX:
416 case BPF_S_ANC_MARK: 423 case BPF_S_ANC_MARK:
417 case BPF_S_ANC_RXHASH: 424 case BPF_S_ANC_RXHASH:
425 case BPF_S_ANC_VLAN_TAG:
426 case BPF_S_ANC_VLAN_TAG_PRESENT:
418 case BPF_S_ANC_CPU: 427 case BPF_S_ANC_CPU:
419 case BPF_S_ANC_QUEUE: 428 case BPF_S_ANC_QUEUE:
420 case BPF_S_LD_W_ABS: 429 case BPF_S_LD_W_ABS:
@@ -600,6 +609,16 @@ void bpf_jit_compile(struct sk_filter *fp)
600 case BPF_S_ANC_RXHASH: 609 case BPF_S_ANC_RXHASH:
601 emit_skb_load32(rxhash, r_A); 610 emit_skb_load32(rxhash, r_A);
602 break; 611 break;
612 case BPF_S_ANC_VLAN_TAG:
613 case BPF_S_ANC_VLAN_TAG_PRESENT:
614 emit_skb_load16(vlan_tci, r_A);
615 if (filter[i].code == BPF_S_ANC_VLAN_TAG) {
616 emit_andi(r_A, VLAN_VID_MASK, r_A);
617 } else {
618 emit_loadimm(VLAN_TAG_PRESENT, r_TMP);
619 emit_and(r_A, r_TMP, r_A);
620 }
621 break;
603 622
604 case BPF_S_LD_IMM: 623 case BPF_S_LD_IMM:
605 emit_loadimm(K, r_A); 624 emit_loadimm(K, r_A);