> > -------- Forwarded Message -------- > > From: whucecil <whucecil1999@xxxxxxxxx> > > To: Linux-iSCSI.org Target Development > > <linux-iscsi-target-dev@xxxxxxxxxxxxxxxx> > > Subject: Bugs in iscsi tmr response. > > Date: Thu, 17 Nov 2011 22:21:14 -0800 (PST) > > > > I found an error in iscsit send task mgt rsp, there seems to have > > missing "hdr->flags |= ISCSI_FLAG_CMD_FINAL" after line > > 3130,which causes initiator abort this response, then makes a new > > connection again. Am I right ? > > > > > > 3120 static int iscsit_send_task_mgt_rsp( > > 3121 struct iscsi_cmd *cmd, > > 3122 struct iscsi_conn *conn) > > 3123 { > > 3124 struct se_tmr_req *se_tmr = cmd->se_cmd.se_tmr_req; > > 3125 struct iscsi_tm_rsp *hdr; > > 3126 u32 tx_size = 0; > > 3127 > > 3128 hdr = (struct iscsi_tm_rsp *) cmd- > > >pdu; > > 3129 memset(hdr, 0, ISCSI_HDR_LEN); > > 3130 hdr->opcode = ISCSI_OP_SCSI_TMFUNC_RSP; > > 3131 hdr->response = > > iscsit_convert_tcm_tmr_rsp(se_tmr); > > 3132 hdr->itt = cpu_to_be32(cmd- > > >init_task_tag); > > 3133 cmd->stat_sn = conn->stat_sn++; > > 3134 hdr->statsn = cpu_to_be32(cmd->stat_sn); Hello whucecil, My apologies for the delayed response here. You are correct that the ISCSI_OP_SCSI_TMFUNC_RSP PDU should always be setting the FINAL bit according to rfc-3729 section 10.6 I've added this patch into lio-core.git with your 'Reported-by' tag, and will also get this queued up for v3.2-final. Thank you for the review! --nab -- To unsubscribe from this list: send the line "unsubscribe target-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html