1. 22 Mar, 2017 6 commits
  2. 21 Mar, 2017 20 commits
    • David S. Miller's avatar
      Merge branch 'usbnet-ksettings' · b6e13aea
      David S. Miller authored
      Philippe Reynes says:
      
      ====================
      net: usbnet: move to new api ethtool_{get|set}_link_ksettings
      
      The ethtool api {get|set}_settings is deprecated. On usbnet, it
      was often implemented with usbnet_{get|set}_settings.
      
      In this series, I add usbnet_{get|set}_link_ksettings
      in the first patch, then I update all the driver to
      use this new api, and in the last patch I remove the
      old api usbnet_{get|set}_settings.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b6e13aea
    • Philippe Reynes's avatar
      net: usb: usb: remove old api ethtool_{get|set}_settings · bde87ad6
      Philippe Reynes authored
      The function usbnet_{get|set}_settings is no longer used,
      so we remove it.
      Signed-off-by: default avatarPhilippe Reynes <tremyfr@gmail.com>
      Acked-by: default avatarOliver Neukum <oneukum@suse.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bde87ad6
    • Philippe Reynes's avatar
      net: usb: asix: use new api ethtool_{get|set}_link_ksettings · fd4f0a75
      Philippe Reynes authored
      The ethtool api {get|set}_settings is deprecated.
      We move this driver to new api {get|set}_link_ksettings.
      
      As I don't have the hardware, I'd be very pleased if
      someone may test this patch.
      Signed-off-by: default avatarPhilippe Reynes <tremyfr@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fd4f0a75
    • Philippe Reynes's avatar
      net: usb: sr9700: use new api ethtool_{get|set}_link_ksettings · 39f49ead
      Philippe Reynes authored
      The ethtool api {get|set}_settings is deprecated.
      We move this driver to new api {get|set}_link_ksettings.
      
      As I don't have the hardware, I'd be very pleased if
      someone may test this patch.
      Signed-off-by: default avatarPhilippe Reynes <tremyfr@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      39f49ead
    • Philippe Reynes's avatar
      net: usb: smsc75xx: use new api ethtool_{get|set}_link_ksettings · a44017a5
      Philippe Reynes authored
      The ethtool api {get|set}_settings is deprecated.
      We move this driver to new api {get|set}_link_ksettings.
      
      As I don't have the hardware, I'd be very pleased if
      someone may test this patch.
      Signed-off-by: default avatarPhilippe Reynes <tremyfr@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a44017a5
    • Philippe Reynes's avatar
      net: usb: sierra_net: use new api ethtool_{get|set}_link_ksettings · 90a8e95e
      Philippe Reynes authored
      The ethtool api {get|set}_settings is deprecated.
      We move this driver to new api {get|set}_link_ksettings.
      
      As I don't have the hardware, I'd be very pleased if
      someone may test this patch.
      Signed-off-by: default avatarPhilippe Reynes <tremyfr@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      90a8e95e
    • Philippe Reynes's avatar
      net: usb: mcs7830: use new api ethtool_{get|set}_link_ksettings · 17400f77
      Philippe Reynes authored
      The ethtool api {get|set}_settings is deprecated.
      We move this driver to new api {get|set}_link_ksettings.
      
      As I don't have the hardware, I'd be very pleased if
      someone may test this patch.
      Signed-off-by: default avatarPhilippe Reynes <tremyfr@gmail.com>
      Tested-by: default avatarpoma <poma@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      17400f77
    • Philippe Reynes's avatar
      net: usb: dm9601: use new api ethtool_{get|set}_link_ksettings · bcb58f77
      Philippe Reynes authored
      The ethtool api {get|set}_settings is deprecated.
      We move this driver to new api {get|set}_link_ksettings.
      
      As I don't have the hardware, I'd be very pleased if
      someone may test this patch.
      Signed-off-by: default avatarPhilippe Reynes <tremyfr@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bcb58f77
    • Philippe Reynes's avatar
      net: usb: cdc_ncm: use new api ethtool_{get|set}_link_ksettings · d0b3ab30
      Philippe Reynes authored
      The ethtool api {get|set}_settings is deprecated.
      We move this driver to new api {get|set}_link_ksettings.
      
      As I don't have the hardware, I'd be very pleased if
      someone may test this patch.
      Signed-off-by: default avatarPhilippe Reynes <tremyfr@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d0b3ab30
    • Philippe Reynes's avatar
      net: usb: sr9800: use new api ethtool_{get|set}_link_ksettings · d8c3de2e
      Philippe Reynes authored
      The ethtool api {get|set}_settings is deprecated.
      We move this driver to new api {get|set}_link_ksettings.
      
      As I don't have the hardware, I'd be very pleased if
      someone may test this patch.
      Signed-off-by: default avatarPhilippe Reynes <tremyfr@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d8c3de2e
    • Philippe Reynes's avatar
      net: usb: smsc95xx: use new api ethtool_{get|set}_link_ksettings · eaf9a32a
      Philippe Reynes authored
      The ethtool api {get|set}_settings is deprecated.
      We move this driver to new api {get|set}_link_ksettings.
      
      As I don't have the hardware, I'd be very pleased if
      someone may test this patch.
      Signed-off-by: default avatarPhilippe Reynes <tremyfr@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      eaf9a32a
    • Philippe Reynes's avatar
      net: usb: usbnet: add new api ethtool_{get|set}_link_ksettings · 8bae3551
      Philippe Reynes authored
      The ethtool api {get|set}_settings is deprecated.
      We add the new api {get|set}_link_ksettings to this driver.
      
      As I don't have the hardware, I'd be very pleased if
      someone may test this patch.
      Signed-off-by: default avatarPhilippe Reynes <tremyfr@gmail.com>
      Acked-by: default avatarOliver Neukum <oneukum@suse.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8bae3551
    • Florian Fainelli's avatar
      net: bcmgenet: Track per TX/RX rings statistics · 37a30b43
      Florian Fainelli authored
      __bcmgenet_tx_reclaim() is currently summing TX bytes/packets in a way
      that is not SMP friendly, mutliples CPUs could run
      __bcmgenet_tx_reclaim() independently and still update stats->tx_bytes
      and stats->tx_packets, cloberring the other CPUs statistics.
      
      Fix this by tracking per RX and TX rings the number of bytes, packets,
      dropped and errors statistics, and provide a bcmgenet_get_stats()
      function which aggregates everything and returns a consistent output.
      Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      37a30b43
    • Nikolay Aleksandrov's avatar
      net: ipv4: add support for ECMP hash policy choice · bf4e0a3d
      Nikolay Aleksandrov authored
      This patch adds support for ECMP hash policy choice via a new sysctl
      called fib_multipath_hash_policy and also adds support for L4 hashes.
      The current values for fib_multipath_hash_policy are:
       0 - layer 3 (default)
       1 - layer 4
      If there's an skb hash already set and it matches the chosen policy then it
      will be used instead of being calculated (currently only for L4).
      In L3 mode we always calculate the hash due to the ICMP error special
      case, the flow dissector's field consistentification should handle the
      address order thus we can remove the address reversals.
      If the skb is provided we always use it for the hash calculation,
      otherwise we fallback to fl4, that is if skb is NULL fl4 has to be set.
      Signed-off-by: default avatarNikolay Aleksandrov <nikolay@cumulusnetworks.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bf4e0a3d
    • Andrey Vagin's avatar
      net/8021q: create device with all possible features in wanted_features · 88997e42
      Andrey Vagin authored
      wanted_features is a set of features which have to be enabled if a
      hardware allows that.
      
      Currently when a vlan device is created, its wanted_features is set to
      current features of its base device.
      
      The problem is that the base device can get new features and they are
      not propagated to vlan-s of this device.
      
      If we look at bonding devices, they doesn't have this problem and this
      patch suggests to fix this issue by the same way how it works for bonding
      devices.
      
      We meet this problem, when we try to create a vlan device over a bonding
      device. When a system are booting, real devices require time to be
      initialized, so bonding devices created without slaves, then vlan
      devices are created and only then ethernet devices are added to the
      bonding device. As a result we have vlan devices with disabled
      scatter-gather.
      
      * create a bonding device
        $ ip link add bond0 type bond
        $ ethtool -k bond0 | grep scatter
        scatter-gather: off
      	tx-scatter-gather: off [requested on]
      	tx-scatter-gather-fraglist: off [requested on]
      
      * create a vlan device
        $ ip link add link bond0 name bond0.10 type vlan id 10
        $ ethtool -k bond0.10 | grep scatter
        scatter-gather: off
      	tx-scatter-gather: off
      	tx-scatter-gather-fraglist: off
      
      * Add a slave device to bond0
        $ ip link set dev eth0 master bond0
      
      And now we can see that the bond0 device has got the scatter-gather
      feature, but the bond0.10 hasn't got it.
      [root@laptop linux-task-diag]# ethtool -k bond0 | grep scatter
      scatter-gather: on
      	tx-scatter-gather: on
      	tx-scatter-gather-fraglist: on
      [root@laptop linux-task-diag]# ethtool -k bond0.10 | grep scatter
      scatter-gather: off
      	tx-scatter-gather: off
      	tx-scatter-gather-fraglist: off
      
      With this patch the vlan device will get all new features from the
      bonding device.
      
      Here is a call trace how features which are set in this patch reach
      dev->wanted_features.
      
      register_netdevice
         vlan_dev_init
      	...
      	dev->hw_features = NETIF_F_HW_CSUM | NETIF_F_SG |
      		       NETIF_F_FRAGLIST | NETIF_F_GSO_SOFTWARE |
      		       NETIF_F_HIGHDMA | NETIF_F_SCTP_CRC |
      		       NETIF_F_ALL_FCOE;
      
      	dev->features |= dev->hw_features;
      	...
          dev->wanted_features = dev->features & dev->hw_features;
          __netdev_update_features(dev);
              vlan_dev_fix_features
      	   ...
      
      Cc: Alexey Kuznetsov <kuznet@virtuozzo.com>
      Cc: Patrick McHardy <kaber@trash.net>
      Cc: "David S. Miller" <davem@davemloft.net>
      Signed-off-by: default avatarAndrei Vagin <avagin@openvz.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      88997e42
    • Ezequiel Lara Gomez's avatar
      Cleanup some warning from timestamping code. · b3407c8e
      Ezequiel Lara Gomez authored
      Following checkpatch.pl recommendations (which include
      replacing with <linux/io.h> the <asm/io.h>, since linux/io.h includes
      it).
      Signed-off-by: default avatarEzequiel Lara Gomez <ezegomez@amazon.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b3407c8e
    • Ezequiel Lara Gomez's avatar
      Enable tx timestamping on loopback and dummy · 6df014cf
      Ezequiel Lara Gomez authored
      This enables developing code that uses SOF_TIMESTAMPING_TX_SOFTWARE
      by using localhost addresses (without needing to send packets outside),
      as well as enabling unit and functional testing of TX timestamping code
      without needing hardware support or network access.
      
      It also fulfills the expectation of software network devices supporting
      software-based timestamping.
      
      Tested on qemu using txtimestamping.c from the kernel selftests, and
      ethtool -T.
      Signed-off-by: default avatarEzequiel Lara Gomez <ezegomez@amazon.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6df014cf
    • David S. Miller's avatar
      Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue · 406910a8
      David S. Miller authored
      Jeff Kirsher says:
      
      ====================
      40GbE Intel Wired LAN Driver Updates 2017-03-20
      
      This series contains updates to i40e and i40evf only.
      
      Philippe Reynes updates i40e and i40evf to use the new ethtool API for
      {get|set}_link_ksettings.
      
      Jake provides the remaining patches in the series, starting with a fix
      for i40e where the firmware expected the port numbers for the offloaded
      UDP tunnels in Little Endian format and we were sending them in Big Endian
      format which put the wrong port number to be put in the UDP tunnel list.
      Changed the driver to use __be32 values instead of arrays for
      (src|dst)_ip.  Refactored the exit flow of i40e_add_fdir_ethtool() which
      removes the dependency on having a non-zero return value.  Fixed a memory
      leak by running kfree() and returning immediately when we fail to add
      flow director filter.  Fixed a potential issue where could update the
      filter count without actually succeeding in adding a filter, by moving
      the ATR exit check to after we have sent the TCP/IPv4 filter to the ring
      successfully.  Ensures that the fd_tcp_rule count is reset to 0, before
      we reprogram the filters so that we do not end up with a stale count
      which does not correctly reflect the number of programmed filters.  Added
      a check whether we have TCP/IPv4 filters before re-enabling ATR after
      flushing and replaying FDIR filters.  Added counters for each filter
      type in preparation for adding code to properly check the mask value.
      Fixed potential issues by explicitly checking the flow type at the
      start of i40e_add_fdir_ethtool().  To avoid possible memory leaks,
      we now unconditionally delete the old filter, even if it is identical to
      the new filter and ensures will always update the filters as expected.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      406910a8
    • David S. Miller's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next · 41e95736
      David S. Miller authored
      Pablo Neira Ayuso says:
      
      ====================
      Netfilter/IPVS updates for net-next
      
      The following patchset contains Netfilter/IPVS updates for your
      net-next tree. A couple of new features for nf_tables, and unsorted
      cleanups and incremental updates for the Netfilter tree. More
      specifically, they are:
      
      1) Allow to check for TCP option presence via nft_exthdr, patch
         from Phil Sutter.
      
      2) Add symmetric hash support to nft_hash, from Laura Garcia Liebana.
      
      3) Use pr_cont() in ebt_log, from Joe Perches.
      
      4) Remove some dead code in arp_tables reported via static analysis
         tool, from Colin Ian King.
      
      5) Consolidate nf_tables expression validation, from Liping Zhang.
      
      6) Consolidate set lookup via nft_set_lookup().
      
      7) Remove unnecessary rcu read lock side in bridge netfilter, from
         Florian Westphal.
      
      8) Remove unused variable in nf_reject_ipv4, from Tahee Yoo.
      
      9) Pass nft_ctx struct to object initialization indirections, from
         Florian Westphal.
      
      10) Add code to integrate conntrack helper into nf_tables, also from
          Florian.
      
      11) Allow to check if interface index or name exists via
          NFTA_FIB_F_PRESENT, from Phil Sutter.
      
      12) Simplify resolve_normal_ct(), from Florian.
      
      13) Use per-limit spinlock in nft_limit and xt_limit, from Liping Zhang.
      
      14) Use rwlock in nft_set_rbtree set, also from Liping Zhang.
      
      15) One patch to remove a useless printk at netns init path in ipvs,
          and several patches to document IPVS knobs.
      
      16) Use refcount_t for reference counter in the Netfilter/IPVS code,
          from Elena Reshetova.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      41e95736
    • David S. Miller's avatar
      Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue · b9974d76
      David S. Miller authored
      Jeff Kirsher says:
      
      ====================
      1GbE Intel Wired LAN Driver Updates 2017-03-17
      
      This series contains updates to mainly igb, with one fix for ixgbe.
      
      Alex does all the changes in the series, starting with adding support
      for DMA_ATTR_WEAK_ORDERING to improve performance on some platforms.
      Modified igb to use the length of the packet instead of the DD status
      bit to determine if a new descriptor is ready to be processed.  Modified
      the driver to only go through the region in the receive ring that was
      designated to be cleaned up, instead of going through the entire ring
      on cleanup.  Cleaned up the transmit side, by clearing the transmit
      buffer_info only when resetting the rings.  Added a new upper limit for
      receive, which is based on the size of a 2K buffer minus padding, which
      will allow us to support build_skb going forward.  Fixed ethtool testing
      to only sync on the size of the frame that is being tested, instead of
      the entire receive buffer.  Updated the handling of page addresses to
      always use a void pointer with the consistent name of "va" to indicate
      that we are working with a virtual address.  Added a "chicken bit" so
      that we can turn off the new receive allocation feature, in the case
      where we need to fallback to the legacy receive path.  Added support for
      using 3K buffers in order 1 pages the same way we were using 2K buffers
      in 4K pages.  Added support for padding packet, since we limit the size
      of the frame, we are able to write to an offset within the buffer instead
      of having to write at the very start of the buffer.  This allows us to
      leaving padding room for things like supporting XDP in the future.
      Refactored the receive buffer page management, since there are 2-3 paths
      that can be taken depending on what receive modes are enabled, so to
      improve maintainability, break out the common bits into their own
      functions.  Add support for build_skb, again.  Lastly, fixed a typo in
      igb and ixgbe code comments.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b9974d76
  3. 20 Mar, 2017 13 commits
  4. 18 Mar, 2017 1 commit