1. 21 6月, 2017 2 次提交
  2. 13 6月, 2017 1 次提交
    • J
      i40e: fix handling of HW ATR eviction · 6964e53f
      Jacob Keller 提交于
      A recent commit to refactor the driver and remove the hw_disabled_flags
      field accidentally introduced two regressions. First, we overwrote
      pf->flags which removed various key flags including the MSI-X settings.
      
      Additionally, it was intended that we have now two flags,
      HW_ATR_EVICT_CAPABLE and HW_ATR_EVICT_ENABLED, but this was not done,
      and we accidentally were mis-using HW_ATR_EVICT_CAPABLE everywhere.
      
      This patch adds the missing piece, HW_ATR_EVICT_ENABLED, and safely
      updates pf->flags instead of overwriting it.
      
      Without this patch we will have many problems including disabling MSI-X
      support, and we'll attempt to use HW ATR eviction on devices which do
      not support it.
      
      Fixes: 47994c11 ("i40e: remove hw_disabled_flags in favor of using separate flag bits", 2017-04-19)
      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>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6964e53f
  3. 08 6月, 2017 1 次提交
  4. 06 6月, 2017 1 次提交
  5. 31 5月, 2017 2 次提交
  6. 30 4月, 2017 7 次提交
  7. 20 4月, 2017 5 次提交
    • J
      i40e: use i40e_stop_rings_no_wait to implement PORT_SUSPENDED state · 3480756f
      Jacob Keller 提交于
      This state bit was added as a way for DCB to avoid having to wait for
      the queues to disable when handling LLDP events. The logic for this was
      burried deep within stop Tx and stop Rx queue code. First, let's rename
      it so that it does not appear to only affect Tx when infact it modifies
      both Tx and Rx flow. Second we can move it up into the i40e_stop_rings()
      function, and we can simply re-use the i40e_stop_rings_no_wait() so that
      we don't have to bury the implementation as deep into the call stack.
      
      An alternative might be to remove the state bit and instead attempt to
      shut down everything directly in DCP flow. This, however, is not ideal
      because it creates yet another separate shutdown routine that we'd have
      to maintain. In the current implementation any changes will be made to
      both flows.
      
      Change-ID: I68e1ccb901af320862bca395e9c9746f08e8b17c
      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>
      3480756f
    • J
      i40e: reset all VFs in parallel when rebuilding PF · e4b433f4
      Jacob Keller 提交于
      When there are a lot of active VFs, it can take multiple seconds to
      finish resetting all of them during certain flows., which can cause some
      VFs to fail to wait long enough for the reset to occur. The user might
      see messages like "Never saw reset" or "Reset never finished" and the VF
      driver will stop functioning properly.
      
      The naive solution would be to simply increase the wait timer. We can
      get much more clever. Notice that i40e_reset_vf is run in a serialized
      fashion, and includes lots of delays.
      
      There are two prominent delays which take most of the time. First, when
      we begin resetting VFs, we have multiple 10ms delays which accrue
      because we reset each VF in a serial fashion. These delays accumulate to
      almost 4 seconds when handling the maximum number of VFs (128).
      
      Secondly, there is a massive 50ms delay for each time we disable queues
      on a VSI. This delay is necessary to allow HW to finish disabling queues
      before we restore functionality. However, just like with the first case,
      we are paying the cost for each VF, rather than disabling all VFs and
      waiting once.
      
      Both of these can be fixed, but required some previous refactoring to
      handle the special case. First, we will need the
      i40e_vsi_wait_queues_disabled function which was previously DCB
      specific. Second, we will need to implement our own
      i40e_vsi_stop_rings_no_wait function which will handle the stopping of
      rings without the delays.
      
      Finally, implement an i40e_reset_all_vfs function, which will first
      start the reset of all VFs, and pay the wait cost all at once, rather
      than serially waiting for each VF before we start processing then next
      one. After the VF has been reset, we'll disable all the VF queues, and
      then wait for them to disable. Again, we'll organize the flow such that
      we pay the wait cost only once.
      
      Finally, after we've disabled queues we'll go ahead and begin restoring
      VF functionality. The result is reducing the wait time by a large factor
      and ensuring that VFs do not timeout when waiting in the VF driver.
      
      Change-ID: Ia6e8cf8d98131b78aec89db78afb8d905c9b12be
      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>
      e4b433f4
    • J
      i40e: factor out queue control from i40e_vsi_control_(tx|rx) · c768e490
      Jacob Keller 提交于
      A future patch will need to be able to handle controlling queues without
      waiting until all VSIs are handled. Factor out the direct queue
      modification so that we can easily re-use this code. The result is also
      a bit easier to read since we don't embed multiple single-letter loop
      counters.
      
      Change-ID: Id923cbfa43127b1c24d8ed4f809b1012c736d9ac
      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>
      c768e490
    • J
      i40e: don't hold RTNL lock while waiting for VF reset to finish · 024b05f4
      Jacob Keller 提交于
      We made some effort to reduce the RTNL lock scope when resetting and
      rebuilding the PF. Unfortunately we still held the RTNL lock during the
      VF reset operation, which meant that multiple PFs could not reset in
      parallel due to the global lock. For now, further reduce the scope by
      not holding the RTNL lock while resetting VFs. This allows multiple PFs
      to reset in a timely manner.
      
      Change-ID: I2fbf823a0063f24dff67676cad09f0bbf83ee4ce
      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>
      024b05f4
    • S
      i40e/i40evf: Add tracepoints · ed0980c4
      Scott Peterson 提交于
      This patch adds tracepoints to the i40e and i40evf drivers to which
      BPF programs can be attached for feature testing and verification.
      It's expected that an attached BPF program will identify and count or
      log some interesting subset of traffic. The bcc-tools package is
      helpful there for containing all the BPF arcana in a handy Python
      wrapper. Though you can make these tracepoints log trace messages, the
      messages themselves probably won't be very useful (other to verify the
      tracepoint is being called while you're debugging your BPF program).
      
      The idea here is that tracepoints have such low performance cost when
      disabled that we can leave these in the upstream drivers. This may
      eventually enable the instrumentation of unmodified customer systems
      should the need arise to verify a NIC feature is working as expected.
      In general this enables one set of feature verification tools to be
      used on these drivers whether they're built with the kernel or
      separately.
      
      Users are advised against using these tracepoints for anything other
      than a diagnostic tool. They have a performance impact when enabled,
      and their exact placement and form may change as we see how well they
      work in practice for the purposes above.
      
      Change-ID: Id6014a7322c0e6d08068114dd20bd156f2f6435e
      Signed-off-by: NScott Peterson <scott.d.peterson@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      ed0980c4
  8. 08 4月, 2017 8 次提交
  9. 07 4月, 2017 2 次提交
  10. 29 3月, 2017 4 次提交
  11. 28 3月, 2017 4 次提交
  12. 25 3月, 2017 1 次提交
  13. 24 3月, 2017 2 次提交