chopping of the SCSI payload into iSCSI PDUs

20 views
Skip to first unread message

SR

unread,
Jul 7, 2011, 5:37:35 PM7/7/11
to open-iscsi
Hi,

If I have following negotiated parameters for iscsi read command then
are following explained scenarios possible (I wasn't sure about
scenario-1) ?

MaxBurstLength = 128K
FirstBurstLength = 32K
MaxRecvDataSegmentLength = 8K
SCSI (read) command PDU specifies total data length = 25K

Which scenario out of following two should be considered is correct
operation? Is scenario-1 possible?
What are the main factors taken into account before chopping SCSI data
into iSCSI PDU?

Scenario-1:

iSCSI Data-In PDUs:

PDU1 with data length=4K
PDU2 with data length=4K
PDU3 with data length=4K
PDU4 with data length=4K
PDU5 with data length=4K
PDU6 with data length=4K
PDU7 with data length=1K

Scenario-2:

iSCSI Data-In PDUs:

PDU1 with data length=8K
PDU2 with data length=8K
PDU3 with data length=8K
PDU4 with data length=1K

Can you point me to the code where this decision is made about
chopping SCSI data into iSCSI PDU.

Thanks,
Samir

Mike Christie

unread,
Jul 8, 2011, 8:42:52 PM7/8/11
to open-...@googlegroups.com, SR
On 07/07/2011 04:37 PM, SR wrote:
> Hi,
>
> If I have following negotiated parameters for iscsi read command then
> are following explained scenarios possible (I wasn't sure about
> scenario-1) ?
>
> MaxBurstLength = 128K
> FirstBurstLength = 32K

For reads FirstBurstLength does not come into play. It is just for
writes and immediate data and initial r2t handling.

> MaxRecvDataSegmentLength = 8K
> SCSI (read) command PDU specifies total data length = 25K
>
> Which scenario out of following two should be considered is correct
> operation? Is scenario-1 possible?
> What are the main factors taken into account before chopping SCSI data
> into iSCSI PDU?
>
> Scenario-1:
>
> iSCSI Data-In PDUs:
>
> PDU1 with data length=4K
> PDU2 with data length=4K
> PDU3 with data length=4K
> PDU4 with data length=4K
> PDU5 with data length=4K
> PDU6 with data length=4K
> PDU7 with data length=1K

I think the iscsi RFC just says that the target cannot send more than
MaxRecvDataSegmentLength bytes, so it is valid for it to send PDUs with
only 4K.


>
> Scenario-2:
>
> iSCSI Data-In PDUs:
>
> PDU1 with data length=8K
> PDU2 with data length=8K
> PDU3 with data length=8K
> PDU4 with data length=1K

I think this is more common.


>
> Can you point me to the code where this decision is made about
> chopping SCSI data into iSCSI PDU.
>

The initiator does not do the chopping for READs. The target does this.
We just read in whatever the target sends us.

For WRITEs there is iscsi_prep_scsi_cmd_pdu and
iscsi_prep_data_out_pdu/iscsi_tcp_r2t_rsp.

Reply all
Reply to author
Forward
0 new messages