Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
authorLinus Torvalds <torvalds@linux-foundation.org>
Sat, 18 Oct 2014 16:31:37 +0000 (09:31 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 18 Oct 2014 16:31:37 +0000 (09:31 -0700)
Pull networking fixes from David Miller:

 1) Include fixes for netrom and dsa (Fabian Frederick and Florian
    Fainelli)

 2) Fix FIXED_PHY support in stmmac, from Giuseppe CAVALLARO.

 3) Several SKB use after free fixes (vxlan, openvswitch, vxlan,
    ip_tunnel, fou), from Li ROngQing.

 4) fec driver PTP support fixes from Luwei Zhou and Nimrod Andy.

 5) Use after free in virtio_net, from Michael S Tsirkin.

 6) Fix flow mask handling for megaflows in openvswitch, from Pravin B
    Shelar.

 7) ISDN gigaset and capi bug fixes from Tilman Schmidt.

 8) Fix route leak in ip_send_unicast_reply(), from Vasily Averin.

 9) Fix two eBPF JIT bugs on x86, from Alexei Starovoitov.

10) TCP_SKB_CB() reorganization caused a few regressions, fixed by Cong
    Wang and Eric Dumazet.

11) Don't overwrite end of SKB when parsing malformed sctp ASCONF
    chunks, from Daniel Borkmann.

12) Don't call sock_kfree_s() with NULL pointers, this function also has
    the side effect of adjusting the socket memory usage.  From Cong Wang.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (90 commits)
  bna: fix skb->truesize underestimation
  net: dsa: add includes for ethtool and phy_fixed definitions
  openvswitch: Set flow-key members.
  netrom: use linux/uaccess.h
  dsa: Fix conversion from host device to mii bus
  tipc: fix bug in bundled buffer reception
  ipv6: introduce tcp_v6_iif()
  sfc: add support for skb->xmit_more
  r8152: return -EBUSY for runtime suspend
  ipv4: fix a potential use after free in fou.c
  ipv4: fix a potential use after free in ip_tunnel_core.c
  hyperv: Add handling of IP header with option field in netvsc_set_hash()
  openvswitch: Create right mask with disabled megaflows
  vxlan: fix a free after use
  openvswitch: fix a use after free
  ipv4: dst_entry leak in ip_send_unicast_reply()
  ipv4: clean up cookie_v4_check()
  ipv4: share tcp_v4_save_options() with cookie_v4_check()
  ipv4: call __ip_options_echo() in cookie_v4_check()
  atm: simplify lanai.c by using module_pci_driver
  ...

1  2 
MAINTAINERS
arch/arm64/boot/dts/apm-mustang.dts
arch/arm64/boot/dts/apm-storm.dtsi
drivers/net/xen-netfront.c
include/uapi/linux/Kbuild
net/core/dev.c
net/ipv4/syncookies.c
net/ipv4/tcp_output.c
net/ipv6/syncookies.c

diff --combined MAINTAINERS
index b0f17d59078eef2185695c34bbf44610d398455f,6dc0840c1aa28a1a17810904a5a58ddfa7d033c7..d61b727fbfa843827d3e86fef1b84e001473c3d8
@@@ -564,7 -564,7 +564,7 @@@ L: linux-alpha@vger.kernel.or
  F:    arch/alpha/
  
  ALTERA TRIPLE SPEED ETHERNET DRIVER
- M:    Vince Bridgers <vbridgers2013@gmail.com>
+ M:    Vince Bridgers <vbridger@opensource.altera.com>
  L:    netdev@vger.kernel.org
  L:    nios2-dev@lists.rocketboards.org (moderated for non-subscribers)
  S:    Maintained
@@@ -1338,7 -1338,8 +1338,7 @@@ ARM/SAMSUNG MOBILE MACHINE SUPPOR
  M:    Kyungmin Park <kyungmin.park@samsung.com>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  S:    Maintained
 -F:    arch/arm/mach-s5pv210/mach-aquila.c
 -F:    arch/arm/mach-s5pv210/mach-goni.c
 +F:    arch/arm/mach-s5pv210/
  
  ARM/SAMSUNG S5P SERIES 2D GRAPHICS ACCELERATION (G2D) SUPPORT
  M:    Kyungmin Park <kyungmin.park@samsung.com>
@@@ -1549,7 -1550,6 +1549,7 @@@ T:      git git://git.xilinx.com/linux-xlnx.
  S:    Supported
  F:    arch/arm/mach-zynq/
  F:    drivers/cpuidle/cpuidle-zynq.c
 +F:    drivers/block/xsysace.c
  N:    zynq
  N:    xilinx
  F:    drivers/clocksource/cadence_ttc_timer.c
@@@ -1738,12 -1738,6 +1738,12 @@@ M:    Nicolas Ferre <nicolas.ferre@atmel.c
  S:    Supported
  F:    drivers/net/ethernet/cadence/
  
 +ATMEL NAND DRIVER
 +M:    Josh Wu <josh.wu@atmel.com>
 +L:    linux-mtd@lists.infradead.org
 +S:    Supported
 +F:    drivers/mtd/nand/atmel_nand*
 +
  ATMEL SPI DRIVER
  M:    Nicolas Ferre <nicolas.ferre@atmel.com>
  S:    Supported
@@@ -2766,18 -2760,6 +2766,18 @@@ W:    http://www.chelsio.co
  S:    Supported
  F:    drivers/net/ethernet/chelsio/cxgb4vf/
  
 +CXL (IBM Coherent Accelerator Processor Interface CAPI) DRIVER
 +M:    Ian Munsie <imunsie@au1.ibm.com>
 +M:    Michael Neuling <mikey@neuling.org>
 +L:    linuxppc-dev@lists.ozlabs.org
 +S:    Supported
 +F:    drivers/misc/cxl/
 +F:    include/misc/cxl.h
 +F:    include/uapi/misc/cxl.h
 +F:    Documentation/powerpc/cxl.txt
 +F:    Documentation/powerpc/cxl.txt
 +F:    Documentation/ABI/testing/sysfs-class-cxl
 +
  STMMAC ETHERNET DRIVER
  M:    Giuseppe Cavallaro <peppe.cavallaro@st.com>
  L:    netdev@vger.kernel.org
@@@ -3054,7 -3036,7 +3054,7 @@@ M:      Sumit Semwal <sumit.semwal@linaro.or
  S:    Maintained
  L:    linux-media@vger.kernel.org
  L:    dri-devel@lists.freedesktop.org
 -L:    linaro-mm-sig@lists.linaro.org
 +L:    linaro-mm-sig@lists.linaro.org (moderated for non-subscribers)
  F:    drivers/dma-buf/
  F:    include/linux/dma-buf*
  F:    include/linux/reservation.h
@@@ -3164,7 -3146,7 +3164,7 @@@ F:      include/drm/drm_panel.
  F:    Documentation/devicetree/bindings/panel/
  
  INTEL DRM DRIVERS (excluding Poulsbo, Moorestown and derivative chipsets)
 -M:    Daniel Vetter <daniel.vetter@ffwll.ch>
 +M:    Daniel Vetter <daniel.vetter@intel.com>
  M:    Jani Nikula <jani.nikula@linux.intel.com>
  L:    intel-gfx@lists.freedesktop.org
  L:    dri-devel@lists.freedesktop.org
@@@ -4250,16 -4232,6 +4250,16 @@@ L:    linuxppc-dev@lists.ozlabs.or
  S:    Odd Fixes
  F:    drivers/tty/hvc/
  
 +HACKRF MEDIA DRIVER
 +M:    Antti Palosaari <crope@iki.fi>
 +L:    linux-media@vger.kernel.org
 +W:    http://linuxtv.org/
 +W:    http://palosaari.fi/linux/
 +Q:    http://patchwork.linuxtv.org/project/linux-media/list/
 +T:    git git://linuxtv.org/anttip/media_tree.git
 +S:    Maintained
 +F:    drivers/media/usb/hackrf/
 +
  HARDWARE MONITORING
  M:    Jean Delvare <jdelvare@suse.de>
  M:    Guenter Roeck <linux@roeck-us.net>
@@@ -4303,8 -4275,9 +4303,8 @@@ S:      Maintaine
  F:    drivers/media/dvb-frontends/hd29l2*
  
  HEWLETT-PACKARD SMART2 RAID DRIVER
 -M:    Chirag Kantharia <chirag.kantharia@hp.com>
  L:    iss_storagedev@hp.com
 -S:    Maintained
 +S:    Orphan
  F:    Documentation/blockdev/cpqarray.txt
  F:    drivers/block/cpqarray.*
  
@@@ -5071,7 -5044,6 +5071,7 @@@ L:      linux-kernel@vger.kernel.or
  S:    Maintained
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq/core
  T:    git git://git.infradead.org/users/jcooper/linux.git irqchip/core
 +F:    Documentation/devicetree/bindings/interrupt-controller/
  F:    drivers/irqchip/
  
  IRQ DOMAINS (IRQ NUMBER MAPPING LIBRARY)
@@@ -5157,7 -5129,7 +5157,7 @@@ W:      http://palosaari.fi/linux
  Q:    http://patchwork.linuxtv.org/project/linux-media/list/
  T:    git git://linuxtv.org/anttip/media_tree.git
  S:    Maintained
 -F:    drivers/media/tuners/tuner_it913x*
 +F:    drivers/media/tuners/it913x*
  
  IVTV VIDEO4LINUX DRIVER
  M:    Andy Walls <awalls@md.metrocast.net>
@@@ -5305,13 -5277,6 +5305,13 @@@ F:    include/linux/lockd
  F:    include/linux/sunrpc/
  F:    include/uapi/linux/sunrpc/
  
 +KERNEL SELFTEST FRAMEWORK
 +M:    Shuah Khan <shuahkh@osg.samsung.com>
 +L:    linux-api@vger.kernel.org
 +T:    git git://git.kernel.org/pub/scm/shuah/linux-kselftest
 +S:    Maintained
 +F:    tools/testing/selftests
 +
  KERNEL VIRTUAL MACHINE (KVM)
  M:    Gleb Natapov <gleb@kernel.org>
  M:    Paolo Bonzini <pbonzini@redhat.com>
@@@ -5692,8 -5657,8 +5692,8 @@@ M:      Ingo Molnar <mingo@redhat.com
  L:    linux-kernel@vger.kernel.org
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git core/locking
  S:    Maintained
 -F:    Documentation/lockdep*.txt
 -F:    Documentation/lockstat.txt
 +F:    Documentation/locking/lockdep*.txt
 +F:    Documentation/locking/lockstat.txt
  F:    include/linux/lockdep.h
  F:    kernel/locking/
  
@@@ -5758,8 -5723,11 +5758,8 @@@ T:     git git://github.com/linux-test-proj
  S:    Maintained
  
  M32R ARCHITECTURE
 -M:    Hirokazu Takata <takata@linux-m32r.org>
 -L:    linux-m32r@ml.linux-m32r.org (moderated for non-subscribers)
 -L:    linux-m32r-ja@ml.linux-m32r.org (in Japanese)
  W:    http://www.linux-m32r.org/
 -S:    Maintained
 +S:    Orphan
  F:    arch/m32r/
  
  M68K ARCHITECTURE
@@@ -6010,15 -5978,6 +6010,15 @@@ S:    Supporte
  F:    drivers/mcb/
  F:    include/linux/mcb.h
  
 +MEN F21BMC (Board Management Controller)
 +M:    Andreas Werner <andreas.werner@men.de>
 +S:    Supported
 +F:    drivers/mfd/menf21bmc.c
 +F:    drivers/watchdog/menf21bmc_wdt.c
 +F:    drivers/leds/leds-menf21bmc.c
 +F:    drivers/hwmon/menf21bmc_hwmon.c
 +F:    Documentation/hwmon/menf21bmc
 +
  METAG ARCHITECTURE
  M:    James Hogan <james.hogan@imgtec.com>
  L:    linux-metag@vger.kernel.org
@@@ -6645,9 -6604,10 +6645,9 @@@ S:     Maintaine
  F:    drivers/mmc/host/omap.c
  
  OMAP HS MMC SUPPORT
 -M:    Balaji T K <balajitk@ti.com>
  L:    linux-mmc@vger.kernel.org
  L:    linux-omap@vger.kernel.org
 -S:    Maintained
 +S:    Orphan
  F:    drivers/mmc/host/omap_hsmmc.c
  
  OMAP RANDOM NUMBER GENERATOR SUPPORT
@@@ -6977,14 -6937,6 +6977,14 @@@ F:    include/linux/pci
  F:    arch/x86/pci/
  F:    arch/x86/kernel/quirks.c
  
 +PCI DRIVER FOR APPLIEDMICRO XGENE
 +M:    Tanmay Inamdar <tinamdar@apm.com>
 +L:    linux-pci@vger.kernel.org
 +L:    linux-arm-kernel@lists.infradead.org
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/pci/xgene-pci.txt
 +F:    drivers/pci/host/pci-xgene.c
 +
  PCI DRIVER FOR IMX6
  M:    Richard Zhu <r65037@freescale.com>
  M:    Lucas Stach <l.stach@pengutronix.de>
@@@ -6993,13 -6945,6 +6993,13 @@@ L:    linux-arm-kernel@lists.infradead.or
  S:    Maintained
  F:    drivers/pci/host/*imx6*
  
 +PCI DRIVER FOR TI KEYSTONE
 +M:    Murali Karicheri <m-karicheri2@ti.com>
 +L:    linux-pci@vger.kernel.org
 +L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 +S:    Maintained
 +F:    drivers/pci/host/*keystone*
 +
  PCI DRIVER FOR MVEBU (Marvell Armada 370 and Armada XP SOC support)
  M:    Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  M:    Jason Cooper <jason@lakedaemon.net>
@@@ -7402,14 -7347,6 +7402,14 @@@ T:    git git://linuxtv.org/media_tree.gi
  S:    Maintained
  F:    drivers/media/usb/pwc/*
  
 +PWM FAN DRIVER
 +M:    Kamil Debski <k.debski@samsung.com>
 +L:    lm-sensors@lm-sensors.org
 +S:    Supported
 +F:    Documentation/devicetree/bindings/hwmon/pwm-fan.txt
 +F:    Documentation/hwmon/pwm-fan
 +F:    drivers/hwmon/pwm-fan.c
 +
  PWM SUBSYSTEM
  M:    Thierry Reding <thierry.reding@gmail.com>
  L:    linux-pwm@vger.kernel.org
@@@ -7992,6 -7929,7 +7992,6 @@@ S:      Supporte
  F:    drivers/mfd/sec*.c
  F:    drivers/regulator/s2m*.c
  F:    drivers/regulator/s5m*.c
 -F:    drivers/rtc/rtc-sec.c
  F:    include/linux/mfd/samsung/
  
  SAMSUNG S5P/EXYNOS4 SOC SERIES CAMERA SUBSYSTEM DRIVERS
@@@ -8215,8 -8153,6 +8215,8 @@@ F:      drivers/mmc/host/sdhci-pltfm.[ch
  
  SECURE COMPUTING
  M:    Kees Cook <keescook@chromium.org>
 +R:    Andy Lutomirski <luto@amacapital.net>
 +R:    Will Drewry <wad@chromium.org>
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git seccomp
  S:    Supported
  F:    kernel/seccomp.c
@@@ -8537,11 -8473,11 +8537,11 @@@ S:   Maintaine
  F:    Documentation/security/Smack.txt
  F:    security/smack/
  
 -SMARTREFLEX DRIVERS FOR ADAPTIVE VOLTAGE SCALING (AVS)
 +DRIVERS FOR ADAPTIVE VOLTAGE SCALING (AVS)
  M:    Kevin Hilman <khilman@kernel.org>
  M:    Nishanth Menon <nm@ti.com>
  S:    Maintained
 -F:    drivers/power/avs/smartreflex.c
 +F:    drivers/power/avs/
  F:    include/linux/power/smartreflex.h
  L:    linux-pm@vger.kernel.org
  
@@@ -8711,14 -8647,6 +8711,14 @@@ F:    include/sound/dmaengine_pcm.
  F:    sound/core/pcm_dmaengine.c
  F:    sound/soc/soc-generic-dmaengine-pcm.c
  
 +SP2 MEDIA DRIVER
 +M:    Olli Salonen <olli.salonen@iki.fi>
 +L:    linux-media@vger.kernel.org
 +W:    http://linuxtv.org/
 +Q:    http://patchwork.linuxtv.org/project/linux-media/list/
 +S:    Maintained
 +F:    drivers/media/dvb-frontends/sp2*
 +
  SPARC + UltraSPARC (sparc/sparc64)
  M:    "David S. Miller" <davem@davemloft.net>
  L:    sparclinux@vger.kernel.org
@@@ -9422,14 -9350,6 +9422,14 @@@ T:    git git://linuxtv.org/media_tree.gi
  S:    Odd fixes
  F:    drivers/media/usb/tm6000/
  
 +TW68 VIDEO4LINUX DRIVER
 +M:    Hans Verkuil <hverkuil@xs4all.nl>
 +L:    linux-media@vger.kernel.org
 +T:    git git://linuxtv.org/media_tree.git
 +W:    http://linuxtv.org
 +S:    Odd Fixes
 +F:    drivers/media/pci/tw68/
 +
  TPM DEVICE DRIVER
  M:    Peter Huewe <peterhuewe@gmx.de>
  M:    Ashley Lai <ashley@ashleylai.com>
@@@ -9451,7 -9371,6 +9451,7 @@@ F:      include/*/ftrace.
  F:    include/linux/trace*.h
  F:    include/trace/
  F:    kernel/trace/
 +F:    tools/testing/selftests/ftrace/
  
  TRIVIAL PATCHES
  M:    Jiri Kosina <trivial@kernel.org>
@@@ -10299,15 -10218,6 +10299,15 @@@ S: Supporte
  F:    drivers/block/xen-blkback/*
  F:    drivers/block/xen*
  
 +XEN PVSCSI DRIVERS
 +M:    Juergen Gross <jgross@suse.com>
 +L:    xen-devel@lists.xenproject.org (moderated for non-subscribers)
 +L:    linux-scsi@vger.kernel.org
 +S:    Supported
 +F:    drivers/scsi/xen-scsifront.c
 +F:    drivers/xen/xen-scsiback.c
 +F:    include/xen/interface/io/vscsiif.h
 +
  XEN SWIOTLB SUBSYSTEM
  M:    Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
  L:    xen-devel@lists.xenproject.org (moderated for non-subscribers)
@@@ -10332,6 -10242,10 +10332,6 @@@ M:  John Linn <John.Linn@xilinx.com
  S:    Maintained
  F:    drivers/net/ethernet/xilinx/xilinx_axienet*
  
 -XILINX SYSTEMACE DRIVER
 -S:    Orphan
 -F:    drivers/block/xsysace.c
 -
  XILINX UARTLITE SERIAL DRIVER
  M:    Peter Korsgaard <jacmet@sunsite.dk>
  L:    linux-serial@vger.kernel.org
index 8eb6d94c785154cb3c29dba770cde5fed6eaec50,71a1489619c28acfffa47615b5edc49d1dcb6965..2e25de0800b9f061bebb4ee81c4c2ffaa1cf0dc9
        };
  };
  
 +&pcie0clk {
 +      status = "ok";
 +};
 +
 +&pcie0 {
 +      status = "ok";
 +};
 +
  &serial0 {
        status = "ok";
  };
        status = "ok";
  };
  
+ &sgenet0 {
+       status = "ok";
+ };
  &xgenet {
        status = "ok";
  };
index 87d3205e98d545fefb72d17f84ba51efef35a5b5,f45bbfe116d8679d57041ee0faec26859ead2447..295c72d52a1f7206f00a29305328f4f19a5f0705
                                clock-output-names = "menetclk";
                        };
  
+                       sge0clk: sge0clk@1f21c000 {
+                               compatible = "apm,xgene-device-clock";
+                               #clock-cells = <1>;
+                               clocks = <&socplldiv2 0>;
+                               reg = <0x0 0x1f21c000 0x0 0x1000>;
+                               reg-names = "csr-reg";
+                               csr-mask = <0x3>;
+                               clock-output-names = "sge0clk";
+                       };
                        xge0clk: xge0clk@1f61c000 {
                                compatible = "apm,xgene-device-clock";
                                #clock-cells = <1>;
                                enable-mask = <0x10>;
                                clock-output-names = "rngpkaclk";
                        };
 +
 +                      pcie0clk: pcie0clk@1f2bc000 {
 +                              status = "disabled";
 +                              compatible = "apm,xgene-device-clock";
 +                              #clock-cells = <1>;
 +                              clocks = <&socplldiv2 0>;
 +                              reg = <0x0 0x1f2bc000 0x0 0x1000>;
 +                              reg-names = "csr-reg";
 +                              clock-output-names = "pcie0clk";
 +                      };
 +
 +                      pcie1clk: pcie1clk@1f2cc000 {
 +                              status = "disabled";
 +                              compatible = "apm,xgene-device-clock";
 +                              #clock-cells = <1>;
 +                              clocks = <&socplldiv2 0>;
 +                              reg = <0x0 0x1f2cc000 0x0 0x1000>;
 +                              reg-names = "csr-reg";
 +                              clock-output-names = "pcie1clk";
 +                      };
 +
 +                      pcie2clk: pcie2clk@1f2dc000 {
 +                              status = "disabled";
 +                              compatible = "apm,xgene-device-clock";
 +                              #clock-cells = <1>;
 +                              clocks = <&socplldiv2 0>;
 +                              reg = <0x0 0x1f2dc000 0x0 0x1000>;
 +                              reg-names = "csr-reg";
 +                              clock-output-names = "pcie2clk";
 +                      };
 +
 +                      pcie3clk: pcie3clk@1f50c000 {
 +                              status = "disabled";
 +                              compatible = "apm,xgene-device-clock";
 +                              #clock-cells = <1>;
 +                              clocks = <&socplldiv2 0>;
 +                              reg = <0x0 0x1f50c000 0x0 0x1000>;
 +                              reg-names = "csr-reg";
 +                              clock-output-names = "pcie3clk";
 +                      };
 +
 +                      pcie4clk: pcie4clk@1f51c000 {
 +                              status = "disabled";
 +                              compatible = "apm,xgene-device-clock";
 +                              #clock-cells = <1>;
 +                              clocks = <&socplldiv2 0>;
 +                              reg = <0x0 0x1f51c000 0x0 0x1000>;
 +                              reg-names = "csr-reg";
 +                              clock-output-names = "pcie4clk";
 +                      };
 +              };
 +
 +              pcie0: pcie@1f2b0000 {
 +                      status = "disabled";
 +                      device_type = "pci";
 +                      compatible = "apm,xgene-storm-pcie", "apm,xgene-pcie";
 +                      #interrupt-cells = <1>;
 +                      #size-cells = <2>;
 +                      #address-cells = <3>;
 +                      reg = < 0x00 0x1f2b0000 0x0 0x00010000   /* Controller registers */
 +                              0xe0 0xd0000000 0x0 0x00040000>; /* PCI config space */
 +                      reg-names = "csr", "cfg";
 +                      ranges = <0x01000000 0x00 0x00000000 0xe0 0x10000000 0x00 0x00010000   /* io */
 +                                0x02000000 0x00 0x80000000 0xe1 0x80000000 0x00 0x80000000>; /* mem */
 +                      dma-ranges = <0x42000000 0x80 0x00000000 0x80 0x00000000 0x00 0x80000000
 +                                    0x42000000 0x00 0x00000000 0x00 0x00000000 0x80 0x00000000>;
 +                      interrupt-map-mask = <0x0 0x0 0x0 0x7>;
 +                      interrupt-map = <0x0 0x0 0x0 0x1 &gic 0x0 0xc2 0x1
 +                                       0x0 0x0 0x0 0x2 &gic 0x0 0xc3 0x1
 +                                       0x0 0x0 0x0 0x3 &gic 0x0 0xc4 0x1
 +                                       0x0 0x0 0x0 0x4 &gic 0x0 0xc5 0x1>;
 +                      dma-coherent;
 +                      clocks = <&pcie0clk 0>;
 +              };
 +
 +              pcie1: pcie@1f2c0000 {
 +                      status = "disabled";
 +                      device_type = "pci";
 +                      compatible = "apm,xgene-storm-pcie", "apm,xgene-pcie";
 +                      #interrupt-cells = <1>;
 +                      #size-cells = <2>;
 +                      #address-cells = <3>;
 +                      reg = < 0x00 0x1f2c0000 0x0 0x00010000   /* Controller registers */
 +                              0xd0 0xd0000000 0x0 0x00040000>; /* PCI config space */
 +                      reg-names = "csr", "cfg";
 +                      ranges = <0x01000000 0x0 0x00000000 0xd0 0x10000000 0x00 0x00010000   /* io  */
 +                                0x02000000 0x0 0x80000000 0xd1 0x80000000 0x00 0x80000000>; /* mem */
 +                      dma-ranges = <0x42000000 0x80 0x00000000 0x80 0x00000000 0x00 0x80000000
 +                                    0x42000000 0x00 0x00000000 0x00 0x00000000 0x80 0x00000000>;
 +                      interrupt-map-mask = <0x0 0x0 0x0 0x7>;
 +                      interrupt-map = <0x0 0x0 0x0 0x1 &gic 0x0 0xc8 0x1
 +                                       0x0 0x0 0x0 0x2 &gic 0x0 0xc9 0x1
 +                                       0x0 0x0 0x0 0x3 &gic 0x0 0xca 0x1
 +                                       0x0 0x0 0x0 0x4 &gic 0x0 0xcb 0x1>;
 +                      dma-coherent;
 +                      clocks = <&pcie1clk 0>;
 +              };
 +
 +              pcie2: pcie@1f2d0000 {
 +                      status = "disabled";
 +                      device_type = "pci";
 +                      compatible = "apm,xgene-storm-pcie", "apm,xgene-pcie";
 +                      #interrupt-cells = <1>;
 +                      #size-cells = <2>;
 +                      #address-cells = <3>;
 +                      reg =  < 0x00 0x1f2d0000 0x0 0x00010000   /* Controller registers */
 +                               0x90 0xd0000000 0x0 0x00040000>; /* PCI config space */
 +                      reg-names = "csr", "cfg";
 +                      ranges = <0x01000000 0x0 0x00000000 0x90 0x10000000 0x0 0x00010000   /* io  */
 +                                0x02000000 0x0 0x80000000 0x91 0x80000000 0x0 0x80000000>; /* mem */
 +                      dma-ranges = <0x42000000 0x80 0x00000000 0x80 0x00000000 0x00 0x80000000
 +                                    0x42000000 0x00 0x00000000 0x00 0x00000000 0x80 0x00000000>;
 +                      interrupt-map-mask = <0x0 0x0 0x0 0x7>;
 +                      interrupt-map = <0x0 0x0 0x0 0x1 &gic 0x0 0xce 0x1
 +                                       0x0 0x0 0x0 0x2 &gic 0x0 0xcf 0x1
 +                                       0x0 0x0 0x0 0x3 &gic 0x0 0xd0 0x1
 +                                       0x0 0x0 0x0 0x4 &gic 0x0 0xd1 0x1>;
 +                      dma-coherent;
 +                      clocks = <&pcie2clk 0>;
 +              };
 +
 +              pcie3: pcie@1f500000 {
 +                      status = "disabled";
 +                      device_type = "pci";
 +                      compatible = "apm,xgene-storm-pcie", "apm,xgene-pcie";
 +                      #interrupt-cells = <1>;
 +                      #size-cells = <2>;
 +                      #address-cells = <3>;
 +                      reg = < 0x00 0x1f500000 0x0 0x00010000   /* Controller registers */
 +                              0xa0 0xd0000000 0x0 0x00040000>; /* PCI config space */
 +                      reg-names = "csr", "cfg";
 +                      ranges = <0x01000000 0x0 0x00000000 0xa0 0x10000000 0x0 0x00010000   /* io   */
 +                                0x02000000 0x0 0x80000000 0xa1 0x80000000 0x0 0x80000000>; /* mem  */
 +                      dma-ranges = <0x42000000 0x80 0x00000000 0x80 0x00000000 0x00 0x80000000
 +                                    0x42000000 0x00 0x00000000 0x00 0x00000000 0x80 0x00000000>;
 +                      interrupt-map-mask = <0x0 0x0 0x0 0x7>;
 +                      interrupt-map = <0x0 0x0 0x0 0x1 &gic 0x0 0xd4 0x1
 +                                       0x0 0x0 0x0 0x2 &gic 0x0 0xd5 0x1
 +                                       0x0 0x0 0x0 0x3 &gic 0x0 0xd6 0x1
 +                                       0x0 0x0 0x0 0x4 &gic 0x0 0xd7 0x1>;
 +                      dma-coherent;
 +                      clocks = <&pcie3clk 0>;
 +              };
 +
 +              pcie4: pcie@1f510000 {
 +                      status = "disabled";
 +                      device_type = "pci";
 +                      compatible = "apm,xgene-storm-pcie", "apm,xgene-pcie";
 +                      #interrupt-cells = <1>;
 +                      #size-cells = <2>;
 +                      #address-cells = <3>;
 +                      reg = < 0x00 0x1f510000 0x0 0x00010000   /* Controller registers */
 +                              0xc0 0xd0000000 0x0 0x00200000>; /* PCI config space */
 +                      reg-names = "csr", "cfg";
 +                      ranges = <0x01000000 0x0 0x00000000 0xc0 0x10000000 0x0 0x00010000   /* io  */
 +                                0x02000000 0x0 0x80000000 0xc1 0x80000000 0x0 0x80000000>; /* mem */
 +                      dma-ranges = <0x42000000 0x80 0x00000000 0x80 0x00000000 0x00 0x80000000
 +                                    0x42000000 0x00 0x00000000 0x00 0x00000000 0x80 0x00000000>;
 +                      interrupt-map-mask = <0x0 0x0 0x0 0x7>;
 +                      interrupt-map = <0x0 0x0 0x0 0x1 &gic 0x0 0xda 0x1
 +                                       0x0 0x0 0x0 0x2 &gic 0x0 0xdb 0x1
 +                                       0x0 0x0 0x0 0x3 &gic 0x0 0xdc 0x1
 +                                       0x0 0x0 0x0 0x4 &gic 0x0 0xdd 0x1>;
 +                      dma-coherent;
 +                      clocks = <&pcie4clk 0>;
                };
  
                serial0: serial@1c020000 {
                        };
                };
  
+               sgenet0: ethernet@1f210000 {
+                       compatible = "apm,xgene-enet";
+                       status = "disabled";
+                       reg = <0x0 0x1f210000 0x0 0x10000>,
+                             <0x0 0x1f200000 0x0 0X10000>,
+                             <0x0 0x1B000000 0x0 0X20000>;
+                       reg-names = "enet_csr", "ring_csr", "ring_cmd";
+                       interrupts = <0x0 0xA0 0x4>;
+                       dma-coherent;
+                       clocks = <&sge0clk 0>;
+                       local-mac-address = [00 00 00 00 00 00];
+                       phy-connection-type = "sgmii";
+               };
                xgenet: ethernet@1f610000 {
                        compatible = "apm,xgene-enet";
                        status = "disabled";
index fa671442f420806224bc85ee5f6b5200f7b5478c,3c0b37574d05cfdc3d2a5d8c91c49ba360f1cf01..cca871346a0ff5cfe22ffbcdce0f8c973cf59214
@@@ -638,7 -638,7 +638,7 @@@ static int xennet_start_xmit(struct sk_
  
        if (unlikely(!netif_carrier_ok(dev) ||
                     (slots > 1 && !xennet_can_sg(dev)) ||
-                    netif_needs_gso(skb, netif_skb_features(skb)))) {
+                    netif_needs_gso(dev, skb, netif_skb_features(skb)))) {
                spin_unlock_irqrestore(&queue->tx_lock, flags);
                goto drop;
        }
@@@ -2300,6 -2300,12 +2300,6 @@@ static void xennet_sysfs_delif(struct n
  
  #endif /* CONFIG_SYSFS */
  
 -static const struct xenbus_device_id netfront_ids[] = {
 -      { "vif" },
 -      { "" }
 -};
 -
 -
  static int xennet_remove(struct xenbus_device *dev)
  {
        struct netfront_info *info = dev_get_drvdata(&dev->dev);
        return 0;
  }
  
 -static DEFINE_XENBUS_DRIVER(netfront, ,
 +static const struct xenbus_device_id netfront_ids[] = {
 +      { "vif" },
 +      { "" }
 +};
 +
 +static struct xenbus_driver netfront_driver = {
 +      .ids = netfront_ids,
        .probe = netfront_probe,
        .remove = xennet_remove,
        .resume = netfront_resume,
        .otherend_changed = netback_changed,
 -);
 +};
  
  static int __init netif_init(void)
  {
index 3cc8e1c2b99602fdfbaf24d34612613fcc073149,1115d68b150f8e9cabe2358f073aab668474fe3c..6cad97485bad7fd5803f2f48aa1d8c1894208be1
@@@ -68,6 -68,7 +68,7 @@@ header-y += binfmts.
  header-y += blkpg.h
  header-y += blktrace_api.h
  header-y += bpf.h
+ header-y += bpf_common.h
  header-y += bpqether.h
  header-y += bsg.h
  header-y += btrfs.h
@@@ -355,7 -356,6 +356,7 @@@ header-y += serio.
  header-y += shm.h
  header-y += signal.h
  header-y += signalfd.h
 +header-y += smiapp.h
  header-y += snmp.h
  header-y += sock_diag.h
  header-y += socket.h
diff --combined net/core/dev.c
index 6470716ddba41ee6688a51acf67c41574da2b95d,9f77a78c6b1c22ea84064241c38d0338ad6d5c20..b793e3521a3631319bf4d0e7c17c0c9a933331da
@@@ -2153,7 -2153,7 +2153,7 @@@ static inline void __netif_reschedule(s
        unsigned long flags;
  
        local_irq_save(flags);
 -      sd = &__get_cpu_var(softnet_data);
 +      sd = this_cpu_ptr(&softnet_data);
        q->next_sched = NULL;
        *sd->output_queue_tailp = q;
        sd->output_queue_tailp = &q->next_sched;
@@@ -2675,7 -2675,7 +2675,7 @@@ static struct sk_buff *validate_xmit_sk
        if (skb->encapsulation)
                features &= dev->hw_enc_features;
  
-       if (netif_needs_gso(skb, features)) {
+       if (netif_needs_gso(dev, skb, features)) {
                struct sk_buff *segs;
  
                segs = skb_gso_segment(skb, features);
@@@ -3233,7 -3233,7 +3233,7 @@@ static void rps_trigger_softirq(void *d
  static int rps_ipi_queued(struct softnet_data *sd)
  {
  #ifdef CONFIG_RPS
 -      struct softnet_data *mysd = &__get_cpu_var(softnet_data);
 +      struct softnet_data *mysd = this_cpu_ptr(&softnet_data);
  
        if (sd != mysd) {
                sd->rps_ipi_next = mysd->rps_ipi_list;
@@@ -3260,7 -3260,7 +3260,7 @@@ static bool skb_flow_limit(struct sk_bu
        if (qlen < (netdev_max_backlog >> 1))
                return false;
  
 -      sd = &__get_cpu_var(softnet_data);
 +      sd = this_cpu_ptr(&softnet_data);
  
        rcu_read_lock();
        fl = rcu_dereference(sd->flow_limit);
@@@ -3407,7 -3407,7 +3407,7 @@@ EXPORT_SYMBOL(netif_rx_ni)
  
  static void net_tx_action(struct softirq_action *h)
  {
 -      struct softnet_data *sd = &__get_cpu_var(softnet_data);
 +      struct softnet_data *sd = this_cpu_ptr(&softnet_data);
  
        if (sd->completion_queue) {
                struct sk_buff *clist;
@@@ -3832,7 -3832,7 +3832,7 @@@ EXPORT_SYMBOL(netif_receive_skb)
  static void flush_backlog(void *arg)
  {
        struct net_device *dev = arg;
 -      struct softnet_data *sd = &__get_cpu_var(softnet_data);
 +      struct softnet_data *sd = this_cpu_ptr(&softnet_data);
        struct sk_buff *skb, *tmp;
  
        rps_lock(sd);
@@@ -4379,7 -4379,7 +4379,7 @@@ void __napi_schedule(struct napi_struc
        unsigned long flags;
  
        local_irq_save(flags);
 -      ____napi_schedule(&__get_cpu_var(softnet_data), n);
 +      ____napi_schedule(this_cpu_ptr(&softnet_data), n);
        local_irq_restore(flags);
  }
  EXPORT_SYMBOL(__napi_schedule);
@@@ -4500,7 -4500,7 +4500,7 @@@ EXPORT_SYMBOL(netif_napi_del)
  
  static void net_rx_action(struct softirq_action *h)
  {
 -      struct softnet_data *sd = &__get_cpu_var(softnet_data);
 +      struct softnet_data *sd = this_cpu_ptr(&softnet_data);
        unsigned long time_limit = jiffies + 2;
        int budget = netdev_budget;
        void *have;
diff --combined net/ipv4/syncookies.c
index af660030e3c7f90ba4c6045a88eadd8339bbbdf4,d346303fac7753373e1673fdf5387fa3d73622a1..32b98d0207b48b07472f0954e327483900be08e6
@@@ -40,7 -40,7 +40,7 @@@ static u32 cookie_hash(__be32 saddr, __
  
        net_get_random_once(syncookie_secret, sizeof(syncookie_secret));
  
 -      tmp  = __get_cpu_var(ipv4_cookie_scratch);
 +      tmp  = this_cpu_ptr(ipv4_cookie_scratch);
        memcpy(tmp + 4, syncookie_secret[c], sizeof(syncookie_secret[c]));
        tmp[0] = (__force u32)saddr;
        tmp[1] = (__force u32)daddr;
@@@ -255,9 -255,9 +255,9 @@@ bool cookie_check_timestamp(struct tcp_
  }
  EXPORT_SYMBOL(cookie_check_timestamp);
  
- struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb,
-                            struct ip_options *opt)
+ struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb)
  {
+       struct ip_options *opt = &TCP_SKB_CB(skb)->header.h4.opt;
        struct tcp_options_received tcp_opt;
        struct inet_request_sock *ireq;
        struct tcp_request_sock *treq;
        /* We throwed the options of the initial SYN away, so we hope
         * the ACK carries the same options again (see RFC1122 4.2.3.8)
         */
-       if (opt && opt->optlen) {
-               int opt_size = sizeof(struct ip_options_rcu) + opt->optlen;
-               ireq->opt = kmalloc(opt_size, GFP_ATOMIC);
-               if (ireq->opt != NULL && ip_options_echo(&ireq->opt->opt, skb)) {
-                       kfree(ireq->opt);
-                       ireq->opt = NULL;
-               }
-       }
+       ireq->opt = tcp_v4_save_options(skb);
  
        if (security_inet_conn_request(sk, skb, req)) {
                reqsk_free(req);
        flowi4_init_output(&fl4, sk->sk_bound_dev_if, ireq->ir_mark,
                           RT_CONN_FLAGS(sk), RT_SCOPE_UNIVERSE, IPPROTO_TCP,
                           inet_sk_flowi_flags(sk),
-                          (opt && opt->srr) ? opt->faddr : ireq->ir_rmt_addr,
+                          opt->srr ? opt->faddr : ireq->ir_rmt_addr,
                           ireq->ir_loc_addr, th->source, th->dest);
        security_req_classify_flow(req, flowi4_to_flowi(&fl4));
        rt = ip_route_output_key(sock_net(sk), &fl4);
diff --combined net/ipv4/tcp_output.c
index becd98ce9a1c6292023720d641daadd9d8b30e0b,e13d7785722576b215c2e10149bf85fefe333897..3af21296d96788b899daaa25562301e38036e802
@@@ -839,26 -839,38 +839,38 @@@ void tcp_wfree(struct sk_buff *skb
  {
        struct sock *sk = skb->sk;
        struct tcp_sock *tp = tcp_sk(sk);
+       int wmem;
+       /* Keep one reference on sk_wmem_alloc.
+        * Will be released by sk_free() from here or tcp_tasklet_func()
+        */
+       wmem = atomic_sub_return(skb->truesize - 1, &sk->sk_wmem_alloc);
+       /* If this softirq is serviced by ksoftirqd, we are likely under stress.
+        * Wait until our queues (qdisc + devices) are drained.
+        * This gives :
+        * - less callbacks to tcp_write_xmit(), reducing stress (batches)
+        * - chance for incoming ACK (processed by another cpu maybe)
+        *   to migrate this flow (skb->ooo_okay will be eventually set)
+        */
+       if (wmem >= SKB_TRUESIZE(1) && this_cpu_ksoftirqd() == current)
+               goto out;
  
        if (test_and_clear_bit(TSQ_THROTTLED, &tp->tsq_flags) &&
            !test_and_set_bit(TSQ_QUEUED, &tp->tsq_flags)) {
                unsigned long flags;
                struct tsq_tasklet *tsq;
  
-               /* Keep a ref on socket.
-                * This last ref will be released in tcp_tasklet_func()
-                */
-               atomic_sub(skb->truesize - 1, &sk->sk_wmem_alloc);
                /* queue this socket to tasklet queue */
                local_irq_save(flags);
 -              tsq = &__get_cpu_var(tsq_tasklet);
 +              tsq = this_cpu_ptr(&tsq_tasklet);
                list_add(&tp->tsq_node, &tsq->head);
                tasklet_schedule(&tsq->tasklet);
                local_irq_restore(flags);
-       } else {
-               sock_wfree(skb);
+               return;
        }
+ out:
+       sk_free(sk);
  }
  
  /* This routine actually transmits TCP packets queued in by
@@@ -914,9 -926,13 +926,13 @@@ static int tcp_transmit_skb(struct soc
                tcp_ca_event(sk, CA_EVENT_TX_START);
  
        /* if no packet is in qdisc/device queue, then allow XPS to select
-        * another queue.
+        * another queue. We can be called from tcp_tsq_handler()
+        * which holds one reference to sk_wmem_alloc.
+        *
+        * TODO: Ideally, in-flight pure ACK packets should not matter here.
+        * One way to get this would be to set skb->truesize = 2 on them.
         */
-       skb->ooo_okay = sk_wmem_alloc_get(sk) == 0;
+       skb->ooo_okay = sk_wmem_alloc_get(sk) < SKB_TRUESIZE(1);
  
        skb_push(skb, tcp_header_size);
        skb_reset_transport_header(skb);
diff --combined net/ipv6/syncookies.c
index e25b633266c341fbbb3f530845e525bcde9a1c60,2a86a0f00f2b07620385f4e9a5d5abf762faab4d..2f25cb6347ca556a8c7418e327bbff2a715c1e6a
@@@ -67,7 -67,7 +67,7 @@@ static u32 cookie_hash(const struct in6
  
        net_get_random_once(syncookie6_secret, sizeof(syncookie6_secret));
  
 -      tmp  = __get_cpu_var(ipv6_cookie_scratch);
 +      tmp  = this_cpu_ptr(ipv6_cookie_scratch);
  
        /*
         * we have 320 bits of information to hash, copy in the remaining
@@@ -214,7 -214,7 +214,7 @@@ struct sock *cookie_v6_check(struct soc
        /* So that link locals have meaning */
        if (!sk->sk_bound_dev_if &&
            ipv6_addr_type(&ireq->ir_v6_rmt_addr) & IPV6_ADDR_LINKLOCAL)
-               ireq->ir_iif = inet6_iif(skb);
+               ireq->ir_iif = tcp_v6_iif(skb);
  
        ireq->ir_mark = inet_request_mark(sk, skb);