On Wed, 2013-11-13 at 11:27 +0530, Arshad Hussain wrote: > Hi, > > I am sending "SendTargets=All" as a text request. I am setting 'F' = 0. > (f bit to zero). > I was expecting target to respond with 'F' bit as 0. Instead it is > returning 'F' bit as 1. > > RFC says that "A Text Response with a F bit set to 1 in response to a > Text Request with > the F bit set to 0 is a protocol error." (Section 10.11.1) > > Are we looking at an error? > So given that multi PDU sequences of text commands + text responses are currently not supported, rejecting text commands with F_BIT=0 || C_BIT=1 probably makes the most sense here until proper support is implemented. I'll go ahead and apply the following patch. --nab diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c index ab64cbb..ba9787d 100644 --- a/drivers/target/iscsi/iscsi_target.c +++ b/drivers/target/iscsi/iscsi_target.c @@ -1948,6 +1948,13 @@ iscsit_setup_text_cmd(struct iscsi_conn *conn, struct iscsi_cmd *cmd, (unsigned char *)hdr); } + if (!(hdr->flags & ISCSI_FLAG_CMD_FINAL) || + (hdr->flags & ISCSI_FLAG_TEXT_CONTINUE)) { + pr_err("Multi sequence text commands currently not supported\n"); + return iscsit_reject_cmd(cmd, ISCSI_REASON_CMD_NOT_SUPPORTED, + (unsigned char *)hdr); + } + pr_debug("Got Text Request: ITT: 0x%08x, CmdSN: 0x%08x," " ExpStatSN: 0x%08x, Length: %u\n", hdr->itt, hdr->cmdsn, hdr->exp_statsn, payload_length); -- 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