1. 19 2月, 2017 1 次提交
    • V
      target/iscsi: split iscsit_check_dataout_hdr() · 9a584bf9
      Varun Prakash 提交于
      Split iscsit_check_dataout_hdr() into two functions
      1. __iscsit_check_dataout_hdr() - This function
         validates data out hdr.
      2. iscsit_check_dataout_hdr() - This function finds
         iSCSI cmd using iscsit_find_cmd_from_itt_or_dump(),
         then it calls __iscsit_check_dataout_hdr() to
         validate iSCSI hdr.
      
      This split is required to support Chelsio T6 iSCSI
      DDP completion feature. T6 adapters reduce number of
      completions to host by generating single completion
      for all directly placed(DDP) iSCSI pdus in a sequence,
      DDP completion contains iSCSI hdr of the last pdu in a
      sequence.
      
      On receiving DDP completion cxgbit driver will first
      find iSCSI cmd using iscsit_find_cmd_from_itt_or_dump()
      then updates cmd->write_data_done, cmd->next_burst_len,
      cmd->data_sn and calls  __iscsit_check_dataout_hdr()
      to validate iSCSI hdr.
      
      (Move XRDSL check ahead of itt lookup / dump - nab)
      Signed-off-by: NVarun Prakash <varun@chelsio.com>
      Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      9a584bf9
  2. 09 2月, 2017 7 次提交
  3. 16 12月, 2016 2 次提交
  4. 10 12月, 2016 2 次提交
  5. 19 11月, 2016 1 次提交
  6. 20 10月, 2016 2 次提交
  7. 19 9月, 2016 1 次提交
  8. 16 9月, 2016 11 次提交
  9. 26 7月, 2016 2 次提交
  10. 21 7月, 2016 1 次提交
  11. 20 7月, 2016 1 次提交
    • N
      target: Fix race between iscsi-target connection shutdown + ABORT_TASK · 064cdd2d
      Nicholas Bellinger 提交于
      This patch fixes a race in iscsit_release_commands_from_conn() ->
      iscsit_free_cmd() -> transport_generic_free_cmd() + wait_for_tasks=1,
      where CMD_T_FABRIC_STOP could end up being set after the final
      kref_put() is called from core_tmr_abort_task() context.
      
      This results in transport_generic_free_cmd() blocking indefinately
      on se_cmd->cmd_wait_comp, because the target_release_cmd_kref()
      check for CMD_T_FABRIC_STOP returns false.
      
      To address this bug, make iscsit_release_commands_from_conn()
      do list_splice and set CMD_T_FABRIC_STOP early while holding
      iscsi_conn->cmd_lock.  Also make iscsit_aborted_task() only
      remove iscsi_cmd_t if CMD_T_FABRIC_STOP has not already been
      set.
      
      Finally in target_release_cmd_kref(), only honor fabric_stop
      if CMD_T_ABORTED has been set.
      
      Cc: Mike Christie <mchristi@redhat.com>
      Cc: Quinn Tran <quinn.tran@qlogic.com>
      Cc: Himanshu Madhani <himanshu.madhani@qlogic.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Hannes Reinecke <hare@suse.de>
      Cc: stable@vger.kernel.org # 3.14+
      Tested-by: NNicholas Bellinger <nab@linux-iscsi.org>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      064cdd2d
  12. 17 5月, 2016 4 次提交
    • N
      iscsi-target: Fix early sk_data_ready LOGIN_FLAGS_READY race · 8f0dfb3d
      Nicholas Bellinger 提交于
      There is a iscsi-target/tcp login race in LOGIN_FLAGS_READY
      state assignment that can result in frequent errors during
      iscsi discovery:
      
            "iSCSI Login negotiation failed."
      
      To address this bug, move the initial LOGIN_FLAGS_READY
      assignment ahead of iscsi_target_do_login() when handling
      the initial iscsi_target_start_negotiation() request PDU
      during connection login.
      
      As iscsi_target_do_login_rx() work_struct callback is
      clearing LOGIN_FLAGS_READ_ACTIVE after subsequent calls
      to iscsi_target_do_login(), the early sk_data_ready
      ahead of the first iscsi_target_do_login() expects
      LOGIN_FLAGS_READY to also be set for the initial
      login request PDU.
      
      As reported by Maged, this was first obsered using an
      MSFT initiator running across multiple VMWare host
      virtual machines with iscsi-target/tcp.
      Reported-by: NMaged Mokhtar <mmokhtar@binarykinetics.com>
      Tested-by: NMaged Mokhtar <mmokhtar@binarykinetics.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      8f0dfb3d
    • N
      cxgbit: Use type ISCSI_CXGBIT + cxgbit tpg_np attribute · ff7199b0
      Nicholas Bellinger 提交于
      Instead of having cxgbit use type ISCSI_HW_OFFLOAD + 'hw_offload'
      tpg_np attribute, it should be using it's own driver specific
      type + attribute
      
      Cc: Varun Prakash <varun@chelsio.com>
      Cc: Hariprasad Shenai <hariprasad@chelsio.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Sagi Grimberg <sagi@grimberg.me>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      ff7199b0
    • N
      iscsi-target: Convert transport drivers to signal rdma_shutdown · bd027d85
      Nicholas Bellinger 提交于
      Instead of special casing the handful of callers that check for
      iser-target rdma verbs specific shutdown, use a simple flag at
      iscsit_transport->rdma_shutdown so each driver can signal this.
      
      Also, update iscsi-target/tcp + cxgbit to rdma_shutdown = false.
      
      Cc: Varun Prakash <varun@chelsio.com>
      Cc: Hariprasad Shenai <hariprasad@chelsio.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Sagi Grimberg <sagi@grimberg.me>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      bd027d85
    • N
      iscsi-target: Make iscsi_tpg_np driver show/store use generic code · d4b3fa4b
      Nicholas Bellinger 提交于
      Go ahead and fold the duplicate iscsi_tpg_np driver attribute
      show/store functions into generic callers, invoked by current
      driver specific functions.
      
      This allows for future v4.8+ changes to have iscsi_target_mod
      use tpg_np driver attributes at runtime, instead of having
      the defaults hardcoded in iscsi_target_configfs.c.
      
      Also, drop the unused/legacy 'sctp' attribute for non standard
      RFC-3720 operation with IPPROTO_SCTP.
      
      Cc: Varun Prakash <varun@chelsio.com>
      Cc: Hariprasad Shenai <hariprasad@chelsio.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Sagi Grimberg <sagi@grimberg.me>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      d4b3fa4b
  13. 10 5月, 2016 5 次提交