Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 11 Dec 2014 22:27:06 +0000 (14:27 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 11 Dec 2014 22:27:06 +0000 (14:27 -0800)
Pull networking updates from David Miller:

 1) New offloading infrastructure and example 'rocker' driver for
    offloading of switching and routing to hardware.

    This work was done by a large group of dedicated individuals, not
    limited to: Scott Feldman, Jiri Pirko, Thomas Graf, John Fastabend,
    Jamal Hadi Salim, Andy Gospodarek, Florian Fainelli, Roopa Prabhu

 2) Start making the networking operate on IOV iterators instead of
    modifying iov objects in-situ during transfers.  Thanks to Al Viro
    and Herbert Xu.

 3) A set of new netlink interfaces for the TIPC stack, from Richard
    Alpe.

 4) Remove unnecessary looping during ipv6 routing lookups, from Martin
    KaFai Lau.

 5) Add PAUSE frame generation support to gianfar driver, from Matei
    Pavaluca.

 6) Allow for larger reordering levels in TCP, which are easily
    achievable in the real world right now, from Eric Dumazet.

 7) Add a variable of napi_schedule that doesn't need to disable cpu
    interrupts, from Eric Dumazet.

 8) Use a doubly linked list to optimize neigh_parms_release(), from
    Nicolas Dichtel.

 9) Various enhancements to the kernel BPF verifier, and allow eBPF
    programs to actually be attached to sockets.  From Alexei
    Starovoitov.

10) Support TSO/LSO in sunvnet driver, from David L Stevens.

11) Allow controlling ECN usage via routing metrics, from Florian
    Westphal.

12) Remote checksum offload, from Tom Herbert.

13) Add split-header receive, BQL, and xmit_more support to amd-xgbe
    driver, from Thomas Lendacky.

14) Add MPLS support to openvswitch, from Simon Horman.

15) Support wildcard tunnel endpoints in ipv6 tunnels, from Steffen
    Klassert.

16) Do gro flushes on a per-device basis using a timer, from Eric
    Dumazet.  This tries to resolve the conflicting goals between the
    desired handling of bulk vs.  RPC-like traffic.

17) Allow userspace to ask for the CPU upon what a packet was
    received/steered, via SO_INCOMING_CPU.  From Eric Dumazet.

18) Limit GSO packets to half the current congestion window, from Eric
    Dumazet.

19) Add a generic helper so that all drivers set their RSS keys in a
    consistent way, from Eric Dumazet.

20) Add xmit_more support to enic driver, from Govindarajulu
    Varadarajan.

21) Add VLAN packet scheduler action, from Jiri Pirko.

22) Support configurable RSS hash functions via ethtool, from Eyal
    Perry.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1820 commits)
  Fix race condition between vxlan_sock_add and vxlan_sock_release
  net/macb: fix compilation warning for print_hex_dump() called with skb->mac_header
  net/mlx4: Add support for A0 steering
  net/mlx4: Refactor QUERY_PORT
  net/mlx4_core: Add explicit error message when rule doesn't meet configuration
  net/mlx4: Add A0 hybrid steering
  net/mlx4: Add mlx4_bitmap zone allocator
  net/mlx4: Add a check if there are too many reserved QPs
  net/mlx4: Change QP allocation scheme
  net/mlx4_core: Use tasklet for user-space CQ completion events
  net/mlx4_core: Mask out host side virtualization features for guests
  net/mlx4_en: Set csum level for encapsulated packets
  be2net: Export tunnel offloads only when a VxLAN tunnel is created
  gianfar: Fix dma check map error when DMA_API_DEBUG is enabled
  cxgb4/csiostor: Don't use MASTER_MUST for fw_hello call
  net: fec: only enable mdio interrupt before phy device link up
  net: fec: clear all interrupt events to support i.MX6SX
  net: fec: reset fep link status in suspend function
  net: sock: fix access via invalid file descriptor
  net: introduce helper macro for_each_cmsghdr
  ...

19 files changed:
1  2 
MAINTAINERS
arch/nios2/include/asm/Kbuild
drivers/net/ethernet/cadence/Kconfig
drivers/net/ethernet/intel/e1000e/netdev.c
drivers/net/ethernet/intel/igb/igb_main.c
drivers/net/macvtap.c
drivers/net/tun.c
drivers/scsi/csiostor/csio_scsi.c
drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
drivers/scsi/fcoe/fcoe.c
drivers/vhost/net.c
include/net/sock.h
include/uapi/linux/Kbuild
lib/Makefile
net/bluetooth/rfcomm/core.c
net/core/dev.c
net/core/rtnetlink.c
net/netfilter/nf_log.c
net/packet/af_packet.c

diff --cc MAINTAINERS
index 132958a4e27c6d86e2c9dcf39871e537ffba2f11,cb3221d2436bab6abe6a4404cef66f2085f97f1d..34b4b841da402b0a787bd809bc064e1c6f62f12e
@@@ -4752,14 -4721,15 +4760,21 @@@ S:   Maintaine
  F:    net/ieee802154/
  F:    net/mac802154/
  F:    drivers/net/ieee802154/
+ F:    include/linux/nl802154.h
+ F:    include/linux/ieee802154.h
+ F:    include/net/nl802154.h
+ F:    include/net/mac802154.h
+ F:    include/net/af_ieee802154.h
+ F:    include/net/cfg802154.h
+ F:    include/net/ieee802154_netdev.h
  F:    Documentation/networking/ieee802154.txt
  
 +IGORPLUG-USB IR RECEIVER
 +M:    Sean Young <sean@mess.org>
 +L:    linux-media@vger.kernel.org
 +S:    Maintained
 +F:    drivers/media/rc/igorplugusb.c
 +
  IGUANAWORKS USB IR TRANSCEIVER
  M:    Sean Young <sean@mess.org>
  L:    linux-media@vger.kernel.org
index bb160be0dc28cc4f422aac7950d3e23eb6c4134b,0000000000000000000000000000000000000000..01c75f36e8b3b7506512367aa114d0469d1a7df1
mode 100644,000000..100644
--- /dev/null
@@@ -1,66 -1,0 +1,65 @@@
- generic-y += hash.h
 +generic-y += atomic.h
 +generic-y += auxvec.h
 +generic-y += barrier.h
 +generic-y += bitops.h
 +generic-y += bitsperlong.h
 +generic-y += bug.h
 +generic-y += bugs.h
 +generic-y += clkdev.h
 +generic-y += cputime.h
 +generic-y += current.h
 +generic-y += device.h
 +generic-y += div64.h
 +generic-y += dma.h
 +generic-y += emergency-restart.h
 +generic-y += errno.h
 +generic-y += exec.h
 +generic-y += fb.h
 +generic-y += fcntl.h
 +generic-y += ftrace.h
 +generic-y += futex.h
 +generic-y += hardirq.h
 +generic-y += hw_irq.h
 +generic-y += ioctl.h
 +generic-y += ioctls.h
 +generic-y += ipcbuf.h
 +generic-y += irq_regs.h
 +generic-y += irq_work.h
 +generic-y += kdebug.h
 +generic-y += kmap_types.h
 +generic-y += kvm_para.h
 +generic-y += local.h
 +generic-y += mcs_spinlock.h
 +generic-y += mman.h
 +generic-y += module.h
 +generic-y += msgbuf.h
 +generic-y += param.h
 +generic-y += pci.h
 +generic-y += percpu.h
 +generic-y += poll.h
 +generic-y += posix_types.h
 +generic-y += preempt.h
 +generic-y += resource.h
 +generic-y += scatterlist.h
 +generic-y += sections.h
 +generic-y += segment.h
 +generic-y += sembuf.h
 +generic-y += serial.h
 +generic-y += shmbuf.h
 +generic-y += shmparam.h
 +generic-y += siginfo.h
 +generic-y += signal.h
 +generic-y += socket.h
 +generic-y += sockios.h
 +generic-y += spinlock.h
 +generic-y += stat.h
 +generic-y += statfs.h
 +generic-y += termbits.h
 +generic-y += termios.h
 +generic-y += topology.h
 +generic-y += trace_clock.h
 +generic-y += types.h
 +generic-y += unaligned.h
 +generic-y += user.h
 +generic-y += vga.h
 +generic-y += xor.h
Simple merge
index af90ab5e57680e65b131355c1068eb37d23e7135,2c157cced81ffef7e82f30e45b7dd3da17c961c5..60f7ee5fafbe004a766fdd262d2f074e04070bcb
@@@ -678,19 -663,18 +680,20 @@@ static ssize_t macvtap_get_user(struct 
                        goto err;
                len -= vnet_hdr_len;
  
-               err = memcpy_fromiovecend((void *)&vnet_hdr, iv, 0,
-                                          sizeof(vnet_hdr));
-               if (err < 0)
+               err = -EFAULT;
+               n = copy_from_iter(&vnet_hdr, sizeof(vnet_hdr), from);
+               if (n != sizeof(vnet_hdr))
                        goto err;
+               iov_iter_advance(from, vnet_hdr_len - sizeof(vnet_hdr));
                if ((vnet_hdr.flags & VIRTIO_NET_HDR_F_NEEDS_CSUM) &&
 -                   vnet_hdr.csum_start + vnet_hdr.csum_offset + 2 >
 -                                                      vnet_hdr.hdr_len)
 -                      vnet_hdr.hdr_len = vnet_hdr.csum_start +
 -                                              vnet_hdr.csum_offset + 2;
 +                   macvtap16_to_cpu(q, vnet_hdr.csum_start) +
 +                   macvtap16_to_cpu(q, vnet_hdr.csum_offset) + 2 >
 +                           macvtap16_to_cpu(q, vnet_hdr.hdr_len))
 +                      vnet_hdr.hdr_len = cpu_to_macvtap16(q,
 +                               macvtap16_to_cpu(q, vnet_hdr.csum_start) +
 +                               macvtap16_to_cpu(q, vnet_hdr.csum_offset) + 2);
                err = -EINVAL;
 -              if (vnet_hdr.hdr_len > len)
 +              if (macvtap16_to_cpu(q, vnet_hdr.hdr_len) > len)
                        goto err;
        }
  
        if (unlikely(len < ETH_HLEN))
                goto err;
  
-       err = -EMSGSIZE;
-       if (unlikely(count > UIO_MAXIOV))
-               goto err;
        if (m && m->msg_control && sock_flag(&q->sk, SOCK_ZEROCOPY)) {
 -              copylen = vnet_hdr.hdr_len ? vnet_hdr.hdr_len : GOODCOPY_LEN;
+               struct iov_iter i;
 +              copylen = vnet_hdr.hdr_len ?
 +                      macvtap16_to_cpu(q, vnet_hdr.hdr_len) : GOODCOPY_LEN;
                if (copylen > good_linear)
                        copylen = good_linear;
                linear = copylen;
@@@ -808,21 -785,21 +805,21 @@@ static ssize_t macvtap_put_user(struct 
        if (q->flags & IFF_VNET_HDR) {
                struct virtio_net_hdr vnet_hdr;
                vnet_hdr_len = q->vnet_hdr_sz;
-               if ((len -= vnet_hdr_len) < 0)
+               if (iov_iter_count(iter) < vnet_hdr_len)
                        return -EINVAL;
  
 -              macvtap_skb_to_vnet_hdr(skb, &vnet_hdr);
 +              macvtap_skb_to_vnet_hdr(q, skb, &vnet_hdr);
  
-               if (memcpy_toiovecend(iv, (void *)&vnet_hdr, 0, sizeof(vnet_hdr)))
+               if (copy_to_iter(&vnet_hdr, sizeof(vnet_hdr), iter) !=
+                   sizeof(vnet_hdr))
                        return -EFAULT;
+               iov_iter_advance(iter, vnet_hdr_len - sizeof(vnet_hdr));
        }
-       total = copied = vnet_hdr_len;
+       total = vnet_hdr_len;
        total += skb->len;
  
-       if (!vlan_tx_tag_present(skb))
-               len = min_t(int, skb->len, len);
-       else {
-               int copy;
+       if (vlan_tx_tag_present(skb)) {
                struct {
                        __be16 h_vlan_proto;
                        __be16 h_vlan_TCI;
index 798ce70e3d6144c408c52a829f21627b17ce0d78,f3e992ed87ac69a1e91c79c146a3befcf4efe0ec..a5cbf67517f09e08e728a44dd9917e2792d37d9d
@@@ -1043,18 -1025,19 +1044,19 @@@ static ssize_t tun_get_user(struct tun_
        bool zerocopy = false;
        int err;
        u32 rxhash;
+       ssize_t n;
  
 -      if (!(tun->flags & TUN_NO_PI)) {
 +      if (!(tun->flags & IFF_NO_PI)) {
                if (len < sizeof(pi))
                        return -EINVAL;
                len -= sizeof(pi);
  
-               if (memcpy_fromiovecend((void *)&pi, iv, 0, sizeof(pi)))
+               n = copy_from_iter(&pi, sizeof(pi), from);
+               if (n != sizeof(pi))
                        return -EFAULT;
-               offset += sizeof(pi);
        }
  
 -      if (tun->flags & TUN_VNET_HDR) {
 +      if (tun->flags & IFF_VNET_HDR) {
                if (len < tun->vnet_hdr_sz)
                        return -EINVAL;
                len -= tun->vnet_hdr_sz;
                        return -EFAULT;
  
                if ((gso.flags & VIRTIO_NET_HDR_F_NEEDS_CSUM) &&
 -                  gso.csum_start + gso.csum_offset + 2 > gso.hdr_len)
 -                      gso.hdr_len = gso.csum_start + gso.csum_offset + 2;
 +                  tun16_to_cpu(tun, gso.csum_start) + tun16_to_cpu(tun, gso.csum_offset) + 2 > tun16_to_cpu(tun, gso.hdr_len))
 +                      gso.hdr_len = cpu_to_tun16(tun, tun16_to_cpu(tun, gso.csum_start) + tun16_to_cpu(tun, gso.csum_offset) + 2);
  
 -              if (gso.hdr_len > len)
 +              if (tun16_to_cpu(tun, gso.hdr_len) > len)
                        return -EINVAL;
-               offset += tun->vnet_hdr_sz;
+               iov_iter_advance(from, tun->vnet_hdr_sz - sizeof(gso));
        }
  
 -      if ((tun->flags & TUN_TYPE_MASK) == TUN_TAP_DEV) {
 +      if ((tun->flags & TUN_TYPE_MASK) == IFF_TAP) {
                align += NET_IP_ALIGN;
                if (unlikely(len < ETH_HLEN ||
 -                           (gso.hdr_len && gso.hdr_len < ETH_HLEN)))
 +                           (gso.hdr_len && tun16_to_cpu(tun, gso.hdr_len) < ETH_HLEN)))
                        return -EINVAL;
        }
  
@@@ -1260,14 -1243,17 +1262,17 @@@ static ssize_t tun_put_user(struct tun_
        if (vlan_tx_tag_present(skb))
                vlan_hlen = VLAN_HLEN;
  
 -      if (tun->flags & TUN_VNET_HDR)
 +      if (tun->flags & IFF_VNET_HDR)
                vnet_hdr_sz = tun->vnet_hdr_sz;
  
 -      if (!(tun->flags & TUN_NO_PI)) {
+       total = skb->len + vlan_hlen + vnet_hdr_sz;
-               if ((len -= sizeof(pi)) < 0)
 +      if (!(tun->flags & IFF_NO_PI)) {
+               if (iov_iter_count(iter) < sizeof(pi))
                        return -EINVAL;
  
-               if (len < skb->len + vlan_hlen + vnet_hdr_sz) {
+               total += sizeof(pi);
+               if (iov_iter_count(iter) < total) {
                        /* Packet will be striped */
                        pi.flags |= TUN_PKT_STRIP;
                }
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index c54fcb5993c31a5eb3eb24074e3d2bf8b6d42334,5b6a36cb77fbdb1f1eeb74361a7532dce581d592..d8e1716707baed8db48ccae88a299fc9106544ba
@@@ -429,7 -429,6 +430,8 @@@ header-y += virtio_net.
  header-y += virtio_pci.h
  header-y += virtio_ring.h
  header-y += virtio_rng.h
 +header-y += virtio_scsi.h
++header-y += virtio_types.h
  header-y += vm_sockets.h
  header-y += vt.h
  header-y += wait.h
diff --cc lib/Makefile
Simple merge
Simple merge
diff --cc net/core/dev.c
Simple merge
Simple merge
index 6e3b9117db1f799ded98e1473d4c4d03e10bfd16,49a64174f3f1777bc015ee01d7692afceb5dc0da..43c926cae9c00de1306144abcddcf64f510c2864
@@@ -294,39 -303,35 +303,37 @@@ static int seq_show(struct seq_file *s
  {
        loff_t *pos = v;
        const struct nf_logger *logger;
 -      int i, ret;
 +      int i;
        struct net *net = seq_file_net(s);
  
-       logger = rcu_dereference_protected(net->nf.nf_loggers[*pos],
-                                          lockdep_is_held(&nf_log_mutex));
+       logger = nft_log_dereference(net->nf.nf_loggers[*pos]);
  
        if (!logger)
 -              ret = seq_printf(s, "%2lld NONE (", *pos);
 +              seq_printf(s, "%2lld NONE (", *pos);
        else
 -              ret = seq_printf(s, "%2lld %s (", *pos, logger->name);
 +              seq_printf(s, "%2lld %s (", *pos, logger->name);
  
 -      if (ret < 0)
 -              return ret;
 +      if (seq_has_overflowed(s))
 +              return -ENOSPC;
  
        for (i = 0; i < NF_LOG_TYPE_MAX; i++) {
                if (loggers[*pos][i] == NULL)
                        continue;
  
-               logger = rcu_dereference_protected(loggers[*pos][i],
-                                          lockdep_is_held(&nf_log_mutex));
+               logger = nft_log_dereference(loggers[*pos][i]);
 -              ret = seq_printf(s, "%s", logger->name);
 -              if (ret < 0)
 -                      return ret;
 -              if (i == 0 && loggers[*pos][i + 1] != NULL) {
 -                      ret = seq_printf(s, ",");
 -                      if (ret < 0)
 -                              return ret;
 -              }
 +              seq_printf(s, "%s", logger->name);
 +              if (i == 0 && loggers[*pos][i + 1] != NULL)
 +                      seq_printf(s, ",");
 +
 +              if (seq_has_overflowed(s))
 +                      return -ENOSPC;
        }
  
 -      return seq_printf(s, ")\n");
 +      seq_printf(s, ")\n");
 +
 +      if (seq_has_overflowed(s))
 +              return -ENOSPC;
 +      return 0;
  }
  
  static const struct seq_operations nflog_seq_ops = {
Simple merge