1. 18 9月, 2018 1 次提交
    • J
      intel-ethernet: rename i40evf to iavf · 8062b226
      Jesse Brandeburg 提交于
      Rename the Intel Ethernet Adaptive Virtual Function driver
      (i40evf) to a new name (iavf) that is more consistent with
      the ongoing maintenance of the driver as the universal VF driver
      for multiple product lines.
      
      This first patch fixes up the directory names and the .ko name,
      intentionally ignoring the function names inside the driver
      for now.  Basically this is the simplest patch that gets
      the rename done and will be followed by other patches that
      rename the internal functions.
      
      This patch also addresses a couple of string/name issues
      and updates the Copyright year.
      
      Also, made sure to add a MODULE_ALIAS to the old name.
      Signed-off-by: NJesse Brandeburg <jesse.brandeburg@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      8062b226
  2. 28 4月, 2018 1 次提交
  3. 24 3月, 2018 1 次提交
  4. 13 2月, 2018 4 次提交
  5. 30 1月, 2018 1 次提交
  6. 24 1月, 2018 1 次提交
    • S
      i40e/i40evf: Detect and recover hung queue scenario · 07d44190
      Sudheer Mogilappagari 提交于
      In VFs, there is a known issue which can cause writebacks
      to not occur when interrupts are disabled and there are
      less than 4 descriptors resulting in TX timeout. Timeout
      can also occur due to lost interrupt.
      
      The current implementation for detecting and recovering
      from hung queues in the PF is problematic because it actually
      actively encourages lost interrupts.  By triggering a SW
      interrupt, interrupts are forced on.  If we are already in
      napi_poll and an interrupt fires, napi_poll will not be
      rescheduled and the interrupt is effectively lost; thereby
      potentially *causing* hung queues.
      
      This patch checks whether packets are being processed between
      every watchdog cycle and determine potential hung queue and
      fires triggers SW interrupt only for that particular queue.
      Signed-off-by: NSudheer Mogilappagari <sudheer.mogilappagari@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      07d44190
  7. 10 10月, 2017 2 次提交
  8. 06 10月, 2017 1 次提交
  9. 28 8月, 2017 2 次提交
    • J
      i40e/i40evf: avoid dynamic ITR updates when polling or low packet rate · 742c9875
      Jacob Keller 提交于
      The dynamic ITR algorithm depends on a calculation of usecs which
      assumes that the interrupts have been firing constantly at the interrupt
      throttle rate. This is not guaranteed because we could have a low packet
      rate, or have been polling in software.
      
      We'll estimate whether this is the case by using jiffies to determine if
      we've been too long. If the time difference of jiffies is larger we are
      guaranteed to have an incorrect calculation. If the time difference of
      jiffies is smaller we might have been polling some but the difference
      shouldn't affect the calculation too much.
      
      This ensures that we don't get stuck in BULK latency during certain rare
      situations where we receive bursts of packets that force us into NAPI
      polling.
      Signed-off-by: NJacob Keller <jacob.e.keller@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      742c9875
    • J
      i40e/i40evf: remove ULTRA latency mode · 0a2c7722
      Jacob Keller 提交于
      Since commit c56625d5 ("i40e/i40evf: change dynamic interrupt
      thresholds") a new higher latency ITR setting called I40E_ULTRA_LATENCY
      was added with a cryptic comment about how it was meant for adjusting Rx
      more aggressively when streaming small packets.
      
      This mode was attempting to calculate packets per second and then kick
      in when we have a huge number of small packets.
      
      Unfortunately, the ULTRA setting was kicking in for workloads it wasn't
      intended for including single-thread UDP_STREAM workloads.
      
      This wasn't caught for a variety of reasons. First, the ip_defrag
      routines were improved somewhat which makes the UDP_STREAM test still
      reasonable at 10GbE, even when dropped down to 8k interrupts a second.
      Additionally, some other obvious workloads appear to work fine, such
      as TCP_STREAM.
      
      The number 40k doesn't make sense for a number of reasons. First, we
      absolutely can do more than 40k packets per second. Second, we calculate
      the value inline in an integer, which sometimes can overflow resulting
      in using incorrect values.
      
      If we fix this overflow it makes it even more likely that we'll enter
      ULTRA mode which is the opposite of what we want.
      
      The ULTRA mode was added originally as a way to reduce CPU utilization
      during a small packet workload where we weren't keeping up anyways. It
      should never have been kicking in during these other workloads.
      
      Given the issues outlined above, let's remove the ULTRA latency mode. If
      necessary, a better solution to the CPU utilization issue for small
      packet workloads will be added in a future patch.
      Signed-off-by: NJacob Keller <jacob.e.keller@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      0a2c7722
  10. 26 8月, 2017 2 次提交
    • J
      i40e: separate hw_features from runtime changing flags · d36e41dc
      Jacob Keller 提交于
      The number of flags found in pf->flags has grown quite large, and there
      are a lot of different types of flags. Most of the flags are simply
      hardware features which are enabled on some firmware or some MAC types.
      Other flags are dynamic run-time flags which enable or disable certain
      features of the driver.
      
      Separate these two types of flags into pf->hw_features and pf->flags.
      The hw_features list will contain a set of features which are enabled at
      init time. This will not contain toggles or otherwise dynamically
      changing features. These flags should not need atomic protections, as
      they will be set once during init and then be essentially read only.
      
      Everything else will remain in the flags variable. These flags may be
      modified at any time during run time. A future patch may wish to convert
      these flags into set_bit/clear_bit/test_bit or similar approach to
      ensure atomic correctness.
      
      The I40E_FLAG_MFP_ENABLED flag may be a good fit for hw_features but
      currently is used by ethtool in the private flags settings, and thus has
      been left as part of flags.
      
      Additionally, I40E_FLAG_DCB_CAPABLE may be a good fit for the
      hw_features but this patch has not tried to untangle it yet.
      Signed-off-by: NJacob Keller <jacob.e.keller@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      d36e41dc
    • M
      i40e/i40evf: adjust packet size to account for double VLANs · 1e3a5fd5
      Mitch Williams 提交于
      Now that the kernel supports double VLAN tags, we should at least play
      nice. Adjust the max packet size to account for two VLAN tags, not just
      one.
      Signed-off-by: NMitch Williams <mitch.a.williams@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      1e3a5fd5
  11. 08 4月, 2017 2 次提交
  12. 29 3月, 2017 2 次提交
  13. 28 3月, 2017 2 次提交
  14. 15 3月, 2017 1 次提交
  15. 12 2月, 2017 1 次提交
  16. 07 12月, 2016 1 次提交
  17. 01 11月, 2016 1 次提交
  18. 25 9月, 2016 2 次提交
  19. 06 5月, 2016 4 次提交
  20. 14 4月, 2016 1 次提交
  21. 07 4月, 2016 1 次提交
  22. 05 4月, 2016 1 次提交
    • A
      i40e/i40evf: Allow up to 12K bytes of data per Tx descriptor instead of 8K · 5c4654da
      Alexander Duyck 提交于
      From what I can tell the practical limitation on the size of the Tx data
      buffer is the fact that the Tx descriptor is limited to 14 bits.  As such
      we cannot use 16K as is typically used on the other Intel drivers.  However
      artificially limiting ourselves to 8K can be expensive as this means that
      we will consume up to 10 descriptors (1 context, 1 for header, and 9 for
      payload, non-8K aligned) in a single send.
      
      I propose that we can reduce this by increasing the maximum data for a 4K
      aligned block to 12K.  We can reduce the descriptors used for a 32K aligned
      block by 1 by increasing the size like this.  In addition we still have the
      4K - 1 of space that is still unused.  We can use this as a bit of extra
      padding when dealing with data that is not aligned to 4K.
      
      By aligning the descriptors after the first to 4K we can improve the
      efficiency of PCIe accesses as we can avoid using byte enables and can fetch
      full TLP transactions after the first fetch of the buffer.  This helps to
      improve PCIe efficiency.  Below is the results of testing before and after
      with this patch:
      
      Recv   Send   Send                         Utilization      Service Demand
      Socket Socket Message  Elapsed             Send     Recv    Send    Recv
      Size   Size   Size     Time    Throughput  local    remote  local   remote
      bytes  bytes  bytes    secs.   10^6bits/s  % S      % U     us/KB   us/KB
      Before:
      87380  16384  16384    10.00     33682.24  20.27    -1.00   0.592   -1.00
      After:
      87380  16384  16384    10.00     34204.08  20.54    -1.00   0.590   -1.00
      
      So the net result of this patch is that we have a small gain in throughput
      due to a reduction in overhead for putting together the frame.
      Signed-off-by: NAlexander Duyck <aduyck@mirantis.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      5c4654da
  23. 19 2月, 2016 4 次提交
    • A
      i40e/i40evf: Rewrite logic for 8 descriptor per packet check · 2d37490b
      Alexander Duyck 提交于
      This patch is meant to rewrite the logic for how we determine if we can
      transmit the frame or if it needs to be linearized.
      
      The previous code for this function was using a mix of division and modulus
      division as a part of computing if we need to take the slow path.  Instead
      I have replaced this by simply working with a sliding window which will
      tell us if the frame would be capable of causing a single packet to span
      several descriptors.
      
      The logic for the scan is fairly simple.  If any given group of 6 fragments
      is less than gso_size - 1 then it is possible for us to have one byte
      coming out of the first fragment, 6 fragments, and one or more bytes coming
      out of the last fragment.  This gives us a total of 8 fragments
      which exceeds what we can allow so we send such frames to be linearized.
      
      Arguably the use of modulus might be more exact as the approach I propose
      may generate some false positives.  However the likelihood of us taking much
      of a hit for those false positives is fairly low, and I would rather not
      add more overhead in the case where we are receiving a frame composed of 4K
      pages.
      Signed-off-by: NAlexander Duyck <aduyck@mirantis.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      2d37490b
    • A
      i40e/i40evf: Break up xmit_descriptor_count from maybe_stop_tx · 4ec441df
      Alexander Duyck 提交于
      In an upcoming patch I would like to have access to the descriptor count
      used for the data portion of the frame.  For this reason I am splitting up
      the descriptor count function from the function that stops the ring.
      
      Also in order to try and reduce unnecessary duplication of code I am moving
      the slow-path portions of the code out of being inline calls so that we can
      just jump to them and process them instead of having to build them into
      each function that calls them.
      Signed-off-by: NAlexander Duyck <aduyck@mirantis.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      4ec441df
    • A
      i40e/i40evf: Add exception handling for Tx checksum · 529f1f65
      Alexander Duyck 提交于
      Add exception handling to the Tx checksum path so that we can handle cases
      of TSO where the frame is bad, or Tx checksum where we didn't recognize a
      protocol
      
      Drop I40E_TX_FLAGS_CSUM as it is unused, move the CHECKSUM_PARTIAL check
      into the function itself so that we can decrease indent.
      Signed-off-by: NAlexander Duyck <aduyck@mirantis.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      529f1f65
    • A
      i40e/i40evf: Drop outer checksum offload that was not requested · a9c9a81f
      Alexander Duyck 提交于
      The i40e and i40evf drivers contained code for inserting an outer checksum
      on UDP tunnels.  The issue however is that the upper levels of the stack
      never requested such an offload and it results in possible errors.
      
      In addition the same logic was being applied to the Rx side where it was
      attempting to validate the outer checksum, but the logic there was
      incorrect in that it was testing for the resultant sum to be equal to the
      header checksum instead of being equal to 0.
      
      Since this code is so massively flawed, and doing things that we didn't ask
      for it to do I am just dropping it, and will bring it back later to use as
      an offload for SKB_GSO_UDP_TUNNEL_CSUM which can make use of such a
      feature.
      
      As far as the Rx feature I am dropping it completely since it would need to
      be massively expanded and applied to IPv4 and IPv6 checksums for all parts,
      not just the one that supports Tx checksum offload for the outer.
      Signed-off-by: NAlexander Duyck <aduyck@mirantis.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      a9c9a81f
  24. 18 2月, 2016 1 次提交