1. 14 5月, 2016 5 次提交
  2. 13 5月, 2016 8 次提交
  3. 01 3月, 2016 1 次提交
  4. 23 12月, 2015 1 次提交
  5. 12 12月, 2015 2 次提交
    • C
      IB/srp: use the new CQ API · 1dc7b1f1
      Christoph Hellwig 提交于
      This also moves recv completion handling from hardirq context into
      softirq context.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      1dc7b1f1
    • C
      IB: add a proper completion queue abstraction · 14d3a3b2
      Christoph Hellwig 提交于
      This adds an abstraction that allows ULPs to simply pass a completion
      object and completion callback with each submitted WR and let the RDMA
      core handle the nitty gritty details of how to handle completion
      interrupts and poll the CQ.
      
      In detail there is a new ib_cqe structure which just contains the
      completion callback, and which can be used to get at the containing
      object using container_of.  It is pointed to by the WR and WC as an
      alternative to the wr_id field, similar to how many ULPs already use
      the field to store a pointer using casts.
      
      A driver using the new completion callbacks allocates it's CQs using
      the new ib_create_cq API, which in addition to the number of CQEs and
      the completion vectors also takes a mode on how we poll for CQEs.
      Three modes are available: direct for drivers that never take CQ
      interrupts and just poll for them, softirq to poll from softirq context
      using the to be renamed blk-iopoll infrastructure which takes care of
      rearming and budgeting, or a workqueue for consumer who want to be
      called from user context.
      
      Thanks a lot to Sagi Grimberg who helped reviewing the API, wrote
      the current version of the workqueue code because my two previous
      attempts sucked too much and converted the iSER initiator to the new
      API.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      14d3a3b2
  6. 08 12月, 2015 5 次提交
  7. 10 11月, 2015 1 次提交
  8. 29 10月, 2015 4 次提交
  9. 22 10月, 2015 1 次提交
  10. 08 10月, 2015 1 次提交
    • C
      IB: split struct ib_send_wr · e622f2f4
      Christoph Hellwig 提交于
      This patch split up struct ib_send_wr so that all non-trivial verbs
      use their own structure which embedds struct ib_send_wr.  This dramaticly
      shrinks the size of a WR for most common operations:
      
      sizeof(struct ib_send_wr) (old):	96
      
      sizeof(struct ib_send_wr):		48
      sizeof(struct ib_rdma_wr):		64
      sizeof(struct ib_atomic_wr):		96
      sizeof(struct ib_ud_wr):		88
      sizeof(struct ib_fast_reg_wr):		88
      sizeof(struct ib_bind_mw_wr):		96
      sizeof(struct ib_sig_handover_wr):	80
      
      And with Sagi's pending MR rework the fast registration WR will also be
      down to a reasonable size:
      
      sizeof(struct ib_fastreg_wr):		64
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com> [srp, srpt]
      Reviewed-by: Chuck Lever <chuck.lever@oracle.com> [sunrpc]
      Tested-by: NHaggai Eran <haggaie@mellanox.com>
      Tested-by: NSagi Grimberg <sagig@mellanox.com>
      Tested-by: NSteve Wise <swise@opengridcomputing.com>
      e622f2f4
  11. 04 9月, 2015 1 次提交
    • S
      IB/srp: Fix possible protection fault · 7fbc67df
      Sagi Grimberg 提交于
      srp_destroy_qp is designed to indicate we are safe to continue with
      freeing the channel resources by modifying the qp error state,
      posting a dummy wr on the queue-pair and waiting for it to flush.
      This also holds for the channel registration pool as we are unmapping
      the memory region when handling a scsi response. Destroying the
      channel registration pool before we make sure we processed all the
      inflight IO might introduce a use-after-free of the registration pool.
      
      This use-after-free is demonstrated in the stack trace below where
      srp is trying to unmap a used FMR after the fmr_pool was already destroyed.
      
      general protection fault: 0000 [#1] SMP
      RIP: 0010:[<ffffffff8151121b>]  [<ffffffff8151121b>] _raw_spin_lock_irqsave+0x1b/0x50
      Call Trace:
       [<ffffffffa055d88a>] ib_fmr_pool_unmap+0x1a/0xb0 [ib_core]
       [<ffffffffa06c00ed>] srp_unmap_data.isra.28+0x17d/0x250 [ib_srp]
       [<ffffffffa06c01eb>] srp_free_req+0x2b/0x60 [ib_srp]
       [<ffffffffa06c0c94>] srp_recv_completion+0x174/0x580 [ib_srp]
       [<ffffffffa04580fe>] mlx4_eq_int+0x4de/0xe50 [mlx4_core]
       [<ffffffffa0458b00>] mlx4_msi_x_interrupt+0x10/0x20 [mlx4_core]
       [<ffffffff810abc45>] handle_irq_event_percpu+0x35/0x1b0
       [<ffffffff810abdf2>] handle_irq_event+0x32/0x50
       [<ffffffff810ae5cf>] handle_edge_irq+0x6f/0x120
       [<ffffffff8100455a>] handle_irq+0x1a/0x30
       [<ffffffff8151b475>] do_IRQ+0x45/0xb0
       [<ffffffff8151162d>] common_interrupt+0x6d/0x6d
       [<ffffffff813e4d2f>] cpuidle_enter_state+0x4f/0xc0
       [<ffffffff813e4e6c>] cpuidle_idle_call+0xcc/0x210
       [<ffffffff8100b9ea>] arch_cpu_idle+0xa/0x30
       [<ffffffff810ab1e1>] cpu_startup_entry+0xe1/0x270
       [<ffffffff81030b3a>] start_secondary+0x21a/0x2c0
      Reported-by: NEliott Kespi <eliottk@mellanox.com>
      Signed-off-by: NSagi Grimberg <sagig@mellanox.com>
      Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      7fbc67df
  12. 31 8月, 2015 10 次提交