1. 27 3月, 2014 1 次提交
  2. 15 3月, 2014 1 次提交
    • S
      cxgb4/iw_cxgb4: Doorbell Drop Avoidance Bug Fixes · 05eb2389
      Steve Wise 提交于
      The current logic suffers from a slow response time to disable user DB
      usage, and also fails to avoid DB FIFO drops under heavy load. This commit
      fixes these deficiencies and makes the avoidance logic more optimal.
      This is done by more efficiently notifying the ULDs of potential DB
      problems, and implements a smoother flow control algorithm in iw_cxgb4,
      which is the ULD that puts the most load on the DB fifo.
      
      Design:
      
      cxgb4:
      
      Direct ULD callback from the DB FULL/DROP interrupt handler.  This allows
      the ULD to stop doing user DB writes as quickly as possible.
      
      While user DB usage is disabled, the LLD will accumulate DB write events
      for its queues.  Then once DB usage is reenabled, a single DB write is
      done for each queue with its accumulated write count.  This reduces the
      load put on the DB fifo when reenabling.
      
      iw_cxgb4:
      
      Instead of marking each qp to indicate DB writes are disabled, we create
      a device-global status page that each user process maps.  This allows
      iw_cxgb4 to only set this single bit to disable all DB writes for all
      user QPs vs traversing the idr of all the active QPs.  If the libcxgb4
      doesn't support this, then we fall back to the old approach of marking
      each QP.  Thus we allow the new driver to work with an older libcxgb4.
      
      When the LLD upcalls iw_cxgb4 indicating DB FULL, we disable all DB writes
      via the status page and transition the DB state to STOPPED.  As user
      processes see that DB writes are disabled, they call into iw_cxgb4
      to submit their DB write events.  Since the DB state is in STOPPED,
      the QP trying to write gets enqueued on a new DB "flow control" list.
      As subsequent DB writes are submitted for this flow controlled QP, the
      amount of writes are accumulated for each QP on the flow control list.
      So all the user QPs that are actively ringing the DB get put on this
      list and the number of writes they request are accumulated.
      
      When the LLD upcalls iw_cxgb4 indicating DB EMPTY, which is in a workq
      context, we change the DB state to FLOW_CONTROL, and begin resuming all
      the QPs that are on the flow control list.  This logic runs on until
      the flow control list is empty or we exit FLOW_CONTROL mode (due to
      a DB DROP upcall, for example).  QPs are removed from this list, and
      their accumulated DB write counts written to the DB FIFO.  Sets of QPs,
      called chunks in the code, are removed at one time. The chunk size is 64.
      So 64 QPs are resumed at a time, and before the next chunk is resumed, the
      logic waits (blocks) for the DB FIFO to drain.  This prevents resuming to
      quickly and overflowing the FIFO.  Once the flow control list is empty,
      the db state transitions back to NORMAL and user QPs are again allowed
      to write directly to the user DB register.
      
      The algorithm is designed such that if the DB write load is high enough,
      then all the DB writes get submitted by the kernel using this flow
      controlled approach to avoid DB drops.  As the load lightens though, we
      resume to normal DB writes directly by user applications.
      Signed-off-by: NSteve Wise <swise@opengridcomputing.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      05eb2389
  3. 26 2月, 2014 1 次提交
  4. 25 2月, 2014 1 次提交
  5. 19 2月, 2014 7 次提交
  6. 25 1月, 2014 1 次提交
  7. 24 1月, 2014 2 次提交
    • G
      net/cxgb4: Don't retrieve stats during recovery · 9fe6cb58
      Gavin Shan 提交于
      We possibly retrieve the adapter's statistics during EEH recovery
      and that should be disallowed. Otherwise, it would possibly incur
      replicate EEH error and EEH recovery is going to fail eventually.
      
      The patch reuses statistics lock and checks net_device is attached
      before going to retrieve statistics, so that the problem can be
      avoided.
      Signed-off-by: NGavin Shan <shangw@linux.vnet.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9fe6cb58
    • G
      net/cxgb4: Avoid disabling PCI device for towice · 144be3d9
      Gavin Shan 提交于
      If we have EEH error happens to the adapter and we have to remove
      it from the system for some reasons (e.g. more than 5 EEH errors
      detected from the device in last hour), the adapter will be disabled
      for towice separately by eeh_err_detected() and remove_one(), which
      will incur following unexpected backtrace. The patch tries to avoid
      it.
      
      WARNING: at drivers/pci/pci.c:1431
      CPU: 12 PID: 121 Comm: eehd Not tainted 3.13.0-rc7+ #1
      task: c0000001823a3780 ti: c00000018240c000 task.ti: c00000018240c000
      NIP: c0000000003c1e40 LR: c0000000003c1e3c CTR: 0000000001764c5c
      REGS: c00000018240f470 TRAP: 0700   Not tainted  (3.13.0-rc7+)
      MSR: 8000000000029032 <SF,EE,ME,IR,DR,RI>  CR: 28000024  XER: 00000004
      CFAR: c000000000706528 SOFTE: 1
      GPR00: c0000000003c1e3c c00000018240f6f0 c0000000010fe1f8 0000000000000035
      GPR04: 0000000000000000 0000000000000000 00000000003ae509 0000000000000000
      GPR08: 000000000000346f 0000000000000000 0000000000000000 0000000000003fef
      GPR12: 0000000028000022 c00000000ec93000 c0000000000c11b0 c000000184ac3e40
      GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
      GPR20: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
      GPR24: 0000000000000000 c0000000009398d8 c00000000101f9c0 c0000001860ae000
      GPR28: c000000182ba0000 00000000000001f0 c0000001860ae6f8 c0000001860ae000
      NIP [c0000000003c1e40] .pci_disable_device+0xd0/0xf0
      LR [c0000000003c1e3c] .pci_disable_device+0xcc/0xf0
      Call Trace:
      [c0000000003c1e3c] .pci_disable_device+0xcc/0xf0 (unreliable)
      [d0000000073881c4] .remove_one+0x174/0x320 [cxgb4]
      [c0000000003c57e0] .pci_device_remove+0x60/0x100
      [c00000000046396c] .__device_release_driver+0x9c/0x120
      [c000000000463a20] .device_release_driver+0x30/0x60
      [c0000000003bcdb4] .pci_stop_bus_device+0x94/0xd0
      [c0000000003bcf48] .pci_stop_and_remove_bus_device+0x18/0x30
      [c00000000003f548] .pcibios_remove_pci_devices+0xa8/0x140
      [c000000000035c00] .eeh_handle_normal_event+0xa0/0x3c0
      [c000000000035f50] .eeh_handle_event+0x30/0x2b0
      [c0000000000362c4] .eeh_event_handler+0xf4/0x1b0
      [c0000000000c12b8] .kthread+0x108/0x130
      [c00000000000a168] .ret_from_kernel_thread+0x5c/0x74
      Signed-off-by: NGavin Shan <shangw@linux.vnet.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      144be3d9
  8. 23 12月, 2013 5 次提交
  9. 04 12月, 2013 2 次提交
  10. 18 10月, 2013 1 次提交
  11. 27 9月, 2013 1 次提交
  12. 16 9月, 2013 1 次提交
  13. 20 8月, 2013 1 次提交
  14. 13 8月, 2013 2 次提交
  15. 01 6月, 2013 1 次提交
    • J
      cxgb4: Force uninitialized state if FW_ON_ADAPTER is < FW_VERSION and we're the MASTER_PF · e69972f5
      Jay Hernandez 提交于
      Forcing uninitialized state allows us to upgrade and reinitialize the adapter.
      
      FW_VERSION_T4 = 1.4.0.0
      FW_VERSION_T5 = 0.0.0.0
      At this point driver supports above and greater than above version of firmware.
      If it doesn't find the required firmware version than it forces the adapter to
      be reinitialized as shown below.
      
      1) If FW_ON_ADAPTER < FW_VERSION and we're the MASTER_PF force uninitialized
         state and a FW upgrade if available.
      
             - If FW_ON_ADAPTER < /lib/firmware/cxgb4/t*fw.bin we will update the
               adapters FW.
             - If FW_ON_ADAPTER >= /lib/firmware/cxgb4/t*fw.bin don't upgrade FW.
             - If upgrade_fw() fails force reinitialization of the adapter anyways,
               it might still work.
      
         Either way forcing the uninitialized state allows cxgb4 reinitialize FW.
      
      2) If FW_ON_ADAPTER >= FW_VERSION driver follows normal path.
      Signed-off-by: NJay Hernandez <jay@chelsio.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e69972f5
  16. 04 5月, 2013 1 次提交
  17. 30 4月, 2013 2 次提交
  18. 20 4月, 2013 1 次提交
  19. 14 3月, 2013 8 次提交