1. 16 May, 2010 2 commits
  2. 12 May, 2010 4 commits
    • Dan Carpenter's avatar
      IB/iser: Fix error flow in iser_create_ib_conn_res() · 9fda1ac5
      Dan Carpenter authored
      We shouldn't free things here because we free them later.
      The call tree looks like this:
      	iser_connect() ==> initiating the connection establishment
      and later
      	iser_cma_handler() => iser_route_handler() => iser_create_ib_conn_res()
      if we fail here, eventually iser_conn_release() is called, resulting
      in a double free.
      Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
      Signed-off-by: default avatarOr Gerlitz <ogerlitz@voltaire.com>
      Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
      9fda1ac5
    • Or Gerlitz's avatar
      IB/iser: Enhance disconnection logic for multi-pathing · 39ff05db
      Or Gerlitz authored
      The iser connection teardown flow isn't over until the underlying
      Connection Manager (e.g the IB CM) delivers a disconnected or timeout
      event through the RDMA-CM.  When the remote (target) side isn't
      reachable, e.g when some HW e.g port/hca/switch isn't functioning or
      taken down administratively, the CM timeout flow is used and the event
      may be generated only after relatively long time -- on the order of
      tens of seconds.
      
      The current iser code exposes this possibly long delay to higher
      layers, specifically to the iscsid daemon and iscsi kernel stack. As a
      result, the iscsi stack doesn't respond well: this low-level CM delay
      is added to the fail-over time under HA schemes such as the one
      provided by DM multipath through the multipathd(8) service.
      
      This patch enhances the reference counting scheme on iser's IB
      connections so that the disconnect flow initiated by iscsid from user
      space (ep_disconnect) doesn't wait for the CM to deliver the
      disconnect/timeout event.  (The connection teardown isn't done from
      iser's view point until the event is delivered)
      
      The iser ib (rdma) connection object is destroyed when its reference
      count reaches zero.  When this happens on the RDMA-CM callback
      context, extra care is taken so that the RDMA-CM does the actual
      destroying of the associated ID, since doing it in the callback is
      prohibited.
      
      The reference count of iser ib connection normally reaches three,
      where the <ref, deref> relations are
      
       1. conn <init, terminate>
       2. conn <bind, stop/destroy>
       3. cma id <create, disconnect/error/timeout callbacks>
      
      With this patch, multipath fail-over time is about 30 seconds, while
      without this patch, multipath fail-over time is about 130 seconds.
      Signed-off-by: default avatarOr Gerlitz <ogerlitz@voltaire.com>
      Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
      39ff05db
    • Or Gerlitz's avatar
      IB/iser: Remove buggy back-pointer setting · d265b980
      Or Gerlitz authored
      The iscsi connection object life cycle includes binding and unbinding
      (conn_stop) to/from the iscsi transport connection object.  Since
      iscsi connection objects are recycled, at the time the transport
      connection (e.g iser's IB connection) is released, it is not valid to
      touch the iscsi connection tied to the transport back-pointer since it
      may already point to a different transport connection.
      Signed-off-by: default avatarOr Gerlitz <ogerlitz@voltaire.com>
      Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
      d265b980
    • Or Gerlitz's avatar
      IB/iser: Add asynchronous event handler · 2110f9bf
      Or Gerlitz authored
      Add handler to handle events such as port up and down.  This is useful
      when testing high-availability schemes such as multi-pathing.
      Signed-off-by: default avatarOr Gerlitz <ogerlitz@voltaire.com>
      Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
      2110f9bf
  3. 05 May, 2010 1 commit
  4. 28 Apr, 2010 1 commit
    • Roland Dreier's avatar
      RDMA/cxgb3: Shrink .text with compile-time init of handlers arrays · 617c9a7e
      Roland Dreier authored
      Using compile-time designated initializers for the handler arrays
      instead of open-coding the initialization in iwch_cm_init() is (IMHO)
      cleaner, and leads to substantially smaller code: on my x86-64 build,
      bloat-o-meter shows:
      
      add/remove: 0/1 grow/shrink: 4/3 up/down: 4/-1682 (-1678)
      function                                     old     new   delta
      tx_ack                                       167     168      +1
      state_set                                     55      56      +1
      start_ep_timer                                99     100      +1
      pass_establish                               177     178      +1
      act_open_req_arp_failure                      39      38      -1
      sched                                         84      82      -2
      iwch_cm_init                                 442      91    -351
      work_handlers                               1328       -   -1328
      Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
      617c9a7e
  5. 22 Apr, 2010 1 commit
  6. 21 Apr, 2010 11 commits
  7. 09 Apr, 2010 20 commits