1. 08 1月, 2017 2 次提交
  2. 24 9月, 2016 1 次提交
    • M
      net: Update API for VF vlan protocol 802.1ad support · 79aab093
      Moshe Shemesh 提交于
      Introduce new rtnl UAPI that exposes a list of vlans per VF, giving
      the ability for user-space application to specify it for the VF, as an
      option to support 802.1ad.
      We adjusted IP Link tool to support this option.
      
      For future use cases, the new UAPI supports multiple vlans. For now we
      limit the list size to a single vlan in kernel.
      Add IFLA_VF_VLAN_LIST in addition to IFLA_VF_VLAN to keep backward
      compatibility with older versions of IP Link tool.
      
      Add a vlan protocol parameter to the ndo_set_vf_vlan callback.
      We kept 802.1Q as the drivers' default vlan protocol.
      Suitable ip link tool command examples:
        Set vf vlan protocol 802.1ad:
          ip link set eth0 vf 1 vlan 100 proto 802.1ad
        Set vf to VST (802.1Q) mode:
          ip link set eth0 vf 1 vlan 100 proto 802.1Q
        Or by omitting the new parameter
          ip link set eth0 vf 1 vlan 100
      Signed-off-by: NMoshe Shemesh <moshe@mellanox.com>
      Signed-off-by: NTariq Toukan <tariqt@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      79aab093
  3. 29 8月, 2016 4 次提交
  4. 21 7月, 2016 2 次提交
    • J
      fm10k: wait for queues to drain if stop_hw() fails once · 94877768
      Jacob Keller 提交于
      It turns out that sometimes during a reset the Tx queues will be
      temporarily stuck longer than .stop_hw() expects. Work around this issue
      by attempting to .stop_hw() first. If it tails, wait a number of
      attempts until the Tx queues appear to be drained. After this, attempt
      stop_hw() again. This ensures that we avoid waiting if we don't need to,
      such as during the first initialization of a VF, and give the proper
      amount of time necessary to recover from most situations. It is possible
      that the hardware is actually stuck. For PFs, this is usually fixed by
      a datapath reset. Unfortunately the VF cannot request a similar reset
      for itself.
      Signed-off-by: NJacob Keller <jacob.e.keller@intel.com>
      Tested-by: NKrishneil Singh <Krishneil.k.singh@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      94877768
    • J
      fm10k: prevent multiple threads updating statistics · 9d73edee
      Jacob Keller 提交于
      Also prevent updating stats while the interface is down. If we're
      already updating stats, just return doing nothing. When we take the
      device down, block stat updates until we come back up. This ensures that
      we avoid tearing down rings when we're updating statistics, and prevents
      updating statistics until we're up.
      
      We can't re-use the __FM10K_DOWN for this because it wouldn't prevent
      multiple threads from accessing statistics. Neither does it prevent the
      case where we start updating stats and then start going down in another
      thread.
      
      The fm10k_get_stats64 is except from this, because it has a completely
      different flow which does not suffer from the same issues as
      fm10k_update_stats might.
      Signed-off-by: NJacob Keller <jacob.e.keller@intel.com>
      Tested-by: NKrishneil Singh <Krishneil.k.singh@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      9d73edee
  5. 30 6月, 2016 1 次提交
  6. 21 4月, 2016 3 次提交
  7. 06 4月, 2016 2 次提交
  8. 14 12月, 2015 5 次提交
  9. 06 12月, 2015 5 次提交
  10. 24 11月, 2015 1 次提交
  11. 23 9月, 2015 1 次提交
  12. 15 4月, 2015 3 次提交
  13. 03 3月, 2015 1 次提交
  14. 02 10月, 2014 1 次提交
  15. 23 9月, 2014 8 次提交
    • A
      fm10k: Add support for PTP · a211e013
      Alexander Duyck 提交于
      This change adds support for the Linux PTP Hardware clock and timestamping
      functionality provided by the hardware.  There are actually two cases that
      this timestamping is meant to support.
      
      The first case would be an ordinary clock scenario.  In this configuration
      the host interface does not have access to BAR 4.  However all of the host
      interfaces should be locked into the same boundary clock region and as such
      they are all on the same clock anyway.  With this being the case they can
      synchronize among themselves and only need to adjust the offset since they
      are all on the same clock with the same frequency.
      
      The second case is a boundary clock scenario.  This is a special case and
      would require both BAR 4 access, and a means of presenting a netdev per
      boundary region.  The current plan is to use DSA at some point in the
      future to provide these interfaces, but the DSA portion is still under
      development.
      Signed-off-by: NAlexander Duyck <alexander.h.duyck@intel.com>
      Acked-by: NRichard Cochran <richardcochran@gmail.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      a211e013
    • A
      fm10k: Add support for debugfs · 7461fd91
      Alexander Duyck 提交于
      This patch adds limited debugfs support for the driver.  Most of the
      functionality needed for dumping registers is already provided via ethtool.
      The only thing we saw that we really neeed was the ability to dump the
      descriptor rings so as such this patch will add a fm10k directory containing a
      listing of directories each one with a unique PCI Bus, Device, and Function
      number.  Each of those BDF directories will have a list of q_vectors, and
      the q_vectors will contain a file for each of the Rx/Tx rings that are a part
      of the vector.  For example:
      
      # ls -RD /sys/kernel/debug/fm10k/
      /sys/kernel/debug/fm10k/:
      0000:01:00.0
      
      /sys/kernel/debug/fm10k/0000:01:00.0:
      q_vector.000  q_vector.001  q_vector.002  q_vector.003
      
      /sys/kernel/debug/fm10k/0000:01:00.0/q_vector.000:
      rx_ring.000  tx_ring.000
      
      /sys/kernel/debug/fm10k/0000:01:00.0/q_vector.001:
      rx_ring.001  tx_ring.001
      
      /sys/kernel/debug/fm10k/0000:01:00.0/q_vector.002:
      rx_ring.002  tx_ring.002
      
      /sys/kernel/debug/fm10k/0000:01:00.0/q_vector.003:
      rx_ring.003  tx_ring.003
      
      # cat /sys/kernel/debug/fm10k/0000:01:00.0/q_vector.000/rx_ring.000
      DES DATA       RSS        STATERR    LENGTH VLAN   DGLORT SGLORT TIMESTAMP
      ---------------------------------------------------------------------------
      000 0x00000000 0x00000000 0x00000003 0x002a 0x0000 0x0000 0x0000 0x13951807dc4fedf0
      001 0x00000000 0x00000000 0x00000003 0x002a 0x0000 0x0000 0x0000 0x1395180906c9f2c8
      002 0x3731c000 0x00000000 0x00000000 0x0000 0x0000 0x0000 0x0000 0x0000000000000000
      003 0x3731d000 0x00000000 0x00000000 0x0000 0x0000 0x0000 0x0000 0x0000000000000000
      004 0xaab3a000 0x00000000 0x00000000 0x0000 0x0000 0x0000 0x0000 0x0000000000000000
      ...
      
      # cat /sys/kernel/debug/fm10k/0000:01:00.0/q_vector.000/tx_ring.000
      DES BUFFER_ADDRESS     LENGTH VLAN   MSS    HDRLEN FLAGS
      ---------------------------------------------------------
      000 0x00000000aa8a1002 0x005a 0x0000 0x0000 0x0000 0xc0
      001 0x00000000aa8a2002 0x005a 0x0000 0x0000 0x0000 0xc0
      002 0x000000006bc13202 0x004e 0x0000 0x0000 0x0000 0xc0
      003 0x000000006bc13c02 0x002a 0x0000 0x0000 0x0000 0xe1
      004 0x000000006bc13602 0x0062 0x0000 0x0000 0x0000 0xc0
      Signed-off-by: NAlexander Duyck <alexander.h.duyck@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      7461fd91
    • A
      fm10k: Add support for IEEE DCBx · 9f801abc
      Alexander Duyck 提交于
      This patch adds support for management of the limited QOS features of the
      FM10000 interface.  Specifically we can support up to 8 traffic classes,
      however the part only provides 1 Rx and 1 Tx FIFO in the host interface and
      as a result this can lead to head-of-line blocking on Rx.  This can be
      avoided by setting PFC only for priorities that cannot afford to drop
      frames.
      Signed-off-by: NAlexander Duyck <alexander.h.duyck@intel.com>
      Acked-by: NJohn Fastabend <john.r.fastabend@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      9f801abc
    • A
      fm10k: Add support for SR-IOV to driver · 883a9ccb
      Alexander Duyck 提交于
      This patch combines the recently added VF messaging and configuration
      functionality with the interfaces provided by the kernel to allow for
      configuration and management of SR-IOV.
      Signed-off-by: NAlexander Duyck <alexander.h.duyck@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      883a9ccb
    • A
      fm10k: Add support for VF · 5cb8db4a
      Alexander Duyck 提交于
      This patch provides the functions necessary to configure the VF making use
      of the same API pointers as the PF.
      Signed-off-by: NAlexander Duyck <alexander.h.duyck@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      5cb8db4a
    • A
      fm10k: Add support for MACVLAN acceleration · 5cd5e2e9
      Alexander Duyck 提交于
      This patch adds support for L2 MACVLAN by making use of the fact that the
      RRC provides a unique tag per filter called a Global Resource Tag, or GLORT.
      In the case of this offload what I have done is assigned a linear block of
      these so that each GLORT represents one of the MACVLAN netdevs.  By doing
      this I can share the Rx queues and Tx queues for all of the MACVLAN netdevs
      while allowing them to be demuxed in the Rx cleanup path.
      Signed-off-by: NAlexander Duyck <alexander.h.duyck@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      5cd5e2e9
    • A
      fm10k: Add support for multiple queues · aa3ac822
      Alexander Duyck 提交于
      This patch takes the driver from supporting a single queue to supporting
      multiple queues.  The upper queue limit for the PF is 128 queues and the
      upper limit for the VF is (128 / num_vfs) rounded down to nearest power of 2.
      Signed-off-by: NAlexander Duyck <alexander.h.duyck@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      aa3ac822
    • A
      fm10k: Add ethtool support · 82dd0f7e
      Alexander Duyck 提交于
      This patch adds basic ethtool support to the device to allow for configuration.
      Signed-off-by: NAlexander Duyck <alexander.h.duyck@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      82dd0f7e