1. 17 10月, 2007 3 次提交
    • A
      IPoIB: Use round_jiffies() for ah_reap_task · 69fc507a
      Anton Blanchard 提交于
      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: NAnton Blanchard <anton@samba.org>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      69fc507a
    • S
      RDMA/cma: Fix deadlock destroying listen requests · d02d1f53
      Sean Hefty 提交于
      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: NSean Hefty <sean.hefty@intel.com>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      d02d1f53
    • S
      RDMA/cma: Add locking around QP accesses · c5483388
      Sean Hefty 提交于
      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: NSean Hefty <sean.hefty@intel.com>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      c5483388
  2. 16 10月, 2007 1 次提交
    • R
      IB/mthca: Avoid alignment traps when writing doorbells · ab8403c4
      Roland Dreier 提交于
      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: NRoland Dreier <rolandd@cisco.com>
      ab8403c4
  3. 15 10月, 2007 29 次提交
  4. 14 10月, 2007 7 次提交