1. 24 3月, 2018 1 次提交
  2. 20 3月, 2018 1 次提交
  3. 16 3月, 2018 1 次提交
  4. 14 11月, 2017 2 次提交
    • B
      iw_cxgb4: Fix possible circular dependency locking warning · 1c8f1da5
      Bharat Potnuri 提交于
      Locking sequence of iw_cxgb4 and RoCE drivers in ib_register_device() is
      slightly different and this leads to possible circular dependency locking
      warning when both the devices are brought up.
      
      Here is the locking sequence upto ib_register_device():
      iw_cxgb4: rtnl_mutex(net stack) --> uld_mutex --> device_mutex
      RoCE drivers: device_mutex --> rtnl_mutex
      
      Here is the possibility of cross locking:
      
      	CPU #0 (iw_cxgb4) 		     CPU #1 (RoCE drivers)
      
      -> on interface up cxgb4_up()
      executed with rtnl_mutex held
      -> hold uld_mutex and try
      registering ib device
      					-> In ib_register_device() hold
      					   device_mutex
      -> hold device mutex in
      ib_register_device
      					-> try acquiring rtnl_mutex in
      					   ib_enum_roce_netdev()
      
      Current patch schedules the ib_register_device() functionality of
      iw_cxgb4 to a workqueue to prevent the possible cross-locking.
      Also rename the labels in c4iw_reister_device().
      Signed-off-by: NPotnuri Bharat Teja <bharat@chelsio.com>
      Reviewed-by: NSteve Wise <swise@opengridcomputing.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      1c8f1da5
    • S
      iw_cxgb4: remove BUG_ON() usage. · ba97b749
      Steve Wise 提交于
      iw_cxgb4 has many BUG_ON()s that were left over from various enhancemnets
      made over the years.  Almost all of them should just be removed.  Some,
      however indicate a ULP usage error and can be handled w/o bringing down
      the system.
      
      If the condition cannot happen with correctly implemented cxgb4 sw/fw,
      then remove the BUG_ON.
      
      If the condition indicates a misbehaving ULP (like CQ overflows), add
      proper recovery logic.
      Signed-off-by: NSteve Wise <swise@opengridcomputing.com>
      Reviewed-by: NDennis Dalessandro <dennis.dalessandro@intel.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      ba97b749
  5. 27 9月, 2017 1 次提交
  6. 10 8月, 2017 1 次提交
    • L
      RDMA: Simplify get firmware interface · 9abb0d1b
      Leon Romanovsky 提交于
      There is a need to forward FW version to user space
      application through RDMA netlink. In order to make it safe, there
      is need to declare nla_policy and limit the size of FW string.
      
      The new define IB_FW_VERSION_NAME_MAX will limit the size of
      FW version string. That define was chosen to be equal to
      ETHTOOL_FWVERS_LEN, because many drivers anyway are limited
      by that value indirectly.
      
      The introduction of this define allows us to remove the string size
      from get_fw_str function signature.
      Signed-off-by: NLeon Romanovsky <leonro@mellanox.com>
      9abb0d1b
  7. 02 5月, 2017 1 次提交
  8. 21 4月, 2017 2 次提交
  9. 15 2月, 2017 1 次提交
  10. 25 1月, 2017 2 次提交
  11. 11 1月, 2017 2 次提交
    • S
      iw_cxgb4: free EQ queue memory on last deref · c12a67fe
      Steve Wise 提交于
      Commit ad61a4c7 ("iw_cxgb4: don't block in destroy_qp awaiting
      the last deref") introduced a bug where the RDMA QP EQ queue memory
      (and QIDs) are possibly freed before the underlying connection has been
      fully shutdown.  The result being a possible DMA read issued by HW after
      the queue memory has been unmapped and freed.  This results in possible
      WR corruption in the worst case, system bus errors if an IOMMU is in use,
      and SGE "bad WR" errors reported in the very least.  The fix is to defer
      unmap/free of queue memory and QID resources until the QP struct has
      been fully dereferenced.  To do this, the c4iw_ucontext must also be kept
      around until the last QP that references it is fully freed.  In addition,
      since the last QP deref can happen in an IRQ disabled context, we need
      a new workqueue thread to do the final unmap/free of the EQ queue memory.
      
      Fixes: ad61a4c7 ("iw_cxgb4: don't block in destroy_qp awaiting the last deref")
      Cc: stable@vger.kernel.org
      Signed-off-by: NSteve Wise <swise@opengridcomputing.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      c12a67fe
    • S
      iw_cxgb4: refactor sq/rq drain logic · 4fe7c296
      Steve Wise 提交于
      With the addition of the IB/Core drain API, iw_cxgb4 supported drain
      by watching the CQs when the QP was out of RTS and signalling "drain
      complete" when the last CQE is polled.  This, however, doesn't fully
      support the drain semantics. Namely, the drain logic is supposed to signal
      "drain complete" only when the application has _processed_ the last CQE,
      not just removed them from the CQ.  Thus a small timing hole exists that
      can cause touch after free type bugs in applications using the drain API
      (nvmf, iSER, for example).  So iw_cxgb4 needs a better solution.
      
      The iWARP Verbs spec mandates that "_at some point_ after the QP is
      moved to ERROR", the iWARP driver MUST synchronously fail post_send and
      post_recv calls.  iw_cxgb4 was currently not allowing any posts once the
      QP is in ERROR.  This was in part due to the fact that the HW queues for
      the QP in ERROR state are disabled at this point, so there wasn't much
      else to do but fail the post operation synchronously.  This restriction
      is what drove the first drain implementation in iw_cxgb4 that has the
      above mentioned flaw.
      
      This patch changes iw_cxgb4 to allow post_send and post_recv WRs after
      the QP is moved to ERROR state for kernel mode users, thus still adhering
      to the Verbs spec for user mode users, but allowing flush WRs for kernel
      users.  Since the HW queues are disabled, we just synthesize a CQE for
      this post, queue it to the SW CQ, and then call the CQ event handler.
      This enables proper drain operations for the various storage applications.
      Signed-off-by: NSteve Wise <swise@opengridcomputing.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      4fe7c296
  12. 14 12月, 2016 1 次提交
  13. 08 10月, 2016 1 次提交
  14. 24 6月, 2016 1 次提交
  15. 27 5月, 2016 1 次提交
    • C
      IB/core: Make device counter infrastructure dynamic · b40f4757
      Christoph Lameter 提交于
      In practice, each RDMA device has a unique set of counters that the
      hardware implements.  Having a central set of counters that they must
      all adhere to is limiting and causes many useful counters to not be
      available.
      
      Therefore we create a dynamic counter registration infrastructure.
      
      The driver must implement a stats structure allocation routine, in
      which the driver must place the directory name it wants, a list of
      names for all of the counters, an array of u64 counters themselves,
      plus a few generic configuration options.
      
      We then implement a core routine to create a sysfs file for each
      of the named stats elements, and a core routine to retrieve the
      stats when any of the sysfs attribute files are read.
      
      To avoid excessive beating on the stats generation routine in the
      drivers, the core code also caches the stats for a short period of
      time so that someone attempting to read all of the stats in a
      given device's directory will not result in a stats generation
      call per file read.
      
      Future work will attempt to standardize just the shared stats
      elements, and possibly add a method to get the stats via netlink
      in addition to sysfs.
      Signed-off-by: NChristoph Lameter <cl@linux.com>
      Signed-off-by: NMark Bloch <markb@mellanox.com>
      Reviewed-by: NSteve Wise <swise@opengridcomputing.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      [ Add caching, make structure names more informative, add i40iw support,
        other significant rewrites from the original patch ]
      b40f4757
  16. 27 4月, 2016 1 次提交
  17. 01 3月, 2016 2 次提交
  18. 24 12月, 2015 2 次提交
  19. 29 10月, 2015 2 次提交
  20. 22 10月, 2015 1 次提交
  21. 31 8月, 2015 1 次提交
  22. 13 6月, 2015 2 次提交
  23. 04 6月, 2015 1 次提交
  24. 02 6月, 2015 1 次提交
  25. 21 5月, 2015 2 次提交
  26. 19 5月, 2015 1 次提交
  27. 23 11月, 2014 1 次提交
  28. 22 7月, 2014 1 次提交
  29. 16 7月, 2014 2 次提交
  30. 11 6月, 2014 1 次提交
    • H
      iw_cxgb4: Allocate and use IQs specifically for indirect interrupts · cf38be6d
      Hariprasad Shenai 提交于
      Currently indirect interrupts for RDMA CQs funnel through the LLD's RDMA
      RXQs, which also handle direct interrupts for offload CPLs during RDMA
      connection setup/teardown.  The intended T4 usage model, however, is to
      have indirect interrupts flow through dedicated IQs. IE not to mix
      indirect interrupts with CPL messages in an IQ.  This patch adds the
      concept of RDMA concentrator IQs, or CIQs, setup and maintained by the
      LLD and exported to iw_cxgb4 for use when creating CQs. RDMA CPLs will
      flow through the LLD's RDMA RXQs, and CQ interrupts flow through the
      CIQs.
      
      Design:
      
      cxgb4 creates and exports an array of CIQs for the RDMA ULD.  These IQs
      are sized according to the max available CQs available at adapter init.
      In addition, these IQs don't need FL buffers since they only service
      indirect interrupts.  One CIQ is setup per RX channel similar to the
      RDMA RXQs.
      
      iw_cxgb4 will utilize these CIQs based on the vector value passed into
      create_cq().  The num_comp_vectors advertised by iw_cxgb4 will be the
      number of CIQs configured, and thus the vector value will be the index
      into the array of CIQs.
      
      Based on original work by Steve Wise <swise@opengridcomputing.com>
      Signed-off-by: NSteve Wise <swise@opengridcomputing.com>
      Signed-off-by: NHariprasad Shenai <hariprasad@chelsio.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cf38be6d