aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-08-06 12:38:14 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-08-06 12:38:14 -0400
commitae045e2455429c418a418a3376301a9e5753a0a8 (patch)
treeb445bdeecd3f38aa0d0a29c9585cee49e4ccb0f1 /arch
parentf4f142ed4ef835709c7e6d12eaca10d190bcebed (diff)
parentd247b6ab3ce6dd43665780865ec5fa145d9ab6bd (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
Pull networking updates from David Miller: "Highlights: 1) Steady transitioning of the BPF instructure to a generic spot so all kernel subsystems can make use of it, from Alexei Starovoitov. 2) SFC driver supports busy polling, from Alexandre Rames. 3) Take advantage of hash table in UDP multicast delivery, from David Held. 4) Lighten locking, in particular by getting rid of the LRU lists, in inet frag handling. From Florian Westphal. 5) Add support for various RFC6458 control messages in SCTP, from Geir Ola Vaagland. 6) Allow to filter bridge forwarding database dumps by device, from Jamal Hadi Salim. 7) virtio-net also now supports busy polling, from Jason Wang. 8) Some low level optimization tweaks in pktgen from Jesper Dangaard Brouer. 9) Add support for ipv6 address generation modes, so that userland can have some input into the process. From Jiri Pirko. 10) Consolidate common TCP connection request code in ipv4 and ipv6, from Octavian Purdila. 11) New ARP packet logger in netfilter, from Pablo Neira Ayuso. 12) Generic resizable RCU hash table, with intial users in netlink and nftables. From Thomas Graf. 13) Maintain a name assignment type so that userspace can see where a network device name came from (enumerated by kernel, assigned explicitly by userspace, etc.) From Tom Gundersen. 14) Automatic flow label generation on transmit in ipv6, from Tom Herbert. 15) New packet timestamping facilities from Willem de Bruijn, meant to assist in measuring latencies going into/out-of the packet scheduler, latency from TCP data transmission to ACK, etc" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1536 commits) cxgb4 : Disable recursive mailbox commands when enabling vi net: reduce USB network driver config options. tg3: Modify tg3_tso_bug() to handle multiple TX rings amd-xgbe: Perform phy connect/disconnect at dev open/stop amd-xgbe: Use dma_set_mask_and_coherent to set DMA mask net: sun4i-emac: fix memory leak on bad packet sctp: fix possible seqlock seadlock in sctp_packet_transmit() Revert "net: phy: Set the driver when registering an MDIO bus device" cxgb4vf: Turn off SGE RX/TX Callback Timers and interrupts in PCI shutdown routine team: Simplify return path of team_newlink bridge: Update outdated comment on promiscuous mode net-timestamp: ACK timestamp for bytestreams net-timestamp: TCP timestamping net-timestamp: SCHED timestamp on entering packet scheduler net-timestamp: add key to disambiguate concurrent datagrams net-timestamp: move timestamp flags out of sk_flags net-timestamp: extend SCM_TIMESTAMPING ancillary data struct cxgb4i : Move stray CPL definitions to cxgb4 driver tcp: reduce spurious retransmits due to transient SACK reneging qlcnic: Initialize dcbnl_ops before register_netdev ...
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/boot/dts/sama5d3_gmac.dtsi2
-rw-r--r--arch/arm/boot/dts/socfpga.dtsi4
-rw-r--r--arch/arm/net/bpf_jit_32.c8
-rw-r--r--arch/mips/net/bpf_jit.c8
-rw-r--r--arch/powerpc/net/bpf_jit_comp.c8
-rw-r--r--arch/s390/net/bpf_jit_comp.c4
-rw-r--r--arch/sparc/net/bpf_jit_comp.c4
-rw-r--r--arch/x86/net/bpf_jit_comp.c16
8 files changed, 29 insertions, 25 deletions
diff --git a/arch/arm/boot/dts/sama5d3_gmac.dtsi b/arch/arm/boot/dts/sama5d3_gmac.dtsi
index a6cb0508762f..de5ed59fb446 100644
--- a/arch/arm/boot/dts/sama5d3_gmac.dtsi
+++ b/arch/arm/boot/dts/sama5d3_gmac.dtsi
@@ -74,7 +74,7 @@
74 }; 74 };
75 75
76 macb0: ethernet@f0028000 { 76 macb0: ethernet@f0028000 {
77 compatible = "cdns,pc302-gem", "cdns,gem"; 77 compatible = "atmel,sama5d3-gem";
78 reg = <0xf0028000 0x100>; 78 reg = <0xf0028000 0x100>;
79 interrupts = <34 IRQ_TYPE_LEVEL_HIGH 3>; 79 interrupts = <34 IRQ_TYPE_LEVEL_HIGH 3>;
80 pinctrl-names = "default"; 80 pinctrl-names = "default";
diff --git a/arch/arm/boot/dts/socfpga.dtsi b/arch/arm/boot/dts/socfpga.dtsi
index 4676f25e87a7..70fdd2064811 100644
--- a/arch/arm/boot/dts/socfpga.dtsi
+++ b/arch/arm/boot/dts/socfpga.dtsi
@@ -486,6 +486,8 @@
486 clock-names = "stmmaceth"; 486 clock-names = "stmmaceth";
487 resets = <&rst EMAC0_RESET>; 487 resets = <&rst EMAC0_RESET>;
488 reset-names = "stmmaceth"; 488 reset-names = "stmmaceth";
489 snps,multicast-filter-bins = <256>;
490 snps,perfect-filter-entries = <128>;
489 status = "disabled"; 491 status = "disabled";
490 }; 492 };
491 493
@@ -500,6 +502,8 @@
500 clock-names = "stmmaceth"; 502 clock-names = "stmmaceth";
501 resets = <&rst EMAC1_RESET>; 503 resets = <&rst EMAC1_RESET>;
502 reset-names = "stmmaceth"; 504 reset-names = "stmmaceth";
505 snps,multicast-filter-bins = <256>;
506 snps,perfect-filter-entries = <128>;
503 status = "disabled"; 507 status = "disabled";
504 }; 508 };
505 509
diff --git a/arch/arm/net/bpf_jit_32.c b/arch/arm/net/bpf_jit_32.c
index fb5503ce016f..a37b989a2f91 100644
--- a/arch/arm/net/bpf_jit_32.c
+++ b/arch/arm/net/bpf_jit_32.c
@@ -56,7 +56,7 @@
56#define FLAG_NEED_X_RESET (1 << 0) 56#define FLAG_NEED_X_RESET (1 << 0)
57 57
58struct jit_ctx { 58struct jit_ctx {
59 const struct sk_filter *skf; 59 const struct bpf_prog *skf;
60 unsigned idx; 60 unsigned idx;
61 unsigned prologue_bytes; 61 unsigned prologue_bytes;
62 int ret0_fp_idx; 62 int ret0_fp_idx;
@@ -465,7 +465,7 @@ static inline void update_on_xread(struct jit_ctx *ctx)
465static int build_body(struct jit_ctx *ctx) 465static int build_body(struct jit_ctx *ctx)
466{ 466{
467 void *load_func[] = {jit_get_skb_b, jit_get_skb_h, jit_get_skb_w}; 467 void *load_func[] = {jit_get_skb_b, jit_get_skb_h, jit_get_skb_w};
468 const struct sk_filter *prog = ctx->skf; 468 const struct bpf_prog *prog = ctx->skf;
469 const struct sock_filter *inst; 469 const struct sock_filter *inst;
470 unsigned i, load_order, off, condt; 470 unsigned i, load_order, off, condt;
471 int imm12; 471 int imm12;
@@ -857,7 +857,7 @@ b_epilogue:
857} 857}
858 858
859 859
860void bpf_jit_compile(struct sk_filter *fp) 860void bpf_jit_compile(struct bpf_prog *fp)
861{ 861{
862 struct jit_ctx ctx; 862 struct jit_ctx ctx;
863 unsigned tmp_idx; 863 unsigned tmp_idx;
@@ -926,7 +926,7 @@ out:
926 return; 926 return;
927} 927}
928 928
929void bpf_jit_free(struct sk_filter *fp) 929void bpf_jit_free(struct bpf_prog *fp)
930{ 930{
931 if (fp->jited) 931 if (fp->jited)
932 module_free(NULL, fp->bpf_func); 932 module_free(NULL, fp->bpf_func);
diff --git a/arch/mips/net/bpf_jit.c b/arch/mips/net/bpf_jit.c
index b87390a56a2f..05a56619ece2 100644
--- a/arch/mips/net/bpf_jit.c
+++ b/arch/mips/net/bpf_jit.c
@@ -131,7 +131,7 @@
131 * @target: Memory location for the compiled filter 131 * @target: Memory location for the compiled filter
132 */ 132 */
133struct jit_ctx { 133struct jit_ctx {
134 const struct sk_filter *skf; 134 const struct bpf_prog *skf;
135 unsigned int prologue_bytes; 135 unsigned int prologue_bytes;
136 u32 idx; 136 u32 idx;
137 u32 flags; 137 u32 flags;
@@ -789,7 +789,7 @@ static int pkt_type_offset(void)
789static int build_body(struct jit_ctx *ctx) 789static int build_body(struct jit_ctx *ctx)
790{ 790{
791 void *load_func[] = {jit_get_skb_b, jit_get_skb_h, jit_get_skb_w}; 791 void *load_func[] = {jit_get_skb_b, jit_get_skb_h, jit_get_skb_w};
792 const struct sk_filter *prog = ctx->skf; 792 const struct bpf_prog *prog = ctx->skf;
793 const struct sock_filter *inst; 793 const struct sock_filter *inst;
794 unsigned int i, off, load_order, condt; 794 unsigned int i, off, load_order, condt;
795 u32 k, b_off __maybe_unused; 795 u32 k, b_off __maybe_unused;
@@ -1369,7 +1369,7 @@ jmp_cmp:
1369 1369
1370int bpf_jit_enable __read_mostly; 1370int bpf_jit_enable __read_mostly;
1371 1371
1372void bpf_jit_compile(struct sk_filter *fp) 1372void bpf_jit_compile(struct bpf_prog *fp)
1373{ 1373{
1374 struct jit_ctx ctx; 1374 struct jit_ctx ctx;
1375 unsigned int alloc_size, tmp_idx; 1375 unsigned int alloc_size, tmp_idx;
@@ -1423,7 +1423,7 @@ out:
1423 kfree(ctx.offsets); 1423 kfree(ctx.offsets);
1424} 1424}
1425 1425
1426void bpf_jit_free(struct sk_filter *fp) 1426void bpf_jit_free(struct bpf_prog *fp)
1427{ 1427{
1428 if (fp->jited) 1428 if (fp->jited)
1429 module_free(NULL, fp->bpf_func); 1429 module_free(NULL, fp->bpf_func);
diff --git a/arch/powerpc/net/bpf_jit_comp.c b/arch/powerpc/net/bpf_jit_comp.c
index 82e82cadcde5..3afa6f4c1957 100644
--- a/arch/powerpc/net/bpf_jit_comp.c
+++ b/arch/powerpc/net/bpf_jit_comp.c
@@ -25,7 +25,7 @@ static inline void bpf_flush_icache(void *start, void *end)
25 flush_icache_range((unsigned long)start, (unsigned long)end); 25 flush_icache_range((unsigned long)start, (unsigned long)end);
26} 26}
27 27
28static void bpf_jit_build_prologue(struct sk_filter *fp, u32 *image, 28static void bpf_jit_build_prologue(struct bpf_prog *fp, u32 *image,
29 struct codegen_context *ctx) 29 struct codegen_context *ctx)
30{ 30{
31 int i; 31 int i;
@@ -121,7 +121,7 @@ static void bpf_jit_build_epilogue(u32 *image, struct codegen_context *ctx)
121 ((int)K < 0 ? ((int)K >= SKF_LL_OFF ? func##_negative_offset : func) : func##_positive_offset) 121 ((int)K < 0 ? ((int)K >= SKF_LL_OFF ? func##_negative_offset : func) : func##_positive_offset)
122 122
123/* Assemble the body code between the prologue & epilogue. */ 123/* Assemble the body code between the prologue & epilogue. */
124static int bpf_jit_build_body(struct sk_filter *fp, u32 *image, 124static int bpf_jit_build_body(struct bpf_prog *fp, u32 *image,
125 struct codegen_context *ctx, 125 struct codegen_context *ctx,
126 unsigned int *addrs) 126 unsigned int *addrs)
127{ 127{
@@ -569,7 +569,7 @@ static int bpf_jit_build_body(struct sk_filter *fp, u32 *image,
569 return 0; 569 return 0;
570} 570}
571 571
572void bpf_jit_compile(struct sk_filter *fp) 572void bpf_jit_compile(struct bpf_prog *fp)
573{ 573{
574 unsigned int proglen; 574 unsigned int proglen;
575 unsigned int alloclen; 575 unsigned int alloclen;
@@ -693,7 +693,7 @@ out:
693 return; 693 return;
694} 694}
695 695
696void bpf_jit_free(struct sk_filter *fp) 696void bpf_jit_free(struct bpf_prog *fp)
697{ 697{
698 if (fp->jited) 698 if (fp->jited)
699 module_free(NULL, fp->bpf_func); 699 module_free(NULL, fp->bpf_func);
diff --git a/arch/s390/net/bpf_jit_comp.c b/arch/s390/net/bpf_jit_comp.c
index a2cbd875543a..61e45b7c04d7 100644
--- a/arch/s390/net/bpf_jit_comp.c
+++ b/arch/s390/net/bpf_jit_comp.c
@@ -812,7 +812,7 @@ static struct bpf_binary_header *bpf_alloc_binary(unsigned int bpfsize,
812 return header; 812 return header;
813} 813}
814 814
815void bpf_jit_compile(struct sk_filter *fp) 815void bpf_jit_compile(struct bpf_prog *fp)
816{ 816{
817 struct bpf_binary_header *header = NULL; 817 struct bpf_binary_header *header = NULL;
818 unsigned long size, prg_len, lit_len; 818 unsigned long size, prg_len, lit_len;
@@ -875,7 +875,7 @@ out:
875 kfree(addrs); 875 kfree(addrs);
876} 876}
877 877
878void bpf_jit_free(struct sk_filter *fp) 878void bpf_jit_free(struct bpf_prog *fp)
879{ 879{
880 unsigned long addr = (unsigned long)fp->bpf_func & PAGE_MASK; 880 unsigned long addr = (unsigned long)fp->bpf_func & PAGE_MASK;
881 struct bpf_binary_header *header = (void *)addr; 881 struct bpf_binary_header *header = (void *)addr;
diff --git a/arch/sparc/net/bpf_jit_comp.c b/arch/sparc/net/bpf_jit_comp.c
index 892a102671ad..1f76c22a6a75 100644
--- a/arch/sparc/net/bpf_jit_comp.c
+++ b/arch/sparc/net/bpf_jit_comp.c
@@ -354,7 +354,7 @@ do { *prog++ = BR_OPC | WDISP22(OFF); \
354 * emit_jump() calls with adjusted offsets. 354 * emit_jump() calls with adjusted offsets.
355 */ 355 */
356 356
357void bpf_jit_compile(struct sk_filter *fp) 357void bpf_jit_compile(struct bpf_prog *fp)
358{ 358{
359 unsigned int cleanup_addr, proglen, oldproglen = 0; 359 unsigned int cleanup_addr, proglen, oldproglen = 0;
360 u32 temp[8], *prog, *func, seen = 0, pass; 360 u32 temp[8], *prog, *func, seen = 0, pass;
@@ -808,7 +808,7 @@ out:
808 return; 808 return;
809} 809}
810 810
811void bpf_jit_free(struct sk_filter *fp) 811void bpf_jit_free(struct bpf_prog *fp)
812{ 812{
813 if (fp->jited) 813 if (fp->jited)
814 module_free(NULL, fp->bpf_func); 814 module_free(NULL, fp->bpf_func);
diff --git a/arch/x86/net/bpf_jit_comp.c b/arch/x86/net/bpf_jit_comp.c
index 99bef86ed6df..5c8cb8043c5a 100644
--- a/arch/x86/net/bpf_jit_comp.c
+++ b/arch/x86/net/bpf_jit_comp.c
@@ -211,10 +211,10 @@ struct jit_context {
211 bool seen_ld_abs; 211 bool seen_ld_abs;
212}; 212};
213 213
214static int do_jit(struct sk_filter *bpf_prog, int *addrs, u8 *image, 214static int do_jit(struct bpf_prog *bpf_prog, int *addrs, u8 *image,
215 int oldproglen, struct jit_context *ctx) 215 int oldproglen, struct jit_context *ctx)
216{ 216{
217 struct sock_filter_int *insn = bpf_prog->insnsi; 217 struct bpf_insn *insn = bpf_prog->insnsi;
218 int insn_cnt = bpf_prog->len; 218 int insn_cnt = bpf_prog->len;
219 u8 temp[64]; 219 u8 temp[64];
220 int i; 220 int i;
@@ -235,7 +235,7 @@ static int do_jit(struct sk_filter *bpf_prog, int *addrs, u8 *image,
235 /* mov qword ptr [rbp-X],rbx */ 235 /* mov qword ptr [rbp-X],rbx */
236 EMIT3_off32(0x48, 0x89, 0x9D, -stacksize); 236 EMIT3_off32(0x48, 0x89, 0x9D, -stacksize);
237 237
238 /* sk_convert_filter() maps classic BPF register X to R7 and uses R8 238 /* bpf_convert_filter() maps classic BPF register X to R7 and uses R8
239 * as temporary, so all tcpdump filters need to spill/fill R7(r13) and 239 * as temporary, so all tcpdump filters need to spill/fill R7(r13) and
240 * R8(r14). R9(r15) spill could be made conditional, but there is only 240 * R8(r14). R9(r15) spill could be made conditional, but there is only
241 * one 'bpf_error' return path out of helper functions inside bpf_jit.S 241 * one 'bpf_error' return path out of helper functions inside bpf_jit.S
@@ -841,7 +841,7 @@ common_load: ctx->seen_ld_abs = true;
841 /* By design x64 JIT should support all BPF instructions 841 /* By design x64 JIT should support all BPF instructions
842 * This error will be seen if new instruction was added 842 * This error will be seen if new instruction was added
843 * to interpreter, but not to JIT 843 * to interpreter, but not to JIT
844 * or if there is junk in sk_filter 844 * or if there is junk in bpf_prog
845 */ 845 */
846 pr_err("bpf_jit: unknown opcode %02x\n", insn->code); 846 pr_err("bpf_jit: unknown opcode %02x\n", insn->code);
847 return -EINVAL; 847 return -EINVAL;
@@ -862,11 +862,11 @@ common_load: ctx->seen_ld_abs = true;
862 return proglen; 862 return proglen;
863} 863}
864 864
865void bpf_jit_compile(struct sk_filter *prog) 865void bpf_jit_compile(struct bpf_prog *prog)
866{ 866{
867} 867}
868 868
869void bpf_int_jit_compile(struct sk_filter *prog) 869void bpf_int_jit_compile(struct bpf_prog *prog)
870{ 870{
871 struct bpf_binary_header *header = NULL; 871 struct bpf_binary_header *header = NULL;
872 int proglen, oldproglen = 0; 872 int proglen, oldproglen = 0;
@@ -932,7 +932,7 @@ out:
932 932
933static void bpf_jit_free_deferred(struct work_struct *work) 933static void bpf_jit_free_deferred(struct work_struct *work)
934{ 934{
935 struct sk_filter *fp = container_of(work, struct sk_filter, work); 935 struct bpf_prog *fp = container_of(work, struct bpf_prog, work);
936 unsigned long addr = (unsigned long)fp->bpf_func & PAGE_MASK; 936 unsigned long addr = (unsigned long)fp->bpf_func & PAGE_MASK;
937 struct bpf_binary_header *header = (void *)addr; 937 struct bpf_binary_header *header = (void *)addr;
938 938
@@ -941,7 +941,7 @@ static void bpf_jit_free_deferred(struct work_struct *work)
941 kfree(fp); 941 kfree(fp);
942} 942}
943 943
944void bpf_jit_free(struct sk_filter *fp) 944void bpf_jit_free(struct bpf_prog *fp)
945{ 945{
946 if (fp->jited) { 946 if (fp->jited) {
947 INIT_WORK(&fp->work, bpf_jit_free_deferred); 947 INIT_WORK(&fp->work, bpf_jit_free_deferred);