On Fri, 2017-01-13 at 21:15 +0530, Varun Prakash wrote: > On Sat, Dec 03, 2016 at 09:14:16PM +0530, Varun Prakash wrote: > > Hi Nicholas, > > > > On Fri, Sep 16, 2016 at 09:56:38PM +0530, Varun Prakash wrote: > > > In case of unsolicited data for the first > > > sequence seq_end_offset must be set to > > > minimum of firstburstlength and total data length. > > > > > > Signed-off-by: Varun Prakash <varun@xxxxxxxxxxx> > > > --- > > > drivers/target/iscsi/iscsi_target_erl0.c | 6 +++--- > > > 1 file changed, 3 insertions(+), 3 deletions(-) > > > > > > diff --git a/drivers/target/iscsi/iscsi_target_erl0.c > > > b/drivers/target/iscsi/iscsi_target_erl0.c > > > index b54e72c..98dff74 100644 > > > --- a/drivers/target/iscsi/iscsi_target_erl0.c > > > +++ b/drivers/target/iscsi/iscsi_target_erl0.c > > > @@ -44,10 +44,10 @@ void iscsit_set_dataout_sequence_values( > > > */ > > > if (cmd->unsolicited_data) { > > > cmd->seq_start_offset = cmd->write_data_done; > > > - cmd->seq_end_offset = (cmd->write_data_done + > > > - ((cmd->se_cmd.data_length > > > > + cmd->seq_end_offset = (cmd->se_cmd.data_length > > > > conn->sess->sess_ops->FirstBurstLength) ? > > > - conn->sess->sess_ops->FirstBurstLength : > > > cmd->se_cmd.data_length)); > > > + conn->sess->sess_ops->FirstBurstLength : > > > + cmd->se_cmd.data_length; > > > return; > > > } > > > Hello Varun, Sorry but this patch looks wrong to me. From the iSCSI RFC: "It is also an error for an initiator to send more unsolicited data, whether immediate or as separate PDUs, than FirstBurstLength." I think this is why iscsit_set_dataout_sequence_values() limits the unsolicited data length to FirstBurstLength. > > If I set ImmediateData=Yes, InitialR2T=No, MaxXmitDataSegmentLength < > > FirstBurstLength on the target and issue a WRITE cmd (IO size > > > FirstBurstLength) from initiator then target prints sequence error > > messages, for example > > > > Set following parameters on target (linux-4.8.12) > > ImmediateData = Yes > > InitialR2T = No > > MaxXmitDataSegmentLength = 8k > > FirstBurstLength = 64k Did you set these parameters at the target side or at the initiator side? Bart.-- 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