1. 11 1月, 2011 1 次提交
  2. 23 10月, 2010 1 次提交
    • S
      RDMA/cxgb3: When a user QP is marked in error, also mark the CQs in error · b955150e
      Steve Wise 提交于
      The flushing of work requests for user QPs is implemented entirely in
      the user mode library.  The only kernel interaction is to mark the
      user QP object indicating it is in error when the QP exits RTS.  When
      the user QP operations are called by the application (eg: post_send,
      post_recv), the QP in error bit is checked and if set, the library
      flushes the QP.  If, however, the application is not doing IO, but
      rather just polling the CQ, it will never get flushed work requests.
      This breaks some classes of applications.
      
      This patch adds logic to mark user CQs in error when a QP that is bound
      to the CQ is marked in error.  The library poll code can then notice
      the CQ is in error and flush all the in error QPs bound to that CQ.
      
      Design:
      
       - add 1 extra CQE entry to the CQ memory that will be used to indicate
         in error status.
       - return the desired CQ memory size that should be mapped by the library
       - bump the ABI since the create_cq uverbs response changes.
       - detect older libraries and reduce the mmap size accordingly.
         (The ABI bump doesn't break old libraries, since they didn't check
         the ABI field anyway)
      Signed-off-by: NSteve Wise <swise@opengridcomputing.com>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      b955150e
  3. 22 7月, 2010 1 次提交
  4. 17 6月, 2010 1 次提交
  5. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  6. 25 2月, 2010 1 次提交
    • S
      RDMA/cxgb3: Doorbell overflow avoidance and recovery · e998f245
      Steve Wise 提交于
      T3 hardware doorbell FIFO overflows can cause application stalls due
      to lost doorbell ring events.  This has been seen when running large
      NP IMB alltoall MPI jobs.  The T3 hardware supports an xon/xoff-type
      flow control mechanism to help avoid overflowing the HW doorbell FIFO.
      
      This patch uses these interrupts to disable RDMA QP doorbell rings
      when we near an overflow condition, and then turn them back on (and
      ring all the active QP doorbells) when when the doorbell FIFO empties
      out.  In addition if an doorbell ring is dropped by the hardware, the
      code will now recover.
      
      Design:
      
      cxgb3:
      - enable these DB interrupts
      - in the interrupt handler, schedule work tasks to call the ULPs event
        handlers with the new events.
      - ring all the qset txqs when an overflow is detected.
      
      iw_cxgb3:
      - disable db ringing on all active qps when we get the DB_FULL event
      - enable db ringing on all active qps and ring all active dbs when we get
        the DB_EMPTY event
      - On DB_DROP event:
             - disable db rings in the event handler
             - delay-schedule a work task which rings and enables the dbs on
               all active qps.
      - in post_send and post_recv logic, don't ring the db if it's disabled.
      Signed-off-by: NSteve Wise <swise@opengridcomputing.com>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      e998f245
  7. 16 12月, 2009 1 次提交
  8. 12 10月, 2009 1 次提交
  9. 06 9月, 2009 1 次提交
  10. 21 4月, 2009 1 次提交
  11. 30 3月, 2009 1 次提交
  12. 17 2月, 2009 1 次提交
  13. 11 2月, 2009 1 次提交
  14. 18 1月, 2009 1 次提交
  15. 02 11月, 2008 1 次提交
  16. 05 8月, 2008 2 次提交
  17. 15 7月, 2008 2 次提交
    • S
      RDMA/cxgb3: Fixes for zero STag · 4ab928f6
      Steve Wise 提交于
      Handling the zero STag in receive work request requires some extra
      logic in the driver:
      
       - Only set the QP_PRIV bit for kernel mode QPs.
      
      - Add a zero STag build function for recv wrs. The uP needs a PBL
        allocated and passed down in the recv WR so it can construct a HW
        PBL for the zero STag S/G entries.  Note: we need to place a few
        restrictions on zero STag usage because of this:
      
        1) all SGEs in a recv WR must either be zero STag or not.  No mixing.
      
        2) an individual SGE length cannot exceed 128MB for a zero-stag SGE.
           This should be OK since it's not really practical to allocate
           such a large chunk of pinned contiguous DMA mapped memory.
      
      - Add an optimized non-zero-STag recv wr format for kernel users.
        This is needed to optimize both zero and non-zero STag cracking in
        the recv path for kernel users.
      
       - Remove the iwch_ prefix from the static build functions.
      
       - Bump required FW version.
      Signed-off-by: NSteve Wise <swise@opengridcomputing.com>
      4ab928f6
    • S
      RDMA/cxgb3: MEM_MGT_EXTENSIONS support · e7e55829
      Steve Wise 提交于
      - set IB_DEVICE_MEM_MGT_EXTENSIONS capability bit if fw supports it.
      - set max_fast_reg_page_list_len device attribute.
      - add iwch_alloc_fast_reg_mr function.
      - add iwch_alloc_fastreg_pbl
      - add iwch_free_fastreg_pbl
      - adjust the WQ depth for kernel mode work queues to account for
        fastreg possibly taking 2 WR slots.
      - add fastreg_mr work request support.
      - add local_inv work request support.
      - add send_with_inv and send_with_se_inv work request support.
      - removed useless duplicate enums/defines for TPT/MW/MR stuff.
      Signed-off-by: NSteve Wise <swise@opengridcomputing.com>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      e7e55829
  18. 17 5月, 2008 1 次提交
  19. 03 5月, 2008 1 次提交
  20. 30 4月, 2008 2 次提交
    • S
      RDMA/cxgb3: Support peer-2-peer connection setup · f8b0dfd1
      Steve Wise 提交于
      Open MPI, Intel MPI and other applications don't respect the iWARP
      requirement that the client (active) side of the connection send the
      first RDMA message.  This class of application connection setup is
      called peer-to-peer.  Typically once the connection is setup, _both_
      sides want to send data.
      
      This patch enables supporting peer-to-peer over the chelsio RNIC by
      enforcing this iWARP requirement in the driver itself as part of RDMA
      connection setup.
      
      Connection setup is extended, when the peer2peer module option is 1,
      such that the MPA initiator will send a 0B Read (the RTR) just after
      connection setup.  The MPA responder will suspend SQ processing until
      the RTR message is received and reply-to.
      
      In the longer term, this will be handled in a standardized way by
      enhancing the MPA negotiation so peers can indicate whether they
      want/need the RTR and what type of RTR (0B read, 0B write, or 0B send)
      should be sent.  This will be done by standardizing a few bits of the
      private data in order to negotiate all this.  However this patch
      enables peer-to-peer applications now and allows most of the required
      firmware and driver changes to be done and tested now.
      
      Design:
      
       - Add a module option, peer2peer, to enable this mode.
      
       - New firmware support for peer-to-peer mode:
      
      	- a new bit in the rdma_init WR to tell it to do peer-2-peer
      	  and what form of RTR message to send or expect.
      
      	- process _all_ preposted recvs before moving the connection
      	  into rdma mode.
      
      	- passive side: defer completing the rdma_init WR until all
      	  pre-posted recvs are processed.  Suspend SQ processing until
      	  the RTR is received.
      
      	- active side: expect and process the 0B read WR on offload TX
      	  queue. Defer completing the rdma_init WR until all
      	  pre-posted recvs are processed.  Suspend SQ processing until
      	  the 0B read WR is processed from the offload TX queue.
      
       - If peer2peer is set, driver posts 0B read request on offload TX
         queue just after posting the rdma_init WR to the offload TX queue.
      
       - Add CQ poll logic to ignore unsolicitied read responses.
      Signed-off-by: NSteve Wise <swise@opengridcomputing.com>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      f8b0dfd1
    • S
      RDMA/cxgb3: Correctly serialize peer abort path · 989a1780
      Steve Wise 提交于
      Open MPI and other stress testing exposed a few bad bugs in handling
      aborts in the middle of a normal close.  Fix these by:
      
       - serializing abort reply and peer abort processing with disconnect
         processing
      
       - warning (and ignoring) if ep timer is stopped when it wasn't running
      
       - cleaning up disconnect path to correctly deal with aborting and
         dead endpoints
      
       - in iwch_modify_qp(), taking a ref on the ep before releasing the qp
         lock if iwch_ep_disconnect() will be called.  The ref is dropped
         after calling disconnect.
      Signed-off-by: NSteve Wise <swise@opengridcomputing.com>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      989a1780
  21. 17 4月, 2008 2 次提交
    • R
      IB/core: Add support for "send with invalidate" work requests · 0f39cf3d
      Roland Dreier 提交于
      Add a new IB_WR_SEND_WITH_INV send opcode that can be used to mark a
      "send with invalidate" work request as defined in the iWARP verbs and
      the InfiniBand base memory management extensions.  Also put "imm_data"
      and a new "invalidate_rkey" member in a new "ex" union in struct
      ib_send_wr. The invalidate_rkey member can be used to pass in an
      R_Key/STag to be invalidated.  Add this new union to struct
      ib_uverbs_send_wr.  Add code to copy the invalidate_rkey field in
      ib_uverbs_post_send().
      
      Fix up low-level drivers to deal with the change to struct ib_send_wr,
      and just remove the imm_data initialization from net/sunrpc/xprtrdma/,
      since that code never does any send with immediate operations.
      
      Also, move the existing IB_DEVICE_SEND_W_INV flag to a new bit, since
      the iWARP drivers currently in the tree set the bit.  The amso1100
      driver at least will silently fail to honor the IB_SEND_INVALIDATE bit
      if passed in as part of userspace send requests (since it does not
      implement kernel bypass work request queueing).  Remove the flag from
      all existing drivers that set it until we know which ones are OK.
      
      The values chosen for the new flag is not consecutive to avoid clashing
      with flags defined in the XRC patches, which are not merged yet but
      which are already in use and are likely to be merged soon.
      
      This resurrects a patch sent long ago by Mikkel Hagen <mhagen@iol.unh.edu>.
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      0f39cf3d
    • H
      IB: Replace remaining __FUNCTION__ occurrences with __func__ · 33718363
      Harvey Harrison 提交于
      __FUNCTION__ is gcc-specific, use __func__ instead.
      Signed-off-by: NHarvey Harrison <harvey.harrison@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      33718363
  22. 26 1月, 2008 3 次提交
  23. 10 7月, 2007 2 次提交
  24. 01 5月, 2007 1 次提交
  25. 07 3月, 2007 1 次提交
  26. 24 2月, 2007 1 次提交
    • A
      RDMA/cxgb3: cleanups · 2b540355
      Adrian Bunk 提交于
      - don't mark static functions in C files as inline - gcc should know
        best whether inlining makes sense
      - never compile the unused cxio_dbg.c
      - make the following needlessly global functions static:
        - cxio_hal.c: cxio_hal_clear_qp_ctx()
        - iwch_provider.c: iwch_get_qp()
      - remove the following unused global functions:
        - cxio_hal.c: cxio_allocate_stag()
        - cxio_resource.: cxio_hal_get_rhdl()
        - cxio_resource.: cxio_hal_put_rhdl()
      Signed-off-by: NAdrian Bunk <bunk@stusta.de>
      Acked-by: NSteve Wise <swise@opengridcomputing.com>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      2b540355
  27. 17 2月, 2007 2 次提交
  28. 13 2月, 2007 1 次提交