1. 18 Oct, 2007 2 commits
  2. 16 Oct, 2007 4 commits
    • Anton Blanchard's avatar
      IPoIB: Use round_jiffies() for ah_reap_task · 69fc507a
      Anton Blanchard authored
      Use round_jiffies() to align the 1 second ah_reap_task with other work
      and potentially save power by sleeping cores for longer.
      Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
      Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
      69fc507a
    • Sean Hefty's avatar
      RDMA/cma: Fix deadlock destroying listen requests · d02d1f53
      Sean Hefty authored
      Deadlock condition reported by Kanoj Sarcar <kanoj@netxen.com>.
      The deadlock occurs when a connection request arrives at the same
      time that a wildcard listen is being destroyed.
      
      A wildcard listen maintains per device listen requests for each
      RDMA device in the system.  The per device listens are automatically
      added and removed when RDMA devices are inserted or removed from
      the system.
      
      When a wildcard listen is destroyed, rdma_destroy_id() acquires
      the rdma_cm's device mutex ('lock') to protect against hot-plug
      events adding or removing per device listens.  It then tries to
      destroy the per device listens by calling ib_destroy_cm_id() or
      iw_destroy_cm_id().  It does this while holding the device mutex.
      
      However, if the underlying iw/ib CM reports a connection request
      while this is occurring, the rdma_cm callback function will try
      to acquire the same device mutex.  Since we're in a callback,
      the ib_destroy_cm_id() or iw_destroy_cm_id() calls will block until
      their callback thread returns, but the callback is blocked waiting for
      the device mutex.
      
      Fix this by re-working how per device listens are destroyed.  Use
      rdma_destroy_id(), which avoids the deadlock, in place of
      cma_destroy_listen().  Additional synchronization is added to handle
      device hot-plug events and ensure that the id is not destroyed twice.
      Signed-off-by: default avatarSean Hefty <sean.hefty@intel.com>
      Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
      d02d1f53
    • Sean Hefty's avatar
      RDMA/cma: Add locking around QP accesses · c5483388
      Sean Hefty authored
      If a user allocates a QP on an rdma_cm_id, the rdma_cm will automatically
      transition the QP through its states (RTR, RTS, error, etc.)  While the
      QP state transitions are occurring, the QP itself must remain valid.
      Provide locking around the QP pointer to prevent its destruction while
      accessing the pointer.
      
      This fixes an issue reported by Olaf Kirch from Oracle that resulted in
      a system crash:
      
      "An incoming connection arrives and we decide to tear down the nascent
       connection.  The remote ends decides to do the same.  We start to shut
       down the connection, and call rdma_destroy_qp on our cm_id. ... Now
       apparently a 'connect reject' message comes in from the other host,
       and cma_ib_handler() is called with an event of IB_CM_REJ_RECEIVED.
       It calls cma_modify_qp_err, which for some odd reason tries to modify
       the exact same QP we just destroyed."
      Signed-off-by: default avatarSean Hefty <sean.hefty@intel.com>
      Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
      c5483388
    • Roland Dreier's avatar
      IB/mthca: Avoid alignment traps when writing doorbells · ab8403c4
      Roland Dreier authored
      Architectures such as ia64 see alignment traps when doing a 64-bit 
      read from __be32 doorbell[2] arrays to do doorbell writes in 
      mthca_write64().  Fix this by just passing the two halves of the 
      doorbell value into mthca_write64().  This actually improves the 
      generated code by allowing the compiler to see what's going on better.
      Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
      ab8403c4
  3. 15 Oct, 2007 1 commit
  4. 14 Oct, 2007 33 commits