1. 12 4月, 2016 1 次提交
  2. 01 3月, 2016 1 次提交
  3. 23 12月, 2015 1 次提交
  4. 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
  5. 08 12月, 2015 5 次提交
  6. 10 11月, 2015 1 次提交
  7. 29 10月, 2015 4 次提交
  8. 22 10月, 2015 1 次提交
  9. 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
  10. 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
  11. 31 8月, 2015 15 次提交
  12. 15 7月, 2015 2 次提交
  13. 13 6月, 2015 1 次提交
  14. 28 5月, 2015 1 次提交
    • L
      kernel/params: constify struct kernel_param_ops uses · 9c27847d
      Luis R. Rodriguez 提交于
      Most code already uses consts for the struct kernel_param_ops,
      sweep the kernel for the last offending stragglers. Other than
      include/linux/moduleparam.h and kernel/params.c all other changes
      were generated with the following Coccinelle SmPL patch. Merge
      conflicts between trees can be handled with Coccinelle.
      
      In the future git could get Coccinelle merge support to deal with
      patch --> fail --> grammar --> Coccinelle --> new patch conflicts
      automatically for us on patches where the grammar is available and
      the patch is of high confidence. Consider this a feature request.
      
      Test compiled on x86_64 against:
      
      	* allnoconfig
      	* allmodconfig
      	* allyesconfig
      
      @ const_found @
      identifier ops;
      @@
      
      const struct kernel_param_ops ops = {
      };
      
      @ const_not_found depends on !const_found @
      identifier ops;
      @@
      
      -struct kernel_param_ops ops = {
      +const struct kernel_param_ops ops = {
      };
      
      Generated-by: Coccinelle SmPL
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Junio C Hamano <gitster@pobox.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: cocci@systeme.lip6.fr
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: NLuis R. Rodriguez <mcgrof@suse.com>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      9c27847d
  15. 19 5月, 2015 3 次提交