When deciding if to generate a data out queue for the first sequence the test was wrong. We should not check if INITIAL_R2T is NO and IMMEDIATE_DATA=NO. Immediate data does not matter here. What we should check is IF we have more data we need to send and IF INITIAL_R2T allows us to send more data, then we generate a train of DATA-OUT. If MaxRecvDataSegmentLength is less than FirstBurstLength we will often have to send unsolicited data as both ImmediateData and also as unsolicited DATA-OUT PDUs. Example: Assume Target has responded : MaxRecvDataSegmentLength = 8k FirstBurstLength = 64k ImmediateData=YES InitialR2T=NO Then this should generate the following sequence : I->T ISCSI_COMMAND + 8K of immediate data. F-Bit is not set. I->T DATA-OUT 8K I->T DATA-OUT 8K I->T DATA-OUT 8K I->T DATA-OUT 8K I->T DATA-OUT 8K I->T DATA-OUT 8K I->T DATA-OUT 8K. Final PDU in sequence so F-bit is set. T->I R2T ...
40 KiB
40 KiB