Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 26 Nov 2019 04:02:57 +0000 (20:02 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 26 Nov 2019 04:02:57 +0000 (20:02 -0800)
Pull networking updates from David Miller:
 "Another merge window, another pull full of stuff:

   1) Support alternative names for network devices, from Jiri Pirko.

   2) Introduce per-netns netdev notifiers, also from Jiri Pirko.

   3) Support MSG_PEEK in vsock/virtio, from Matias Ezequiel Vara
      Larsen.

   4) Allow compiling out the TLS TOE code, from Jakub Kicinski.

   5) Add several new tracepoints to the kTLS code, also from Jakub.

   6) Support set channels ethtool callback in ena driver, from Sameeh
      Jubran.

   7) New SCTP events SCTP_ADDR_ADDED, SCTP_ADDR_REMOVED,
      SCTP_ADDR_MADE_PRIM, and SCTP_SEND_FAILED_EVENT. From Xin Long.

   8) Add XDP support to mvneta driver, from Lorenzo Bianconi.

   9) Lots of netfilter hw offload fixes, cleanups and enhancements,
      from Pablo Neira Ayuso.

  10) PTP support for aquantia chips, from Egor Pomozov.

  11) Add UDP segmentation offload support to igb, ixgbe, and i40e. From
      Josh Hunt.

  12) Add smart nagle to tipc, from Jon Maloy.

  13) Support L2 field rewrite by TC offloads in bnxt_en, from Venkat
      Duvvuru.

  14) Add a flow mask cache to OVS, from Tonghao Zhang.

  15) Add XDP support to ice driver, from Maciej Fijalkowski.

  16) Add AF_XDP support to ice driver, from Krzysztof Kazimierczak.

  17) Support UDP GSO offload in atlantic driver, from Igor Russkikh.

  18) Support it in stmmac driver too, from Jose Abreu.

  19) Support TIPC encryption and auth, from Tuong Lien.

  20) Introduce BPF trampolines, from Alexei Starovoitov.

  21) Make page_pool API more numa friendly, from Saeed Mahameed.

  22) Introduce route hints to ipv4 and ipv6, from Paolo Abeni.

  23) Add UDP segmentation offload to cxgb4, Rahul Lakkireddy"

* git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next: (1857 commits)
  libbpf: Fix usage of u32 in userspace code
  mm: Implement no-MMU variant of vmalloc_user_node_flags
  slip: Fix use-after-free Read in slip_open
  net: dsa: sja1105: fix sja1105_parse_rgmii_delays()
  macvlan: schedule bc_work even if error
  enetc: add support Credit Based Shaper(CBS) for hardware offload
  net: phy: add helpers phy_(un)lock_mdio_bus
  mdio_bus: don't use managed reset-controller
  ax88179_178a: add ethtool_op_get_ts_info()
  mlxsw: spectrum_router: Fix use of uninitialized adjacency index
  mlxsw: spectrum_router: After underlay moves, demote conflicting tunnels
  bpf: Simplify __bpf_arch_text_poke poke type handling
  bpf: Introduce BPF_TRACE_x helper for the tracing tests
  bpf: Add bpf_jit_blinding_enabled for !CONFIG_BPF_JIT
  bpf, testing: Add various tail call test cases
  bpf, x86: Emit patchable direct jump as tail call
  bpf: Constant map key tracking for prog array pokes
  bpf: Add poke dependency tracking for prog array maps
  bpf: Add initial poke descriptor table for jit images
  bpf: Move owner type, jited info into array auxiliary data
  ...

1  2 
MAINTAINERS
drivers/crypto/chelsio/chtls/chtls_io.c
drivers/isdn/hardware/mISDN/mISDNisar.c
drivers/s390/cio/qdio.h
drivers/s390/cio/qdio_main.c
drivers/s390/net/qeth_l3.h
drivers/s390/net/qeth_l3_sys.c
kernel/events/core.c
net/core/filter.c
net/xfrm/Kconfig
tools/testing/selftests/net/tcp_mmap.c

diff --combined MAINTAINERS
@@@ -682,11 -682,11 +682,11 @@@ S:      Maintaine
  F:    Documentation/devicetree/bindings/opp/sun50i-nvmem-cpufreq.txt
  F:    drivers/cpufreq/sun50i-cpufreq-nvmem.c
  
 -ALLWINNER SECURITY SYSTEM
 +ALLWINNER CRYPTO DRIVERS
  M:    Corentin Labbe <clabbe.montjoie@gmail.com>
  L:    linux-crypto@vger.kernel.org
  S:    Maintained
 -F:    drivers/crypto/sunxi-ss/
 +F:    drivers/crypto/allwinner/
  
  ALLWINNER VPU DRIVER
  M:    Maxime Ripard <mripard@kernel.org>
@@@ -1182,14 -1182,21 +1182,21 @@@ S:   Maintaine
  F:    drivers/media/i2c/aptina-pll.*
  
  AQUANTIA ETHERNET DRIVER (atlantic)
- M:    Igor Russkikh <igor.russkikh@aquantia.com>
+ M:    Igor Russkikh <irusskikh@marvell.com>
  L:    netdev@vger.kernel.org
  S:    Supported
- W:    http://www.aquantia.com
+ W:    https://www.marvell.com/
  Q:    http://patchwork.ozlabs.org/project/netdev/list/
  F:    drivers/net/ethernet/aquantia/atlantic/
  F:    Documentation/networking/device_drivers/aquantia/atlantic.txt
  
+ AQUANTIA ETHERNET DRIVER PTP SUBSYSTEM
+ M:    Egor Pomozov <epomozov@marvell.com>
+ L:    netdev@vger.kernel.org
+ S:    Supported
+ W:    http://www.aquantia.com
+ F:    drivers/net/ethernet/aquantia/atlantic/aq_ptp*
  ARC FRAMEBUFFER DRIVER
  M:    Jaya Kumar <jayalk@intworks.biz>
  S:    Maintained
@@@ -1470,14 -1477,6 +1477,14 @@@ F:    drivers/soc/amlogic
  F:    drivers/rtc/rtc-meson*
  N:    meson
  
 +ARM/Amlogic Meson SoC Crypto Drivers
 +M:    Corentin Labbe <clabbe@baylibre.com>
 +L:    linux-crypto@vger.kernel.org
 +L:    linux-amlogic@lists.infradead.org
 +S:    Maintained
 +F:    drivers/crypto/amlogic/
 +F:    Documentation/devicetree/bindings/crypto/amlogic*
 +
  ARM/Amlogic Meson SoC Sound Drivers
  M:    Jerome Brunet <jbrunet@baylibre.com>
  L:    alsa-devel@alsa-project.org (moderated for non-subscribers)
@@@ -2619,7 -2618,6 +2626,7 @@@ S:      Maintaine
  F:    arch/arm64/
  X:    arch/arm64/boot/dts/
  F:    Documentation/arm64/
 +F:    tools/testing/selftests/arm64/
  
  AS3645A LED FLASH CONTROLLER DRIVER
  M:    Sakari Ailus <sakari.ailus@iki.fi>
@@@ -3604,13 -3602,6 +3611,13 @@@ S:    Maintaine
  F:    Documentation/devicetree/bindings/media/cdns,*.txt
  F:    drivers/media/platform/cadence/cdns-csi2*
  
 +CADENCE NAND DRIVER
 +M:    Piotr Sroka <piotrs@cadence.com>
 +L:    linux-mtd@lists.infradead.org
 +S:    Maintained
 +F:    drivers/mtd/nand/raw/cadence-nand-controller.c
 +F:    Documentation/devicetree/bindings/mtd/cadence-nand-controller.txt
 +
  CADET FM/AM RADIO RECEIVER DRIVER
  M:    Hans Verkuil <hverkuil@xs4all.nl>
  L:    linux-media@vger.kernel.org
@@@ -5062,10 -5053,14 +5069,14 @@@ M:   Ioana Radulescu <ruxandra.radulescu@
  L:    netdev@vger.kernel.org
  S:    Maintained
  F:    drivers/net/ethernet/freescale/dpaa2/dpaa2-eth*
+ F:    drivers/net/ethernet/freescale/dpaa2/dpaa2-mac*
  F:    drivers/net/ethernet/freescale/dpaa2/dpni*
+ F:    drivers/net/ethernet/freescale/dpaa2/dpmac*
  F:    drivers/net/ethernet/freescale/dpaa2/dpkg.h
  F:    drivers/net/ethernet/freescale/dpaa2/Makefile
  F:    drivers/net/ethernet/freescale/dpaa2/Kconfig
+ F:    Documentation/networking/device_drivers/freescale/dpaa2/ethernet-driver.rst
+ F:    Documentation/networking/device_drivers/freescale/dpaa2/mac-phy-support.rst
  
  DPAA2 ETHERNET SWITCH DRIVER
  M:    Ioana Radulescu <ruxandra.radulescu@nxp.com>
@@@ -6159,10 -6154,12 +6170,12 @@@ S:   Maintaine
  F:    Documentation/ABI/testing/sysfs-class-net-phydev
  F:    Documentation/devicetree/bindings/net/ethernet-phy.yaml
  F:    Documentation/devicetree/bindings/net/mdio*
+ F:    Documentation/devicetree/bindings/net/qca,ar803x.yaml
  F:    Documentation/networking/phy.rst
  F:    drivers/net/phy/
  F:    drivers/of/of_mdio.c
  F:    drivers/of/of_net.c
+ F:    include/dt-bindings/net/qca-ar803x.h
  F:    include/linux/*mdio*.h
  F:    include/linux/of_net.h
  F:    include/linux/phy.h
@@@ -7380,25 -7377,6 +7393,25 @@@ F:    include/uapi/linux/if_hippi.
  F:    net/802/hippi.c
  F:    drivers/net/hippi/
  
 +HISILICON SECURITY ENGINE V2 DRIVER (SEC2)
 +M:    Zaibo Xu <xuzaibo@huawei.com>
 +L:    linux-crypto@vger.kernel.org
 +S:    Maintained
 +F:    drivers/crypto/hisilicon/sec2/sec_crypto.c
 +F:    drivers/crypto/hisilicon/sec2/sec_main.c
 +F:    drivers/crypto/hisilicon/sec2/sec_crypto.h
 +F:    drivers/crypto/hisilicon/sec2/sec.h
 +F:    Documentation/ABI/testing/debugfs-hisi-sec
 +
 +HISILICON HIGH PERFORMANCE RSA ENGINE DRIVER (HPRE)
 +M:    Zaibo Xu <xuzaibo@huawei.com>
 +L:    linux-crypto@vger.kernel.org
 +S:    Maintained
 +F:    drivers/crypto/hisilicon/hpre/hpre_crypto.c
 +F:    drivers/crypto/hisilicon/hpre/hpre_main.c
 +F:    drivers/crypto/hisilicon/hpre/hpre.h
 +F:    Documentation/ABI/testing/debugfs-hisi-hpre
 +
  HISILICON NETWORK SUBSYSTEM 3 DRIVER (HNS3)
  M:    Yisen Zhuang <yisen.zhuang@huawei.com>
  M:    Salil Mehta <salil.mehta@huawei.com>
@@@ -7407,11 -7385,6 +7420,11 @@@ W:    http://www.hisilicon.co
  S:    Maintained
  F:    drivers/net/ethernet/hisilicon/hns3/
  
 +HISILICON TRUE RANDOM NUMBER GENERATOR V2 SUPPORT
 +M:    Zaibo Xu <xuzaibo@huawei.com>
 +S:    Maintained
 +F:    drivers/char/hw_random/hisi-trng-v2.c
 +
  HISILICON LPC BUS DRIVER
  M:    john.garry@huawei.com
  W:    http://www.hisilicon.com
@@@ -7457,6 -7430,7 +7470,6 @@@ S:      Maintaine
  F:    drivers/crypto/hisilicon/qm.c
  F:    drivers/crypto/hisilicon/qm.h
  F:    drivers/crypto/hisilicon/sgl.c
 -F:    drivers/crypto/hisilicon/sgl.h
  F:    drivers/crypto/hisilicon/zip/
  F:    Documentation/ABI/testing/debugfs-hisi-zip
  
@@@ -7482,8 -7456,8 +7495,8 @@@ F:      drivers/platform/x86/tc1100-wmi.
  
  HP100:        Driver for HP 10/100 Mbit/s Voice Grade Network Adapter Series
  M:    Jaroslav Kysela <perex@perex.cz>
- S:    Maintained
- F:    drivers/net/ethernet/hp/hp100.*
+ S:    Obsolete
+ F:    drivers/staging/hp/hp100.*
  
  HPET: High Precision Event Timers driver
  M:    Clemens Ladisch <clemens@ladisch.de>
@@@ -8603,13 -8577,12 +8616,13 @@@ F:   include/linux/iova.
  
  IO_URING
  M:    Jens Axboe <axboe@kernel.dk>
 -L:    linux-block@vger.kernel.org
 -L:    linux-fsdevel@vger.kernel.org
 +L:    io-uring@vger.kernel.org
  T:    git git://git.kernel.dk/linux-block
  T:    git git://git.kernel.dk/liburing
  S:    Maintained
  F:    fs/io_uring.c
 +F:    fs/io-wq.c
 +F:    fs/io-wq.h
  F:    include/uapi/linux/io_uring.h
  
  IPMI SUBSYSTEM
@@@ -8960,17 -8933,6 +8973,17 @@@ S:    Maintaine
  F:    tools/testing/selftests/
  F:    Documentation/dev-tools/kselftest*
  
 +KERNEL UNIT TESTING FRAMEWORK (KUnit)
 +M:    Brendan Higgins <brendanhiggins@google.com>
 +L:    linux-kselftest@vger.kernel.org
 +L:    kunit-dev@googlegroups.com
 +W:    https://google.github.io/kunit-docs/third_party/kernel/docs/
 +S:    Maintained
 +F:    Documentation/dev-tools/kunit/
 +F:    include/kunit/
 +F:    lib/kunit/
 +F:    tools/testing/kunit/
 +
  KERNEL USERMODE HELPER
  M:    Luis Chamberlain <mcgrof@kernel.org>
  L:    linux-kernel@vger.kernel.org
@@@ -9548,13 -9510,6 +9561,13 @@@ F:    Documentation/misc-devices/lis3lv02d
  F:    drivers/misc/lis3lv02d/
  F:    drivers/platform/x86/hp_accel.c
  
 +LIST KUNIT TEST
 +M:    David Gow <davidgow@google.com>
 +L:    linux-kselftest@vger.kernel.org
 +L:    kunit-dev@googlegroups.com
 +S:    Maintained
 +F:    lib/list-test.c
 +
  LIVE PATCHING
  M:    Josh Poimboeuf <jpoimboe@redhat.com>
  M:    Jiri Kosina <jikos@kernel.org>
@@@ -9798,6 -9753,7 +9811,7 @@@ S:      Maintaine
  F:    drivers/net/dsa/mv88e6xxx/
  F:    include/linux/platform_data/mv88e6xxx.h
  F:    Documentation/devicetree/bindings/net/dsa/marvell.txt
+ F:    Documentation/networking/devlink-params-mv88e6xxx.txt
  
  MARVELL ARMADA DRM SUPPORT
  M:    Russell King <linux@armlinux.org.uk>
@@@ -10594,13 -10550,15 +10608,13 @@@ F:        include/linux/vmalloc.
  F:    mm/
  
  MEMORY TECHNOLOGY DEVICES (MTD)
 -M:    David Woodhouse <dwmw2@infradead.org>
 -M:    Brian Norris <computersforpeace@gmail.com>
 -M:    Marek Vasut <marek.vasut@gmail.com>
  M:    Miquel Raynal <miquel.raynal@bootlin.com>
  M:    Richard Weinberger <richard@nod.at>
  M:    Vignesh Raghavendra <vigneshr@ti.com>
  L:    linux-mtd@lists.infradead.org
  W:    http://www.linux-mtd.infradead.org/
  Q:    http://patchwork.ozlabs.org/project/linux-mtd/list/
 +C:    irc://irc.oftc.net/mtd
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/fixes
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next
  S:    Maintained
@@@ -10877,6 -10835,7 +10891,7 @@@ M:   Microchip Linux Driver Support <UNGL
  L:    netdev@vger.kernel.org
  S:    Supported
  F:    drivers/net/ethernet/mscc/
+ F:    include/soc/mscc/ocelot*
  
  MICROSOFT SURFACE PRO 3 BUTTON DRIVER
  M:    Chen Yu <yu.c.chen@intel.com>
@@@ -10931,18 -10890,18 +10946,18 @@@ F:        arch/mips/include/asm/mach-loongson3
  F:    drivers/*/*loongson1*
  F:    drivers/*/*/*loongson1*
  
 -MIPS/LOONGSON2 ARCHITECTURE
 +MIPS/LOONGSON2EF ARCHITECTURE
  M:    Jiaxun Yang <jiaxun.yang@flygoat.com>
  L:    linux-mips@vger.kernel.org
  S:    Maintained
 -F:    arch/mips/loongson64/fuloong-2e/
 -F:    arch/mips/loongson64/lemote-2f/
 -F:    arch/mips/include/asm/mach-loongson64/
 +F:    arch/mips/loongson2ef/
 +F:    arch/mips/include/asm/mach-loongson2ef/
  F:    drivers/*/*loongson2*
  F:    drivers/*/*/*loongson2*
  
 -MIPS/LOONGSON3 ARCHITECTURE
 +MIPS/LOONGSON64 ARCHITECTURE
  M:    Huacai Chen <chenhc@lemote.com>
 +M:    Jiaxun Yang <jiaxun.yang@flygoat.com>
  L:    linux-mips@vger.kernel.org
  S:    Maintained
  F:    arch/mips/loongson64/
@@@ -11693,7 -11652,6 +11708,7 @@@ F:   drivers/nvme/target/fcloop.
  NVM EXPRESS TARGET DRIVER
  M:    Christoph Hellwig <hch@lst.de>
  M:    Sagi Grimberg <sagi@grimberg.me>
 +M:    Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
  L:    linux-nvme@lists.infradead.org
  T:    git://git.infradead.org/nvme.git
  W:    http://git.infradead.org/nvme.git
@@@ -12892,7 -12850,6 +12907,7 @@@ S:   Maintaine
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux.git
  F:    samples/pidfd/
  F:    tools/testing/selftests/pidfd/
 +F:    tools/testing/selftests/clone3/
  K:    (?i)pidfd
  K:    (?i)clone3
  K:    \b(clone_args|kernel_clone_args)\b
@@@ -13190,14 -13147,12 +13205,14 @@@ F:        Documentation/filesystems/proc.tx
  PROC SYSCTL
  M:    Luis Chamberlain <mcgrof@kernel.org>
  M:    Kees Cook <keescook@chromium.org>
 +M:    Iurii Zaikin <yzaikin@google.com>
  L:    linux-kernel@vger.kernel.org
  L:    linux-fsdevel@vger.kernel.org
  S:    Maintained
  F:    fs/proc/proc_sysctl.c
  F:    include/linux/sysctl.h
  F:    kernel/sysctl.c
 +F:    kernel/sysctl-test.c
  F:    tools/testing/selftests/sysctl/
  
  PS3 NETWORK SUPPORT
@@@ -13881,7 -13836,7 +13896,7 @@@ R:   Sergei Shtylyov <sergei.shtylyov@cog
  L:    netdev@vger.kernel.org
  L:    linux-renesas-soc@vger.kernel.org
  F:    Documentation/devicetree/bindings/net/renesas,*.txt
- F:    Documentation/devicetree/bindings/net/sh_eth.txt
+ F:    Documentation/devicetree/bindings/net/renesas,*.yaml
  F:    drivers/net/ethernet/renesas/
  F:    include/linux/sh_eth.h
  
@@@ -15354,6 -15309,7 +15369,6 @@@ F:   arch/arm/boot/dts/spear
  F:    arch/arm/mach-spear/
  
  SPI NOR SUBSYSTEM
 -M:    Marek Vasut <marek.vasut@gmail.com>
  M:    Tudor Ambarus <tudor.ambarus@microchip.com>
  L:    linux-mtd@lists.infradead.org
  W:    http://www.linux-mtd.infradead.org/
@@@ -16650,9 -16606,10 +16665,9 @@@ F:  drivers/media/pci/tw686x
  
  UBI FILE SYSTEM (UBIFS)
  M:    Richard Weinberger <richard@nod.at>
 -M:    Artem Bityutskiy <dedekind1@gmail.com>
 -M:    Adrian Hunter <adrian.hunter@intel.com>
  L:    linux-mtd@lists.infradead.org
 -T:    git git://git.infradead.org/ubifs-2.6.git
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs.git next
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs.git fixes
  W:    http://www.linux-mtd.infradead.org/doc/ubifs.html
  S:    Supported
  F:    Documentation/filesystems/ubifs.txt
@@@ -16767,11 -16724,11 +16782,11 @@@ S:        Maintaine
  F:    drivers/scsi/ufs/ufs-mediatek*
  
  UNSORTED BLOCK IMAGES (UBI)
 -M:    Artem Bityutskiy <dedekind1@gmail.com>
  M:    Richard Weinberger <richard@nod.at>
  W:    http://www.linux-mtd.infradead.org/
  L:    linux-mtd@lists.infradead.org
 -T:    git git://git.infradead.org/ubifs-2.6.git
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs.git next
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs.git fixes
  S:    Supported
  F:    drivers/mtd/ubi/
  F:    include/linux/mtd/ubi.h
@@@ -17405,6 -17362,14 +17420,14 @@@ S: Maintaine
  F:    drivers/input/serio/userio.c
  F:    include/uapi/linux/userio.h
  
+ VITESSE FELIX ETHERNET SWITCH DRIVER
+ M:    Vladimir Oltean <vladimir.oltean@nxp.com>
+ M:    Claudiu Manoil <claudiu.manoil@nxp.com>
+ L:    netdev@vger.kernel.org
+ S:    Maintained
+ F:    drivers/net/dsa/ocelot/*
+ F:    net/dsa/tag_ocelot.c
  VIVID VIRTUAL VIDEO DRIVER
  M:    Hans Verkuil <hverkuil@xs4all.nl>
  L:    linux-media@vger.kernel.org
@@@ -17505,18 -17470,6 +17528,18 @@@ S: Maintaine
  F:    drivers/net/vrf.c
  F:    Documentation/networking/vrf.txt
  
 +VSPRINTF
 +M:    Petr Mladek <pmladek@suse.com>
 +M:    Steven Rostedt <rostedt@goodmis.org>
 +M:    Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
 +R:    Andy Shevchenko <andriy.shevchenko@linux.intel.com>
 +R:    Rasmus Villemoes <linux@rasmusvillemoes.dk>
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk.git
 +S:    Maintained
 +F:    lib/vsprintf.c
 +F:    lib/test_printf.c
 +F:    Documentation/core-api/printk-formats.rst
 +
  VT1211 HARDWARE MONITOR DRIVER
  M:    Juerg Haefliger <juergh@gmail.com>
  L:    linux-hwmon@vger.kernel.org
@@@ -97,7 -97,7 +97,7 @@@ static struct sk_buff *create_flowc_wr_
        if (!skb)
                return NULL;
  
 -      memcpy(__skb_put(skb, flowclen), flowc, flowclen);
 +      __skb_put_data(skb, flowc, flowclen);
        skb_set_queue_mapping(skb, (csk->txq_idx << 1) | CPL_PRIORITY_DATA);
  
        return skb;
@@@ -1437,7 -1437,7 +1437,7 @@@ static int chtls_pt_recvmsg(struct soc
                                      csk->wr_max_credits))
                        sk->sk_write_space(sk);
  
-               if (copied >= target && !sk->sk_backlog.tail)
+               if (copied >= target && !READ_ONCE(sk->sk_backlog.tail))
                        break;
  
                if (copied) {
                                break;
                        }
                }
-               if (sk->sk_backlog.tail) {
+               if (READ_ONCE(sk->sk_backlog.tail)) {
                        release_sock(sk);
                        lock_sock(sk);
                        chtls_cleanup_rbuf(sk, copied);
@@@ -1615,7 -1615,7 +1615,7 @@@ static int peekmsg(struct sock *sk, str
                        break;
                }
  
-               if (sk->sk_backlog.tail) {
+               if (READ_ONCE(sk->sk_backlog.tail)) {
                        /* Do not sleep, just process backlog. */
                        release_sock(sk);
                        lock_sock(sk);
@@@ -1743,7 -1743,7 +1743,7 @@@ int chtls_recvmsg(struct sock *sk, stru
                                      csk->wr_max_credits))
                        sk->sk_write_space(sk);
  
-               if (copied >= target && !sk->sk_backlog.tail)
+               if (copied >= target && !READ_ONCE(sk->sk_backlog.tail))
                        break;
  
                if (copied) {
                        }
                }
  
-               if (sk->sk_backlog.tail) {
+               if (READ_ONCE(sk->sk_backlog.tail)) {
                        release_sock(sk);
                        lock_sock(sk);
                        chtls_cleanup_rbuf(sk, copied);
@@@ -1841,7 -1841,8 +1841,7 @@@ skip_copy
                        tp->urg_data = 0;
  
                if (avail + offset >= skb->len) {
 -                      if (likely(skb))
 -                              chtls_free_skb(sk, skb);
 +                      chtls_free_skb(sk, skb);
                        buffers_freed++;
  
                        if  (copied >= target &&
@@@ -27,7 -27,6 +27,6 @@@ MODULE_VERSION(ISAR_REV)
  
  #define DEBUG_HW_FIRMWARE_FIFO        0x10000
  
- static const u8 faxmodulation_s[] = "3,24,48,72,73,74,96,97,98,121,122,145,146";
  static const u8 faxmodulation[] = {3, 24, 48, 72, 73, 74, 96, 97, 98, 121,
                                   122, 145, 146};
  #define FAXMODCNT 13
@@@ -222,7 -221,7 +221,7 @@@ load_firmware(struct isar_hw *isar, con
                        goto reterror;
                }
                if (!poll_mbox(isar, 1000)) {
 -                      pr_warning("ISAR poll_mbox dkey failed\n");
 +                      pr_warn("ISAR poll_mbox dkey failed\n");
                        ret = -ETIME;
                        goto reterror;
                }
@@@ -432,8 -431,8 +431,8 @@@ isar_rcv_frame(struct isar_ch *ch
        case ISDN_P_B_MODEM_ASYNC:
                maxlen = bchannel_get_rxbuf(&ch->bch, ch->is->clsb);
                if (maxlen < 0) {
 -                      pr_warning("%s.B%d: No bufferspace for %d bytes\n",
 -                                 ch->is->name, ch->bch.nr, ch->is->clsb);
 +                      pr_warn("%s.B%d: No bufferspace for %d bytes\n",
 +                              ch->is->name, ch->bch.nr, ch->is->clsb);
                        ch->is->write_reg(ch->is->hw, ISAR_IIA, 0);
                        break;
                }
        case ISDN_P_B_HDLC:
                maxlen = bchannel_get_rxbuf(&ch->bch, ch->is->clsb);
                if (maxlen < 0) {
 -                      pr_warning("%s.B%d: No bufferspace for %d bytes\n",
 -                                 ch->is->name, ch->bch.nr, ch->is->clsb);
 +                      pr_warn("%s.B%d: No bufferspace for %d bytes\n",
 +                              ch->is->name, ch->bch.nr, ch->is->clsb);
                        ch->is->write_reg(ch->is->hw, ISAR_IIA, 0);
                        break;
                }
diff --combined drivers/s390/cio/qdio.h
@@@ -82,6 -82,7 +82,7 @@@ enum qdio_irq_states 
  #define QDIO_SIGA_WRITE               0x00
  #define QDIO_SIGA_READ                0x01
  #define QDIO_SIGA_SYNC                0x02
+ #define QDIO_SIGA_WRITEM      0x03
  #define QDIO_SIGA_WRITEQ      0x04
  #define QDIO_SIGA_QEBSM_FLAG  0x80
  
@@@ -252,6 -253,9 +253,6 @@@ struct qdio_q 
        /* input or output queue */
        int is_input_q;
  
 -      /* list of thinint input queues */
 -      struct list_head entry;
 -
        /* upper-layer program handler */
        qdio_handler_t (*handler);
  
@@@ -269,7 -273,6 +270,7 @@@ struct qdio_irq 
        struct qib qib;
        u32 *dsci;              /* address of device state change indicator */
        struct ccw_device *cdev;
 +      struct list_head entry;         /* list of thinint devices */
        struct dentry *debugfs_dev;
        struct dentry *debugfs_perf;
  
  
  #define qperf(__qdev, __attr) ((__qdev)->perf_stat.(__attr))
  
 -#define qperf_inc(__q, __attr)                                                \
 +#define QDIO_PERF_STAT_INC(__irq, __attr)                             \
  ({                                                                    \
 -      struct qdio_irq *qdev = (__q)->irq_ptr;                         \
 +      struct qdio_irq *qdev = __irq;                                  \
        if (qdev->perf_stat_enabled)                                    \
                (qdev->perf_stat.__attr)++;                             \
  })
  
 +#define qperf_inc(__q, __attr)        QDIO_PERF_STAT_INC((__q)->irq_ptr, __attr)
 +
  static inline void account_sbals_error(struct qdio_q *q, int count)
  {
        q->q_stats.nr_sbal_error += count;
@@@ -355,10 -356,14 +356,10 @@@ static inline int multicast_outbound(st
        for (i = 0; i < irq_ptr->nr_output_qs &&        \
                ({ q = irq_ptr->output_qs[i]; 1; }); i++)
  
 -#define prev_buf(bufnr)       \
 -      ((bufnr + QDIO_MAX_BUFFERS_MASK) & QDIO_MAX_BUFFERS_MASK)
 -#define next_buf(bufnr)       \
 -      ((bufnr + 1) & QDIO_MAX_BUFFERS_MASK)
 -#define add_buf(bufnr, inc) \
 -      ((bufnr + inc) & QDIO_MAX_BUFFERS_MASK)
 -#define sub_buf(bufnr, dec) \
 -      ((bufnr - dec) & QDIO_MAX_BUFFERS_MASK)
 +#define add_buf(bufnr, inc)   QDIO_BUFNR((bufnr) + (inc))
 +#define next_buf(bufnr)               add_buf(bufnr, 1)
 +#define sub_buf(bufnr, dec)   QDIO_BUFNR((bufnr) - (dec))
 +#define prev_buf(bufnr)               sub_buf(bufnr, 1)
  
  #define queue_irqs_enabled(q)                 \
        (test_bit(QDIO_QUEUE_IRQS_DISABLED, &q->u.in.queue_irq_state) == 0)
@@@ -371,8 -376,8 +372,8 @@@ extern u64 last_ai_time
  void qdio_setup_thinint(struct qdio_irq *irq_ptr);
  int qdio_establish_thinint(struct qdio_irq *irq_ptr);
  void qdio_shutdown_thinint(struct qdio_irq *irq_ptr);
 -void tiqdio_add_input_queues(struct qdio_irq *irq_ptr);
 -void tiqdio_remove_input_queues(struct qdio_irq *irq_ptr);
 +void tiqdio_add_device(struct qdio_irq *irq_ptr);
 +void tiqdio_remove_device(struct qdio_irq *irq_ptr);
  void tiqdio_inbound_processing(unsigned long q);
  int tiqdio_allocate_memory(void);
  void tiqdio_free_memory(void);
@@@ -131,7 -131,7 +131,7 @@@ again
        case 96:
                /* not all buffers processed */
                qperf_inc(q, eqbs_partial);
 -              DBF_DEV_EVENT(DBF_WARN, q->irq_ptr, "EQBS part:%02x",
 +              DBF_DEV_EVENT(DBF_INFO, q->irq_ptr, "EQBS part:%02x",
                        tmp_count);
                return count - tmp_count;
        case 97:
@@@ -310,18 -310,19 +310,19 @@@ static inline int qdio_siga_sync_q(stru
                return qdio_siga_sync(q, q->mask, 0);
  }
  
- static int qdio_siga_output(struct qdio_q *q, unsigned int *busy_bit,
-       unsigned long aob)
+ static int qdio_siga_output(struct qdio_q *q, unsigned int count,
+                           unsigned int *busy_bit, unsigned long aob)
  {
        unsigned long schid = *((u32 *) &q->irq_ptr->schid);
        unsigned int fc = QDIO_SIGA_WRITE;
        u64 start_time = 0;
        int retries = 0, cc;
-       unsigned long laob = 0;
  
-       if (aob) {
-               fc = QDIO_SIGA_WRITEQ;
-               laob = aob;
+       if (queue_type(q) == QDIO_IQDIO_QFMT && !multicast_outbound(q)) {
+               if (count > 1)
+                       fc = QDIO_SIGA_WRITEM;
+               else if (aob)
+                       fc = QDIO_SIGA_WRITEQ;
        }
  
        if (is_qebsm(q)) {
                fc |= QDIO_SIGA_QEBSM_FLAG;
        }
  again:
-       cc = do_siga_output(schid, q->mask, busy_bit, fc, laob);
+       cc = do_siga_output(schid, q->mask, busy_bit, fc, aob);
  
        /* hipersocket busy condition */
        if (unlikely(*busy_bit)) {
@@@ -423,6 -424,9 +424,6 @@@ static inline void account_sbals(struc
  static void process_buffer_error(struct qdio_q *q, unsigned int start,
                                 int count)
  {
 -      unsigned char state = (q->is_input_q) ? SLSB_P_INPUT_NOT_INIT :
 -                                      SLSB_P_OUTPUT_NOT_INIT;
 -
        q->qdio_error = QDIO_ERROR_SLSB_STATE;
  
        /* special handling for no target buffer empty */
            q->sbal[start]->element[15].sflags == 0x10) {
                qperf_inc(q, target_full);
                DBF_DEV_EVENT(DBF_INFO, q->irq_ptr, "OUTFULL FTC:%02x", start);
 -              goto set;
 +              return;
        }
  
        DBF_ERROR("%4x BUF ERROR", SCH_NO(q));
        DBF_ERROR("F14:%2x F15:%2x",
                  q->sbal[start]->element[14].sflags,
                  q->sbal[start]->element[15].sflags);
 -
 -set:
 -      /*
 -       * Interrupts may be avoided as long as the error is present
 -       * so change the buffer state immediately to avoid starvation.
 -       */
 -      set_buf_states(q, start, state, count);
  }
  
  static inline void inbound_primed(struct qdio_q *q, unsigned int start,
@@@ -520,11 -531,6 +521,11 @@@ static int get_inbound_buffer_frontier(
                return count;
        case SLSB_P_INPUT_ERROR:
                process_buffer_error(q, start, count);
 +              /*
 +               * Interrupts may be avoided as long as the error is present
 +               * so change the buffer state immediately to avoid starvation.
 +               */
 +              set_buf_states(q, start, SLSB_P_INPUT_NOT_INIT, count);
                if (atomic_sub_return(count, &q->nr_buf_used) == 0)
                        qperf_inc(q, inbound_queue_full);
                if (q->irq_ptr->perf_stat_enabled)
@@@ -776,7 -782,8 +777,8 @@@ static inline int qdio_outbound_q_moved
        return count;
  }
  
- static int qdio_kick_outbound_q(struct qdio_q *q, unsigned long aob)
+ static int qdio_kick_outbound_q(struct qdio_q *q, unsigned int count,
+                               unsigned long aob)
  {
        int retries = 0, cc;
        unsigned int busy_bit;
  retry:
        qperf_inc(q, siga_write);
  
-       cc = qdio_siga_output(q, &busy_bit, aob);
+       cc = qdio_siga_output(q, count, &busy_bit, aob);
        switch (cc) {
        case 0:
                break;
@@@ -958,7 -965,7 +960,7 @@@ static void qdio_int_handler_pci(struc
                        /* skip if polling is enabled or already in work */
                        if (test_and_set_bit(QDIO_QUEUE_IRQS_DISABLED,
                                     &q->u.in.queue_irq_state)) {
 -                              qperf_inc(q, int_discarded);
 +                              QDIO_PERF_STAT_INC(irq_ptr, int_discarded);
                                continue;
                        }
                        q->u.in.queue_start_poll(q->irq_ptr->cdev, q->nr,
@@@ -1157,7 -1164,7 +1159,7 @@@ int qdio_shutdown(struct ccw_device *cd
         */
        qdio_set_state(irq_ptr, QDIO_IRQ_STATE_STOPPED);
  
 -      tiqdio_remove_input_queues(irq_ptr);
 +      tiqdio_remove_device(irq_ptr);
        qdio_shutdown_queues(cdev);
        qdio_shutdown_debug_entries(irq_ptr);
  
@@@ -1279,7 -1286,6 +1281,7 @@@ int qdio_allocate(struct qdio_initializ
                             init_data->no_output_qs))
                goto out_rel;
  
 +      INIT_LIST_HEAD(&irq_ptr->entry);
        init_data->cdev->private->qdio_data = irq_ptr;
        qdio_set_state(irq_ptr, QDIO_IRQ_STATE_INACTIVE);
        return 0;
@@@ -1424,7 -1430,7 +1426,7 @@@ int qdio_activate(struct ccw_device *cd
        }
  
        if (is_thinint_irq(irq_ptr))
 -              tiqdio_add_input_queues(irq_ptr);
 +              tiqdio_add_device(irq_ptr);
  
        /* wait for subchannel to become active */
        msleep(5);
@@@ -1522,7 -1528,7 +1524,7 @@@ set
   * @count: how many buffers are filled
   */
  static int handle_outbound(struct qdio_q *q, unsigned int callflags,
-                          int bufnr, int count)
+                          unsigned int bufnr, unsigned int count)
  {
        const unsigned int scan_threshold = q->irq_ptr->scan_threshold;
        unsigned char state = 0;
        if (queue_type(q) == QDIO_IQDIO_QFMT) {
                unsigned long phys_aob = 0;
  
-               /* One SIGA-W per buffer required for unicast HSI */
-               WARN_ON_ONCE(count > 1 && !multicast_outbound(q));
-               if (q->u.out.use_cq)
+               if (q->u.out.use_cq && count == 1)
                        phys_aob = qdio_aob_for_buffer(&q->u.out, bufnr);
  
-               rc = qdio_kick_outbound_q(q, phys_aob);
+               rc = qdio_kick_outbound_q(q, count, phys_aob);
        } else if (need_siga_sync(q)) {
                rc = qdio_siga_sync_q(q);
        } else if (count < QDIO_MAX_BUFFERS_PER_Q &&
                /* The previous buffer is not processed yet, tack on. */
                qperf_inc(q, fast_requeue);
        } else {
-               rc = qdio_kick_outbound_q(q, 0);
+               rc = qdio_kick_outbound_q(q, count, 0);
        }
  
        /* Let drivers implement their own completion scanning: */
@@@ -13,6 -13,8 +13,6 @@@
  #include "qeth_core.h"
  #include <linux/hashtable.h>
  
 -#define QETH_SNIFF_AVAIL      0x0008
 -
  enum qeth_ip_types {
        QETH_IP_TYPE_NORMAL,
        QETH_IP_TYPE_VIPA,
@@@ -22,7 -24,6 +22,6 @@@
  struct qeth_ipaddr {
        struct hlist_node hnode;
        enum qeth_ip_types type;
-       unsigned char mac[ETH_ALEN];
        u8 is_multicast:1;
        u8 in_progress:1;
        u8 disp_flag:2;
@@@ -35,7 -36,7 +34,7 @@@
        enum qeth_prot_versions proto;
        union {
                struct {
-                       unsigned int addr;
+                       __be32 addr;
                        unsigned int mask;
                } a4;
                struct {
@@@ -53,6 -54,7 +52,7 @@@ static inline void qeth_l3_init_ipaddr(
        addr->type = type;
        addr->proto = proto;
        addr->disp_flag = QETH_DISP_ADDR_DO_NOTHING;
+       addr->ref_counter = 1;
  }
  
  static inline bool qeth_l3_addr_match_ip(struct qeth_ipaddr *a1,
@@@ -72,12 -74,10 +72,10 @@@ static inline bool qeth_l3_addr_match_a
         * so 'proto' and 'addr' match for sure.
         *
         * For ucast:
-        * -    'mac' is always 0.
         * -    'mask'/'pfxlen' for RXIP/VIPA is always 0. For NORMAL, matching
         *      values are required to avoid mixups in takeover eligibility.
         *
         * For mcast,
-        * -    'mac' is mapped from the IP, and thus always matches.
         * -    'mask'/'pfxlen' is always 0.
         */
        if (a1->type != a2->type)
        return a1->u.a4.mask == a2->u.a4.mask;
  }
  
- static inline  u64 qeth_l3_ipaddr_hash(struct qeth_ipaddr *addr)
+ static inline u32 qeth_l3_ipaddr_hash(struct qeth_ipaddr *addr)
  {
-       u64  ret = 0;
-       u8 *point;
-       if (addr->proto == QETH_PROT_IPV6) {
-               point = (u8 *) &addr->u.a6.addr;
-               ret = get_unaligned((u64 *)point) ^
-                       get_unaligned((u64 *) (point + 8));
-       }
-       if (addr->proto == QETH_PROT_IPV4) {
-               point = (u8 *) &addr->u.a4.addr;
-               ret = get_unaligned((u32 *) point);
-       }
-       return ret;
+       if (addr->proto == QETH_PROT_IPV6)
+               return ipv6_addr_hash(&addr->u.a6.addr);
+       else
+               return ipv4_addr_hash(addr->u.a4.addr);
  }
  
  struct qeth_ipato_entry {
@@@ -60,9 -60,6 +60,6 @@@ static ssize_t qeth_l3_dev_route4_show(
  {
        struct qeth_card *card = dev_get_drvdata(dev);
  
-       if (!card)
-               return -EINVAL;
        return qeth_l3_dev_route_show(card, &card->options.route4, buf);
  }
  
@@@ -109,9 -106,6 +106,6 @@@ static ssize_t qeth_l3_dev_route4_store
  {
        struct qeth_card *card = dev_get_drvdata(dev);
  
-       if (!card)
-               return -EINVAL;
        return qeth_l3_dev_route_store(card, &card->options.route4,
                                QETH_PROT_IPV4, buf, count);
  }
@@@ -124,9 -118,6 +118,6 @@@ static ssize_t qeth_l3_dev_route6_show(
  {
        struct qeth_card *card = dev_get_drvdata(dev);
  
-       if (!card)
-               return -EINVAL;
        return qeth_l3_dev_route_show(card, &card->options.route6, buf);
  }
  
@@@ -135,9 -126,6 +126,6 @@@ static ssize_t qeth_l3_dev_route6_store
  {
        struct qeth_card *card = dev_get_drvdata(dev);
  
-       if (!card)
-               return -EINVAL;
        return qeth_l3_dev_route_store(card, &card->options.route6,
                                QETH_PROT_IPV6, buf, count);
  }
@@@ -150,9 -138,6 +138,6 @@@ static ssize_t qeth_l3_dev_fake_broadca
  {
        struct qeth_card *card = dev_get_drvdata(dev);
  
-       if (!card)
-               return -EINVAL;
        return sprintf(buf, "%i\n", card->options.fake_broadcast? 1:0);
  }
  
@@@ -163,9 -148,6 +148,6 @@@ static ssize_t qeth_l3_dev_fake_broadca
        char *tmp;
        int i, rc = 0;
  
-       if (!card)
-               return -EINVAL;
        mutex_lock(&card->conf_mutex);
        if (card->state != CARD_STATE_DOWN) {
                rc = -EPERM;
@@@ -190,9 -172,6 +172,6 @@@ static ssize_t qeth_l3_dev_sniffer_show
  {
        struct qeth_card *card = dev_get_drvdata(dev);
  
-       if (!card)
-               return -EINVAL;
        return sprintf(buf, "%i\n", card->options.sniffer ? 1 : 0);
  }
  
@@@ -203,9 -182,6 +182,6 @@@ static ssize_t qeth_l3_dev_sniffer_stor
        int rc = 0;
        unsigned long i;
  
-       if (!card)
-               return -EINVAL;
        if (!IS_IQD(card))
                return -EPERM;
        if (card->options.cq == QETH_CQ_ENABLED)
                break;
        case 1:
                qdio_get_ssqd_desc(CARD_DDEV(card), &card->ssqd);
 -              if (card->ssqd.qdioac2 & QETH_SNIFF_AVAIL) {
 +              if (card->ssqd.qdioac2 & CHSC_AC2_SNIFFER_AVAILABLE) {
                        card->options.sniffer = i;
                        if (card->qdio.init_pool.buf_count !=
                                        QETH_IN_BUF_COUNT_MAX)
@@@ -248,16 -224,12 +224,12 @@@ out
  static DEVICE_ATTR(sniffer, 0644, qeth_l3_dev_sniffer_show,
                qeth_l3_dev_sniffer_store);
  
  static ssize_t qeth_l3_dev_hsuid_show(struct device *dev,
                struct device_attribute *attr, char *buf)
  {
        struct qeth_card *card = dev_get_drvdata(dev);
        char tmp_hsuid[9];
  
-       if (!card)
-               return -EINVAL;
        if (!IS_IQD(card))
                return -EPERM;
  
@@@ -273,9 -245,6 +245,6 @@@ static ssize_t qeth_l3_dev_hsuid_store(
        char *tmp;
        int rc;
  
-       if (!card)
-               return -EINVAL;
        if (!IS_IQD(card))
                return -EPERM;
        if (card->state != CARD_STATE_DOWN)
@@@ -336,9 -305,6 +305,6 @@@ static ssize_t qeth_l3_dev_ipato_enable
  {
        struct qeth_card *card = dev_get_drvdata(dev);
  
-       if (!card)
-               return -EINVAL;
        return sprintf(buf, "%i\n", card->ipato.enabled? 1:0);
  }
  
@@@ -349,9 -315,6 +315,6 @@@ static ssize_t qeth_l3_dev_ipato_enable
        bool enable;
        int rc = 0;
  
-       if (!card)
-               return -EINVAL;
        mutex_lock(&card->conf_mutex);
        if (card->state != CARD_STATE_DOWN) {
                rc = -EPERM;
@@@ -385,9 -348,6 +348,6 @@@ static ssize_t qeth_l3_dev_ipato_invert
  {
        struct qeth_card *card = dev_get_drvdata(dev);
  
-       if (!card)
-               return -EINVAL;
        return sprintf(buf, "%i\n", card->ipato.invert4? 1:0);
  }
  
@@@ -399,9 -359,6 +359,6 @@@ static ssize_t qeth_l3_dev_ipato_invert
        bool invert;
        int rc = 0;
  
-       if (!card)
-               return -EINVAL;
        mutex_lock(&card->conf_mutex);
        if (sysfs_streq(buf, "toggle")) {
                invert = !card->ipato.invert4;
@@@ -460,9 -417,6 +417,6 @@@ static ssize_t qeth_l3_dev_ipato_add4_s
  {
        struct qeth_card *card = dev_get_drvdata(dev);
  
-       if (!card)
-               return -EINVAL;
        return qeth_l3_dev_ipato_add_show(buf, card, QETH_PROT_IPV4);
  }
  
@@@ -528,9 -482,6 +482,6 @@@ static ssize_t qeth_l3_dev_ipato_add4_s
  {
        struct qeth_card *card = dev_get_drvdata(dev);
  
-       if (!card)
-               return -EINVAL;
        return qeth_l3_dev_ipato_add_store(buf, count, card, QETH_PROT_IPV4);
  }
  
@@@ -558,9 -509,6 +509,6 @@@ static ssize_t qeth_l3_dev_ipato_del4_s
  {
        struct qeth_card *card = dev_get_drvdata(dev);
  
-       if (!card)
-               return -EINVAL;
        return qeth_l3_dev_ipato_del_store(buf, count, card, QETH_PROT_IPV4);
  }
  
@@@ -572,9 -520,6 +520,6 @@@ static ssize_t qeth_l3_dev_ipato_invert
  {
        struct qeth_card *card = dev_get_drvdata(dev);
  
-       if (!card)
-               return -EINVAL;
        return sprintf(buf, "%i\n", card->ipato.invert6? 1:0);
  }
  
@@@ -585,9 -530,6 +530,6 @@@ static ssize_t qeth_l3_dev_ipato_invert
        bool invert;
        int rc = 0;
  
-       if (!card)
-               return -EINVAL;
        mutex_lock(&card->conf_mutex);
        if (sysfs_streq(buf, "toggle")) {
                invert = !card->ipato.invert6;
@@@ -617,9 -559,6 +559,6 @@@ static ssize_t qeth_l3_dev_ipato_add6_s
  {
        struct qeth_card *card = dev_get_drvdata(dev);
  
-       if (!card)
-               return -EINVAL;
        return qeth_l3_dev_ipato_add_show(buf, card, QETH_PROT_IPV6);
  }
  
@@@ -628,9 -567,6 +567,6 @@@ static ssize_t qeth_l3_dev_ipato_add6_s
  {
        struct qeth_card *card = dev_get_drvdata(dev);
  
-       if (!card)
-               return -EINVAL;
        return qeth_l3_dev_ipato_add_store(buf, count, card, QETH_PROT_IPV6);
  }
  
@@@ -643,9 -579,6 +579,6 @@@ static ssize_t qeth_l3_dev_ipato_del6_s
  {
        struct qeth_card *card = dev_get_drvdata(dev);
  
-       if (!card)
-               return -EINVAL;
        return qeth_l3_dev_ipato_del_store(buf, count, card, QETH_PROT_IPV6);
  }
  
@@@ -679,9 -612,6 +612,6 @@@ static ssize_t qeth_l3_dev_ip_add_show(
        int entry_len; /* length of 1 entry string, differs between v4 and v6 */
        int i;
  
-       if (!card)
-               return -EINVAL;
        entry_len = (proto == QETH_PROT_IPV4)? 12 : 40;
        entry_len += 2; /* \n + terminator */
        mutex_lock(&card->ip_lock);
@@@ -741,9 -671,6 +671,6 @@@ static ssize_t qeth_l3_dev_vipa_add4_st
  {
        struct qeth_card *card = dev_get_drvdata(dev);
  
-       if (!card)
-               return -EINVAL;
        return qeth_l3_dev_vipa_add_store(buf, count, card, QETH_PROT_IPV4);
  }
  
@@@ -771,9 -698,6 +698,6 @@@ static ssize_t qeth_l3_dev_vipa_del4_st
  {
        struct qeth_card *card = dev_get_drvdata(dev);
  
-       if (!card)
-               return -EINVAL;
        return qeth_l3_dev_vipa_del_store(buf, count, card, QETH_PROT_IPV4);
  }
  
@@@ -793,9 -717,6 +717,6 @@@ static ssize_t qeth_l3_dev_vipa_add6_st
  {
        struct qeth_card *card = dev_get_drvdata(dev);
  
-       if (!card)
-               return -EINVAL;
        return qeth_l3_dev_vipa_add_store(buf, count, card, QETH_PROT_IPV6);
  }
  
@@@ -808,9 -729,6 +729,6 @@@ static ssize_t qeth_l3_dev_vipa_del6_st
  {
        struct qeth_card *card = dev_get_drvdata(dev);
  
-       if (!card)
-               return -EINVAL;
        return qeth_l3_dev_vipa_del_store(buf, count, card, QETH_PROT_IPV6);
  }
  
@@@ -884,9 -802,6 +802,6 @@@ static ssize_t qeth_l3_dev_rxip_add4_st
  {
        struct qeth_card *card = dev_get_drvdata(dev);
  
-       if (!card)
-               return -EINVAL;
        return qeth_l3_dev_rxip_add_store(buf, count, card, QETH_PROT_IPV4);
  }
  
@@@ -914,9 -829,6 +829,6 @@@ static ssize_t qeth_l3_dev_rxip_del4_st
  {
        struct qeth_card *card = dev_get_drvdata(dev);
  
-       if (!card)
-               return -EINVAL;
        return qeth_l3_dev_rxip_del_store(buf, count, card, QETH_PROT_IPV4);
  }
  
@@@ -936,9 -848,6 +848,6 @@@ static ssize_t qeth_l3_dev_rxip_add6_st
  {
        struct qeth_card *card = dev_get_drvdata(dev);
  
-       if (!card)
-               return -EINVAL;
        return qeth_l3_dev_rxip_add_store(buf, count, card, QETH_PROT_IPV6);
  }
  
@@@ -951,9 -860,6 +860,6 @@@ static ssize_t qeth_l3_dev_rxip_del6_st
  {
        struct qeth_card *card = dev_get_drvdata(dev);
  
-       if (!card)
-               return -EINVAL;
        return qeth_l3_dev_rxip_del_store(buf, count, card, QETH_PROT_IPV6);
  }
  
diff --combined kernel/events/core.c
@@@ -5029,24 -5029,6 +5029,24 @@@ static void _perf_event_reset(struct pe
        perf_event_update_userpage(event);
  }
  
 +/* Assume it's not an event with inherit set. */
 +u64 perf_event_pause(struct perf_event *event, bool reset)
 +{
 +      struct perf_event_context *ctx;
 +      u64 count;
 +
 +      ctx = perf_event_ctx_lock(event);
 +      WARN_ON_ONCE(event->attr.inherit);
 +      _perf_event_disable(event);
 +      count = local64_read(&event->count);
 +      if (reset)
 +              local64_set(&event->count, 0);
 +      perf_event_ctx_unlock(event, ctx);
 +
 +      return count;
 +}
 +EXPORT_SYMBOL_GPL(perf_event_pause);
 +
  /*
   * Holding the top-level event's child_mutex means that any
   * descendant process that has inherited this event will block
@@@ -5124,11 -5106,16 +5124,11 @@@ static int perf_event_check_period(stru
        return event->pmu->check_period(event, value);
  }
  
 -static int perf_event_period(struct perf_event *event, u64 __user *arg)
 +static int _perf_event_period(struct perf_event *event, u64 value)
  {
 -      u64 value;
 -
        if (!is_sampling_event(event))
                return -EINVAL;
  
 -      if (copy_from_user(&value, arg, sizeof(value)))
 -              return -EFAULT;
 -
        if (!value)
                return -EINVAL;
  
        return 0;
  }
  
 +int perf_event_period(struct perf_event *event, u64 value)
 +{
 +      struct perf_event_context *ctx;
 +      int ret;
 +
 +      ctx = perf_event_ctx_lock(event);
 +      ret = _perf_event_period(event, value);
 +      perf_event_ctx_unlock(event, ctx);
 +
 +      return ret;
 +}
 +EXPORT_SYMBOL_GPL(perf_event_period);
 +
  static const struct file_operations perf_fops;
  
  static inline int perf_fget_light(int fd, struct fd *p)
@@@ -5202,14 -5176,8 +5202,14 @@@ static long _perf_ioctl(struct perf_eve
                return _perf_event_refresh(event, arg);
  
        case PERF_EVENT_IOC_PERIOD:
 -              return perf_event_period(event, (u64 __user *)arg);
 +      {
 +              u64 value;
  
 +              if (copy_from_user(&value, (u64 __user *)arg, sizeof(value)))
 +                      return -EFAULT;
 +
 +              return _perf_event_period(event, value);
 +      }
        case PERF_EVENT_IOC_ID:
        {
                u64 id = primary_event_id(event);
@@@ -10509,12 -10477,9 +10509,9 @@@ perf_event_alloc(struct perf_event_att
                context = parent_event->overflow_handler_context;
  #if defined(CONFIG_BPF_SYSCALL) && defined(CONFIG_EVENT_TRACING)
                if (overflow_handler == bpf_overflow_handler) {
-                       struct bpf_prog *prog = bpf_prog_inc(parent_event->prog);
+                       struct bpf_prog *prog = parent_event->prog;
  
-                       if (IS_ERR(prog)) {
-                               err = PTR_ERR(prog);
-                               goto err_ns;
-                       }
+                       bpf_prog_inc(prog);
                        event->prog = prog;
                        event->orig_overflow_handler =
                                parent_event->orig_overflow_handler;
diff --combined net/core/filter.c
@@@ -2245,7 -2245,7 +2245,7 @@@ BPF_CALL_4(bpf_msg_pull_data, struct sk
         * account for the headroom.
         */
        bytes_sg_total = start - offset + bytes;
-       if (!msg->sg.copy[i] && bytes_sg_total <= len)
+       if (!test_bit(i, &msg->sg.copy) && bytes_sg_total <= len)
                goto out;
  
        /* At this point we need to linearize multiple scatterlist
@@@ -2450,7 -2450,7 +2450,7 @@@ BPF_CALL_4(bpf_msg_push_data, struct sk
        /* Place newly allocated data buffer */
        sk_mem_charge(msg->sk, len);
        msg->sg.size += len;
-       msg->sg.copy[new] = false;
+       __clear_bit(new, &msg->sg.copy);
        sg_set_page(&msg->sg.data[new], page, len + copy, 0);
        if (rsge.length) {
                get_page(sg_page(&rsge));
@@@ -3798,7 -3798,7 +3798,7 @@@ BPF_CALL_5(bpf_skb_event_output, struc
  
        if (unlikely(flags & ~(BPF_F_CTXLEN_MASK | BPF_F_INDEX_MASK)))
                return -EINVAL;
-       if (unlikely(skb_size > skb->len))
+       if (unlikely(!skb || skb_size > skb->len))
                return -EFAULT;
  
        return bpf_event_output(map, flags, meta, meta_size, skb, skb_size,
@@@ -3816,6 -3816,19 +3816,19 @@@ static const struct bpf_func_proto bpf_
        .arg5_type      = ARG_CONST_SIZE_OR_ZERO,
  };
  
+ static int bpf_skb_output_btf_ids[5];
+ const struct bpf_func_proto bpf_skb_output_proto = {
+       .func           = bpf_skb_event_output,
+       .gpl_only       = true,
+       .ret_type       = RET_INTEGER,
+       .arg1_type      = ARG_PTR_TO_BTF_ID,
+       .arg2_type      = ARG_CONST_MAP_PTR,
+       .arg3_type      = ARG_ANYTHING,
+       .arg4_type      = ARG_PTR_TO_MEM,
+       .arg5_type      = ARG_CONST_SIZE_OR_ZERO,
+       .btf_id         = bpf_skb_output_btf_ids,
+ };
  static unsigned short bpf_tunnel_key_af(u64 flags)
  {
        return flags & BPF_F_TUNINFO_IPV6 ? AF_INET6 : AF_INET;
@@@ -4089,7 -4102,7 +4102,7 @@@ BPF_CALL_1(bpf_skb_cgroup_id, const str
                return 0;
  
        cgrp = sock_cgroup_ptr(&sk->sk_cgrp_data);
 -      return cgrp->kn->id.id;
 +      return cgroup_id(cgrp);
  }
  
  static const struct bpf_func_proto bpf_skb_cgroup_id_proto = {
@@@ -4114,7 -4127,7 +4127,7 @@@ BPF_CALL_2(bpf_skb_ancestor_cgroup_id, 
        if (!ancestor)
                return 0;
  
 -      return ancestor->kn->id.id;
 +      return cgroup_id(ancestor);
  }
  
  static const struct bpf_func_proto bpf_skb_ancestor_cgroup_id_proto = {
@@@ -8671,16 -8684,6 +8684,6 @@@ out
  }
  
  #ifdef CONFIG_INET
- struct sk_reuseport_kern {
-       struct sk_buff *skb;
-       struct sock *sk;
-       struct sock *selected_sk;
-       void *data_end;
-       u32 hash;
-       u32 reuseport_id;
-       bool bind_inany;
- };
  static void bpf_init_reuseport_kern(struct sk_reuseport_kern *reuse_kern,
                                    struct sock_reuseport *reuse,
                                    struct sock *sk, struct sk_buff *skb,
diff --combined net/xfrm/Kconfig
@@@ -3,20 -3,20 +3,20 @@@
  # XFRM configuration
  #
  config XFRM
-        bool
-        depends on INET
-        select GRO_CELLS
-        select SKB_EXTENSIONS
+       bool
+       depends on INET
+       select GRO_CELLS
+       select SKB_EXTENSIONS
  
  config XFRM_OFFLOAD
-        bool
+       bool
  
  config XFRM_ALGO
        tristate
        select XFRM
        select CRYPTO
        select CRYPTO_HASH
 -      select CRYPTO_BLKCIPHER
 +      select CRYPTO_SKCIPHER
  
  if INET
  config XFRM_USER
@@@ -71,7 -71,7 +71,7 @@@
  #define MSG_ZEROCOPY    0x4000000
  #endif
  
 -#define FILE_SZ (1UL << 35)
 +#define FILE_SZ (1ULL << 35)
  static int cfg_family = AF_INET6;
  static socklen_t cfg_alen = sizeof(struct sockaddr_in6);
  static int cfg_port = 8787;
@@@ -82,7 -82,9 +82,9 @@@ static int zflg; /* zero copy option. (
  static int xflg; /* hash received data (simple xor) (-h option) */
  static int keepflag; /* -k option: receiver shall keep all received file in memory (no munmap() calls) */
  
- static int chunk_size  = 512*1024;
+ static size_t chunk_size  = 512*1024;
+ static size_t map_align;
  
  unsigned long htotal;
  
@@@ -118,6 -120,9 +120,9 @@@ void hash_zone(void *zone, unsigned in
        htotal = temp;
  }
  
+ #define ALIGN_UP(x, align_to) (((x) + ((align_to)-1)) & ~((align_to)-1))
+ #define ALIGN_PTR_UP(p, ptr_align_to) ((typeof(p))ALIGN_UP((unsigned long)(p), ptr_align_to))
  void *child_thread(void *arg)
  {
        unsigned long total_mmap = 0, total = 0;
        int flags = MAP_SHARED;
        struct timeval t0, t1;
        char *buffer = NULL;
+       void *raddr = NULL;
        void *addr = NULL;
        double throughput;
        struct rusage ru;
                goto error;
        }
        if (zflg) {
-               addr = mmap(NULL, chunk_size, PROT_READ, flags, fd, 0);
-               if (addr == (void *)-1)
+               raddr = mmap(NULL, chunk_size + map_align, PROT_READ, flags, fd, 0);
+               if (raddr == (void *)-1) {
+                       perror("mmap");
                        zflg = 0;
+               } else {
+                       addr = ALIGN_PTR_UP(raddr, map_align);
+               }
        }
        while (1) {
                struct pollfd pfd = { .fd = fd, .events = POLLIN, };
                        socklen_t zc_len = sizeof(zc);
                        int res;
  
 -                      zc.address = (__u64)addr;
 +                      zc.address = (__u64)((unsigned long)addr);
                        zc.length = chunk_size;
                        zc.recv_skip_hint = 0;
                        res = getsockopt(fd, IPPROTO_TCP, TCP_ZEROCOPY_RECEIVE,
@@@ -222,7 -232,7 +232,7 @@@ error
        free(buffer);
        close(fd);
        if (zflg)
-               munmap(addr, chunk_size);
+               munmap(raddr, chunk_size + map_align);
        pthread_exit(0);
  }
  
@@@ -270,6 -280,11 +280,11 @@@ static void setup_sockaddr(int domain, 
  
  static void do_accept(int fdlisten)
  {
+       pthread_attr_t attr;
+       pthread_attr_init(&attr);
+       pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
        if (setsockopt(fdlisten, SOL_SOCKET, SO_RCVLOWAT,
                       &chunk_size, sizeof(chunk_size)) == -1) {
                perror("setsockopt SO_RCVLOWAT");
                        perror("accept");
                        continue;
                }
-               res = pthread_create(&th, NULL, child_thread,
+               res = pthread_create(&th, &attr, child_thread,
                                     (void *)(unsigned long)fd);
                if (res) {
                        errno = res;
        }
  }
  
+ /* Each thread should reserve a big enough vma to avoid
+  * spinlock collisions in ptl locks.
+  * This size is 2MB on x86_64, and is exported in /proc/meminfo.
+  */
+ static unsigned long default_huge_page_size(void)
+ {
+       FILE *f = fopen("/proc/meminfo", "r");
+       unsigned long hps = 0;
+       size_t linelen = 0;
+       char *line = NULL;
+       if (!f)
+               return 0;
+       while (getline(&line, &linelen, f) > 0) {
+               if (sscanf(line, "Hugepagesize:       %lu kB", &hps) == 1) {
+                       hps <<= 10;
+                       break;
+               }
+       }
+       free(line);
+       fclose(f);
+       return hps;
+ }
  int main(int argc, char *argv[])
  {
        struct sockaddr_storage listenaddr, addr;
        unsigned int max_pacing_rate = 0;
 -      unsigned long total = 0;
 +      size_t total = 0;
        char *host = NULL;
        int fd, c, on = 1;
        char *buffer;
        int sflg = 0;
        int mss = 0;
  
-       while ((c = getopt(argc, argv, "46p:svr:w:H:zxkP:M:")) != -1) {
+       while ((c = getopt(argc, argv, "46p:svr:w:H:zxkP:M:C:a:")) != -1) {
                switch (c) {
                case '4':
                        cfg_family = PF_INET;
                case 'P':
                        max_pacing_rate = atoi(optarg) ;
                        break;
+               case 'C':
+                       chunk_size = atol(optarg);
+                       break;
+               case 'a':
+                       map_align = atol(optarg);
+                       break;
                default:
                        exit(1);
                }
        }
+       if (!map_align) {
+               map_align = default_huge_page_size();
+               /* if really /proc/meminfo is not helping,
+                * we use the default x86_64 hugepagesize.
+                */
+               if (!map_align)
+                       map_align = 2*1024*1024;
+       }
        if (sflg) {
                int fdlisten = socket(cfg_family, SOCK_STREAM, 0);
  
                zflg = 0;
        }
        while (total < FILE_SZ) {
 -              long wr = FILE_SZ - total;
 +              ssize_t wr = FILE_SZ - total;
  
                if (wr > chunk_size)
                        wr = chunk_size;