1. 17 Apr, 2016 26 commits
  2. 16 Apr, 2016 14 commits
    • Andrew Lunn's avatar
      dsa: mv88e6xxx: Kill the REG_READ and REG_WRITE macros · 48ace4ef
      Andrew Lunn authored
      These macros hide a ds variable and a return statement on error, which
      can lead to locking issues. Kill them off.
      Signed-off-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Tested-by: default avatarVivien Didelot <vivien.didelot@savoirfairelinux.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      48ace4ef
    • Alexander Duyck's avatar
      netdev_features: Add NETIF_F_TSO_MANGLEID to NETIF_F_ALL_TSO · 756ca874
      Alexander Duyck authored
      I realized that when I added NETIF_F_TSO_MANGLEID as a TSO type I forgot to
      add it to NETIF_F_ALL_TSO.  This patch corrects that so the flag will be
      included correctly.
      
      The result should be minor as it was only used by a few drivers and in a
      few specific cases such as when NETIF_F_SG was not supported on a device so
      the TSO flags were cleared.
      Signed-off-by: default avatarAlexander Duyck <aduyck@mirantis.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      756ca874
    • David S. Miller's avatar
      Merge branch 'ipv6-gre-offloads' · ac979929
      David S. Miller authored
      Alexander Duyck says:
      
      ====================
      Add support for offloads with IPv6 GRE tunnels
      
      This patch series enables the use of segmentation and checksum offloads
      with IPv6 based GRE tunnels.
      
      In order to enable this series I had to make a change to
      iptunnel_handle_offloads so that it would no longer free the skb.  This was
      necessary as there were multiple paths in the IPv6 GRE code that required
      the skb to still be present so it could be freed.  As it turned out I
      believe this actually fixes a bug that was present in FOU/GUE based tunnels
      anyway.
      
      Below is a quick breakdown of the performance gains seen with a simple
      netperf test passing traffic through a ip6gretap tunnel and then an i40e
      interface:
      
      Throughput Throughput  Local Local   Result
                 Units       CPU   Service Tag
                             Util  Demand
                             %
      3544.93    10^6bits/s  6.30  4.656   "before"
      13081.75   10^6bits/s  3.75  0.752   "after"
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ac979929
    • Alexander Duyck's avatar
      ip6gre: Add support for GSO · 3a80e1fa
      Alexander Duyck authored
      This patch adds code borrowed from bits and pieces of other protocols to
      the IPv6 GRE path so that we can support GSO over IPv6 based GRE tunnels.
      By adding this support we are able to significantly improve the throughput
      for GRE tunnels as we are able to make use of GSO.
      Signed-off-by: default avatarAlexander Duyck <aduyck@mirantis.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3a80e1fa
    • Alexander Duyck's avatar
      GRE: Add support for GRO/GSO of IPv6 GRE traffic · e0c20967
      Alexander Duyck authored
      Since GRE doesn't really care about L3 protocol we can support IPv4 and
      IPv6 using the same offloads.  With that being the case we can add a call
      to register the offloads for IPv6 as a part of our GRE offload
      initialization.
      Signed-off-by: default avatarAlexander Duyck <aduyck@mirantis.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e0c20967
    • Alexander Duyck's avatar
      ip6gre: Add support for basic offloads offloads excluding GSO · ac4eb009
      Alexander Duyck authored
      This patch adds support for the basic offloads we support on most devices.
      Specifically with this patch set we can support checksum offload, basic
      scatter-gather, and highdma.
      Signed-off-by: default avatarAlexander Duyck <aduyck@mirantis.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ac4eb009
    • Alexander Duyck's avatar
      ip6gretap: Fix MTU to allow for Ethernet header · a9e242ca
      Alexander Duyck authored
      When we were creating an ip6gretap interface the MTU was about 6 bytes
      short of what was needed.  It turns out we were not taking the Ethernet
      header into account and as a result we were eating into the 8 bytes
      reserved for the encap limit.
      Signed-off-by: default avatarAlexander Duyck <aduyck@mirantis.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a9e242ca
    • Alexander Duyck's avatar
      ip_tunnel_core: iptunnel_handle_offloads returns int and doesn't free skb · aed069df
      Alexander Duyck authored
      This patch updates the IP tunnel core function iptunnel_handle_offloads so
      that we return an int and do not free the skb inside the function.  This
      actually allows us to clean up several paths in several tunnels so that we
      can free the skb at one point in the path without having to have a
      secondary path if we are supporting tunnel offloads.
      
      In addition it should resolve some double-free issues I have found in the
      tunnels paths as I believe it is possible for us to end up triggering such
      an event in the case of fou or gue.
      Signed-off-by: default avatarAlexander Duyck <aduyck@mirantis.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      aed069df
    • David S. Miller's avatar
      Merge branch 'w5100-spi-and-w5200-support' · ec9dcd35
      David S. Miller authored
      Akinobu Mita says:
      
      ====================
      net: w5100: add support W5100/W5200 for SPI interface
      
      This series add support for Wiznet W5100 and W5200 for SPI interface.
      
      We can easily find the ethernet modules and shield for Arduino with
      these chips for purchase.  I've tested them with BeagleBone.
      
      Wiznet W5100 for mmio access has already supported by w5100 driver.
      
      In order to share the code between mmio mode and SPI mode, this series
      firstly adds ability to support another register access interface to
      the existing w5100 driver.  This ground work also requires to introduce
      workqueue and threaded irq because SPI transfers are callable only from
      contexts that can sleep unlike mmio access.
      
      The latter part of this series adds w5100-spi driver which actually
      support W5100 and W5200 for SPI interface.  Supporting W5100 is
      straight forward because it only required to add a register access
      interface by the SPI transfer.  W5100 and W5200 have similar memory
      map which justifies adding W5200 support to w5100 driver.
      
      * Changes from v2 to v3
      - Add comment for reg_lock
      - Add ability to allocate ops specific data structure
      - Allocate w5200 ops specific data structure to put DMA-safe buffer
      - Add missing chip_id assignment for w5100_*_ops
      
      * Changes from v1 to v2
      - Use a plain single pointer instead of SKB queue, spotted by David S. Miller
      - Correct timeout period in w5100_command
      - Use spi_write_then_read instead of spi_write which needs DMA-safe buffer
      - Support W5200
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ec9dcd35
    • Akinobu Mita's avatar
      net: w5100: support W5200 · 0c165ff2
      Akinobu Mita authored
      This adds support for W5200 chip.
      
      W5100 and W5200 have similar memory map although some of their offsets
      are different.  The register access sequences between them are different
      but w5100 driver has abstraction layer for difference bus interface
      modes so it is easy to add W5200 support to w5100 and w5100-spi drivers.
      Signed-off-by: default avatarAkinobu Mita <akinobu.mita@gmail.com>
      Cc: Mike Sinkovsky <msink@permonline.ru>
      Cc: David S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0c165ff2
    • Akinobu Mita's avatar
      net: w5100: support SPI interface mode · 630cf097
      Akinobu Mita authored
      This adds new w5100-spi driver which shares the bus interface
      independent code with existing w5100 driver.
      Signed-off-by: default avatarAkinobu Mita <akinobu.mita@gmail.com>
      Cc: Mike Sinkovsky <msink@permonline.ru>
      Cc: David S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      630cf097
    • Akinobu Mita's avatar
      net: w5100: enable to support sleepable register access interface · bf2c6b90
      Akinobu Mita authored
      SPI transfer routines are callable only from contexts that can sleep.
      
      This adds ability to tell the core driver that the interface mode
      cannot access w5100 register on atomic contexts.  In this case,
      workqueue and threaded irq are required.
      
      This also corrects timeout period waiting for command register to be
      automatically cleared because the latency of the register access with
      SPI transfer can be interfered by other contexts.
      Signed-off-by: default avatarAkinobu Mita <akinobu.mita@gmail.com>
      Cc: Mike Sinkovsky <msink@permonline.ru>
      Cc: David S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bf2c6b90
    • Akinobu Mita's avatar
      net: w5100: add ability to support other bus interface · 850576cf
      Akinobu Mita authored
      The w5100 driver currently only supports direct and indirect bus
      interface mode which use MMIO space for accessing w5100 registers.
      
      In order to support SPI interface mode which is supported by W5100 chip,
      this makes the bus interface abstraction layer more generic so that
      separated w5100-spi driver can use w5100 driver as core module.
      Signed-off-by: default avatarAkinobu Mita <akinobu.mita@gmail.com>
      Cc: Mike Sinkovsky <msink@permonline.ru>
      Cc: David S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      850576cf
    • Akinobu Mita's avatar
      net: w5100: move mmiowb into register access callbacks · d6586d2e
      Akinobu Mita authored
      Instead of sprinkle mmiowb over the driver code, move it into primary
      register write callbacks. (w5100_write, w5100_write16, w5100_writebuf)
      
      This is a preparation for supporting SPI interface which doesn't use
      MMIO for accessing w5100 registers.
      Signed-off-by: default avatarAkinobu Mita <akinobu.mita@gmail.com>
      Cc: Mike Sinkovsky <msink@permonline.ru>
      Cc: David S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d6586d2e