1. 02 6月, 2014 2 次提交
  2. 17 5月, 2014 1 次提交
    • M
      IB/mlx4: Invoke UPDATE_QP for proxy QP1 on MAC changes · 9433c188
      Matan Barak 提交于
      When we receive a netdev event indicating a netdev change and/or
      a netdev address change, we must change the MAC index used by the
      proxy QP1 (in the QP context), otherwise RoCE CM packets sent by the
      VF will not carry the same source MAC address as the non-CM packets.
      
      We use the UPDATE_QP command to perform this change.
      
      In order to avoid modifying a QP context based on netdev event,
      while the driver attempts to destroy this QP (e.g either the mlx4_ib
      or ib_mad modules are unloaded), we use mutex locking in both flows.
      
      Since the relevant mlx4 proxy GSI QP is created indirectly by the
      mad module when they create their GSI QP, the mlx4 didn't need to
      keep track on that QP prior to this change.
      
      Now, when QP modifications are needed to this QP from within the
      driver, we added refernece to it.
      Signed-off-by: NMatan Barak <matanb@mellanox.com>
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9433c188
  3. 16 5月, 2014 3 次提交
  4. 14 5月, 2014 1 次提交
  5. 29 4月, 2014 4 次提交
  6. 12 4月, 2014 11 次提交
  7. 11 4月, 2014 3 次提交
  8. 07 4月, 2014 13 次提交
    • N
      target: Pass in transport supported PI at session initialization · e70beee7
      Nicholas Bellinger 提交于
      In order to support local WRITE_INSERT + READ_STRIP operations for
      non PI enabled fabrics, the fabric driver needs to be able signal
      what protection offload operations are supported.
      
      This is done at session initialization time so the modes can be
      signaled by individual se_wwn + se_portal_group endpoints, as well
      as optionally across different transports on the same endpoint.
      
      For iser-target, set TARGET_PROT_ALL if the underlying ib_device
      has already signaled PI offload support, and allow this to be
      exposed via a new iscsit_transport->iscsit_get_sup_prot_ops()
      callback.
      
      For loopback, set TARGET_PROT_ALL to signal SCSI initiator mode
      operation.
      
      For all other drivers, set TARGET_PROT_NORMAL to disable fabric
      level PI.
      
      Cc: Martin K. Petersen <martin.petersen@oracle.com>
      Cc: Sagi Grimberg <sagig@mellanox.com>
      Cc: Or Gerlitz <ogerlitz@mellanox.com>
      Cc: Quinn Tran <quinn.tran@qlogic.com>
      Cc: Giridhar Malavali <giridhar.malavali@qlogic.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      e70beee7
    • S
      Target/iser: Use Fastreg only if device supports signature · f2252258
      Sagi Grimberg 提交于
      Fastreg is mandatory for signature, so if the
      device doesn't support it we don't need to use it.
      Signed-off-by: NSagi Grimberg <sagig@mellanox.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      f2252258
    • N
      iser-target: Add missing se_cmd put for WRITE_PENDING in tx_comp_err · 03e7848a
      Nicholas Bellinger 提交于
      This patch fixes a bug where outstanding RDMA_READs with WRITE_PENDING
      status require an extra target_put_sess_cmd() in isert_put_cmd() code
      when called from isert_cq_tx_comp_err() + isert_cq_drain_comp_llist()
      context during session shutdown.
      
      The extra kref PUT is required so that transport_generic_free_cmd()
      invokes the last target_put_sess_cmd() -> target_release_cmd_kref(),
      which will complete(&se_cmd->cmd_wait_comp) the outstanding se_cmd
      descriptor with WRITE_PENDING status, and awake the completion in
      target_wait_for_sess_cmds() to invoke TFO->release_cmd().
      
      The bug was manifesting itself in target_wait_for_sess_cmds() where
      a se_cmd descriptor with WRITE_PENDING status would end up sleeping
      indefinately.
      Acked-by: NSagi Grimberg <sagig@mellanox.com>
      Cc: Or Gerlitz <ogerlitz@mellanox.com>
      Cc: <stable@vger.kernel.org> #3.10+
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      03e7848a
    • N
      target: Add TFO->abort_task for aborted task resources release · 131e6abc
      Nicholas Bellinger 提交于
      Now that TASK_ABORTED status is not generated for all cases by
      TMR ABORT_TASK + LUN_RESET, a new TFO->abort_task() caller is
      necessary in order to give fabric drivers a chance to unmap
      hardware / software resources before the se_cmd descriptor is
      released via the normal TFO->release_cmd() codepath.
      
      This patch adds TFO->aborted_task() in core_tmr_abort_task()
      in place of the original transport_send_task_abort(), and
      also updates all fabric drivers to implement this caller.
      
      The fabric drivers that include changes to perform cleanup
      via ->aborted_task() are:
      
        - iscsi-target
        - iser-target
        - srpt
        - tcm_qla2xxx
      
      The fabric drivers that currently set ->aborted_task() to
      NOPs are:
      
        - loopback
        - tcm_fc
        - usb-gadget
        - sbp-target
        - vhost-scsi
      
      For the latter five, there appears to be no additional cleanup
      required before invoking TFO->release_cmd() to release the
      se_cmd descriptor.
      
      v2 changes:
        - Move ->aborted_task() call into transport_cmd_finish_abort (Alex)
      
      Cc: Alex Leung <amleung21@yahoo.com>
      Cc: Mark Rustad <mark.d.rustad@intel.com>
      Cc: Roland Dreier <roland@kernel.org>
      Cc: Vu Pham <vu@mellanox.com>
      Cc: Chris Boot <bootc@bootc.net>
      Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Cc: Giridhar Malavali <giridhar.malavali@qlogic.com>
      Cc: Saurav Kashyap <saurav.kashyap@qlogic.com>
      Cc: Quinn Tran <quinn.tran@qlogic.com>
      Cc: Sagi Grimberg <sagig@mellanox.com>
      Cc: Or Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      131e6abc
    • N
      iser-target: Match FRMR descriptors to available session tags · f46d6a8a
      Nicholas Bellinger 提交于
      This patch changes isert_conn_create_fastreg_pool() to follow
      logic in iscsi_target_locate_portal() for determining how many
      FRMR descriptors to allocate based upon the number of possible
      per-session command slots that are available.
      
      This addresses an OOPs in isert_reg_rdma() where due to the
      use of ISCSI_DEF_XMIT_CMDS_MAX could end up returning a bogus
      fast_reg_descriptor when the number of active tags exceeded
      the original hardcoded max.
      
      Note this also includes moving isert_conn_create_fastreg_pool()
      from isert_connect_request() to isert_put_login_tx() before
      posting the final Login Response PDU in order to determine the
      se_nacl->queue_depth (eg: number of tags) per session the target
      will be enforcing.
      
      v2 changes:
        - Move isert_conn->conn_fr_pool list_head init into
          isert_conn_request()
      v3 changes:
        - Drop unnecessary list_empty() check in isert_reg_rdma()
          (Sagi)
      
      Cc: Sagi Grimberg <sagig@mellanox.com>
      Cc: Or Gerlitz <ogerlitz@mellanox.com>
      Cc: <stable@vger.kernel.org> #3.12+
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      f46d6a8a
    • S
      Target/iser: Fail SCSI WRITE command if device detected integrity error · 5bac4b1a
      Sagi Grimberg 提交于
      If during data-transfer a data-integrity error was detected we
      must fail the command with CHECK_CONDITION and not execute
      the command.
      Signed-off-by: NSagi Grimberg <sagig@mellanox.com>
      Reported-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      5bac4b1a
    • S
      Target/iser: Move check signature status to a function · 96b7973e
      Sagi Grimberg 提交于
      Remove code duplication from RDMA_READ and RDMA_WRITE
      completions that do basically the same check.
      Signed-off-by: NSagi Grimberg <sagig@mellanox.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      96b7973e
    • S
      Target/iser: Consider DIF and RDMA_READ completions when calculating post_send counter · 897bb2c9
      Sagi Grimberg 提交于
      If protection is involved, iSER target must wait for
      completion of RDMA_READ before sending SCSI response.
      So we must consider that when calculating post_send_buf_count
      additions, also when processing good/error completions.
      Signed-off-by: NSagi Grimberg <sagig@mellanox.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      897bb2c9
    • S
      Target/iser: Fix signature work requests accounting · c2caa207
      Sagi Grimberg 提交于
      As REG_SIG_MR work request and it's LOCAL_INVALIDATE are
      not accounted in post_send_buf_count we must color these
      with ISER_FASTREG_LI_WRID in order to process their error
      completions when the QP flushes.
      Signed-off-by: NSagi Grimberg <sagig@mellanox.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      c2caa207
    • S
      IB/isert: Support T10-PI protected transactions · 9e961ae7
      Sagi Grimberg 提交于
      In case the Target core passed transport T10 protection
      operation:
      
      1. Register data buffer (data memory region)
      2. Register protection buffer if exsists (prot memory region)
      3. Register signature region (signature memory region)
         - use work request IB_WR_REG_SIG_MR
      4. Execute RDMA
      5. Upon RDMA completion check the signature status
         - if succeeded send good SCSI response
         - if failed send SCSI bad response with appropriate sense buffer
      
      (Fix up compile error in isert_reg_sig_mr, and fix up incorrect
       se_cmd->prot_type -> TARGET_PROT_NORMAL comparision - nab)
      (Fix failed sector assignment in isert_completion_rdma_* - Sagi + nab)
      (Fix enum assignements for protection type - Sagi)
      (Fix devision on 32-bit in isert_completion_rdma_* - Sagi + Fengguang)
      (Fix context change for v3.14-rc6 code - nab)
      (Fix iscsit_build_rsp_pdu inc_statsn flag usage - nab)
      Signed-off-by: NSagi Grimberg <sagig@mellanox.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      9e961ae7
    • S
      IB/isert: Accept RDMA_WRITE completions · f93f3a70
      Sagi Grimberg 提交于
      In case of protected transactions, we will need to check the
      protection status of the transaction before sending SCSI response.
      So be ready for RDMA_WRITE completions. currently we don't ask
      for these completions, but for T10-PI we will.
      Signed-off-by: NSagi Grimberg <sagig@mellanox.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      f93f3a70
    • S
      IB/isert: Initialize T10-PI resources · d3e125da
      Sagi Grimberg 提交于
      Introduce pi_context to hold relevant RDMA protection resources.
      We eliminate data_key_valid boolean and replace it with indicators
      container to indicate:
      - Is the descriptor protected (registered via signature MR)
      - Is the data_mr key valid (can spare LOCAL_INV WR)
      - Is the prot_mr key valid (can spare LOCAL_INV WR)
      - Is the sig_mr key valid (can spare LOCAL_INV WR)
      
      Upon connection establishment check if network portal is T10-PI
      enabled and allocate T10-PI resources if necessary, allocate
      signature enabled memory regions and mark connection queue-pair
      as signature enabled.
      
      (Fix context change for v3.14-rc6 code - nab)
      Signed-off-by: NSagi Grimberg <sagig@mellanox.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      d3e125da
    • S
      IB/isert: Introduce isert_map/unmap_data_buf · e3d7e4c3
      Sagi Grimberg 提交于
      export map/unmap data buffer to a routine that may
      be used in various places in the code and keep the
      mapping data in a designated descriptor. Also, let
      isert_fast_reg_mr to decide weather to use global
      MR or do fast registration.
      
      This commit does not change any functionality.
      
      (Fix context change for v3.14-rc6 code - nab)
      Signed-off-by: NSagi Grimberg <sagig@mellanox.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      e3d7e4c3
  9. 03 4月, 2014 2 次提交