1. 02 5月, 2017 1 次提交
  2. 28 1月, 2017 1 次提交
  3. 25 1月, 2017 2 次提交
  4. 15 12月, 2016 1 次提交
  5. 24 9月, 2016 1 次提交
  6. 25 8月, 2016 1 次提交
    • D
      IB/srpt: Update sport->port_guid with each port refresh · 716b076b
      Doug Ledford 提交于
      If port_guid is set with the default subnet_prefix, then we get a change
      event and run a port refresh, we don't update the port_guid.  As a
      result, attempts to create a target device that uses the new
      subnet_prefix in the wwn will fail to find a match and be rejected by
      the ib_srpt driver.  This makes it impossible to configure a port if it
      was initialized with a default subnet_prefix and later changed to any
      non-default subnet-prefix.  Updating the port refresh task to always
      update the wwn based upon the current subnext_prefix solves this
      problem.
      
      Cc: Bart Van Assche <bart.vanassche@sandisk.com>
      Cc: nab@linux-iscsi.org
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      716b076b
  7. 03 8月, 2016 2 次提交
  8. 24 6月, 2016 1 次提交
    • B
      IB/srpt: Reduce QP buffer size · c0cf4512
      Bart Van Assche 提交于
      The memory needed for the send and receive queues associated with
      a QP is proportional to the max_sge parameter. The current value
      of that parameter is such that with an mlx4 HCA the QP buffer size
      is 8 MB. Since DMA is used for communication between HCA and CPU
      that buffer either has to be allocated coherently or map_single()
      must succeed for that buffer. Since large contiguous allocations
      are fragile and since the maximum segment size for e.g. swiotlb
      is 256 KB, reduce the max_sge parameter. This patch avoids that
      the following text appears on the console after SRP logout and
      relogin on a system equipped with multiple IB HCAs:
      
      mlx4_core 0000:05:00.0: swiotlb buffer is full (sz: 8388608 bytes)
      swiotlb: coherent allocation failed for device 0000:05:00.0 size=8388608
      CPU: 11 PID: 148 Comm: kworker/11:1 Not tainted 4.7.0-rc4-dbg+ #1
      Call Trace:
       [<ffffffff812c6d35>] dump_stack+0x67/0x92
       [<ffffffff812efe71>] swiotlb_alloc_coherent+0x141/0x150
       [<ffffffff810458be>] x86_swiotlb_alloc_coherent+0x3e/0x50
       [<ffffffffa03861fa>] mlx4_buf_direct_alloc.isra.5+0x9a/0x120 [mlx4_core]
       [<ffffffffa0386545>] mlx4_buf_alloc+0x165/0x1a0 [mlx4_core]
       [<ffffffffa035053d>] create_qp_common.isra.29+0x57d/0xff0 [mlx4_ib]
       [<ffffffffa03510da>] mlx4_ib_create_qp+0x12a/0x3f0 [mlx4_ib]
       [<ffffffffa031154a>] ib_create_qp+0x3a/0x250 [ib_core]
       [<ffffffffa055dd4b>] srpt_cm_handler+0x4bb/0xcad [ib_srpt]
       [<ffffffffa02c1ab0>] cm_process_work+0x20/0xf0 [ib_cm]
       [<ffffffffa02c3640>] cm_work_handler+0x1ac0/0x2059 [ib_cm]
       [<ffffffff810737ed>] process_one_work+0x19d/0x490
       [<ffffffff81073b29>] worker_thread+0x49/0x490
       [<ffffffff8107a0ea>] kthread+0xea/0x100
       [<ffffffff815b25af>] ret_from_fork+0x1f/0x40
      
      Fixes: b99f8e4d ("IB/srpt: convert to the generic RDMA READ/WRITE API")
      Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com>
      Cc: Laurence Oberman <loberman@redhat.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Sagi Grimberg <sagi@grimberg.me>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      c0cf4512
  9. 26 5月, 2016 1 次提交
  10. 14 5月, 2016 1 次提交
    • C
      IB/srpt: convert to the generic RDMA READ/WRITE API · b99f8e4d
      Christoph Hellwig 提交于
      Replace the homegrown RDMA READ/WRITE code in srpt with the generic API.
      The only real twist here is that we need to allocate one Linux scatterlist
      per direct buffer in the SRP command, and chain them before handing them
      off to the target core.
      
      As a side-effect of the conversion the driver will also chain the SEND
      of the SRP response to the RDMA WRITE WRs for a DATA OUT command, and
      properly account for RDMA WRITE WRs instead of just for RDMA READ WRs
      like the driver previously did.
      
      We now allocate half of the SQ size to RDMA READ/WRITE contexts, assuming
      by default one RDMA READ or WRITE operation per command.  If a command
      has multiple operations it will eat into the budget but will still succeed,
      possible after waiting for WQEs to be available.
      
      Also ensure the QPs request the maximum allowed SGEs so that RDMA R/W API
      works correctly.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Reviewed-by: NBart Van Assche <bart.vanassche@sandisk.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      b99f8e4d
  11. 10 5月, 2016 1 次提交
    • C
      target: make ->shutdown_session optional · 22d11759
      Christoph Hellwig 提交于
      Turns out the template and thus many drivers got the return value wrong:
      0 means the fabrics driver needs to put a session reference, which no
      driver except for the iSCSI target drivers did.  Fortunately none of these
      drivers supports explicit Node ACLs, so the bug was harmless.
      
      Even without that only qla2xxx and iscsi every did real work in
      shutdown_session, so get rid of the boilerplate code in all other
      drivers.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      22d11759
  12. 08 4月, 2016 1 次提交
    • B
      Revert "ib_srpt: Convert to percpu_ida tag allocation" · 3c968887
      Bart Van Assche 提交于
      This reverts commit 0fd10721.
      
      That patch causes the ib_srpt driver to crash as soon as the first SCSI
      command is received:
      
        kernel BUG at drivers/infiniband/ulp/srpt/ib_srpt.c:1439!
        invalid opcode: 0000 [#1] SMP
        Workqueue: target_completion target_complete_ok_work [target_core_mod]
        RIP: srpt_queue_response+0x437/0x4a0 [ib_srpt]
        Call Trace:
          srpt_queue_data_in+0x9/0x10 [ib_srpt]
          target_complete_ok_work+0x152/0x2b0 [target_core_mod]
          process_one_work+0x197/0x480
          worker_thread+0x49/0x490
          kthread+0xea/0x100
          ret_from_fork+0x22/0x40
      
      Aside from the crash, the shortcomings of that patch are as follows:
      
       - It makes the ib_srpt driver use I/O contexts allocated by
         transport_alloc_session_tags() but it does not initialize these I/O
         contexts properly.  All the initializations performed by
         srpt_alloc_ioctx() are skipped.
      
       - It swaps the order of the send ioctx allocation and the transition to
         RTR mode which is wrong.
      
       - The amount of memory that is needed for I/O contexts is doubled.
      
       - srpt_rdma_ch.free_list is no longer used but is not removed.
      Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com>
      Cc: Nicholas Bellinger <nab@linux-iscsi.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      3c968887
  13. 22 3月, 2016 1 次提交
  14. 11 3月, 2016 2 次提交
  15. 01 3月, 2016 21 次提交
  16. 20 1月, 2016 2 次提交