Subject: sector alignment for DataOut PDUs?

From: Paul Koning <[email-masked]>
Date: Tue, 26 Feb 2002 16:50:58 -0500

In the past, a number of login parameters were specified as multiples
of 512 bytes, which makes a lot of sense for disk targets (but not so
much for tape targets).  With the spec as it stands now, you can
negotiate pretty much arbitrary burst sizes etc.  And in any case, the
sender can pick "strange" PDU sizes even if the negotiated sizes are
multiples of 512, because after all those are limits, not required
sizes. 

It would be very attractive for disk targets to be able to specify
that they require DataOut PDUs to be multiples of 512 bytes in length.
That way, any PDU would correspond exactly to one or more sectors,
rather than potentially having several PDUs straddling sector
boundaries as is currently permitted.  This could be done by a Boolean
key (512 byte alignment, yes or no).  (An integer key would allow
other values than 512, but I'm not sure that such flexibility is a
whole lot more useful.)

Basically, the effect of this feature would be to tell the initiator
that it must send DataOut PDUs and immediate data whose length is
always a multiple of 512.  Obviously, targets can't ask for that
unless the devices on that target already come with such a limitation.

       paul

---

From: Paul Koning <[email-masked]>
Date: Tue, 26 Feb 2002 18:04:59 -0500

>>>>> "Rod" == Rod Harrison <[email-masked]> writes:

 Rod> I have no objection in principle to this but I have a concern
 Rod> over non-media access commands. Things like mode select
 Rod> payloads, i.e. defect lists etc are not necessarily 512 byte
 Rod> multiples. The wording would need to allow "odd" sizes when the
 Rod> SCSI transfer length is not a 512 byte multiple.

Are those DataOut or DataIn?  The target can arrange inbound PDU sizes
to be whatever multiple is helpful if it wants to, that isn't the case
I was talking about.

In any case, if there are cases where the total transfer length for
data out isn't a multiple of 512, then the rule would have to allow
the last transfer to have an odd length.  The earlier transfers could
still be constrained if the constraint is enabled.

      paul

---

From: "Rod Harrison" <[email-masked]>
Date: Tue, 26 Feb 2002 22:44:43 -0000

I have no objection in principle to this but I have a concern
over non-media access commands. Things like mode select payloads,
i.e. defect lists etc are not necessarily 512 byte multiples. The
wording would need to allow "odd" sizes when the SCSI transfer
length is not a 512 byte multiple.

	- Rod

-----Original Message-----
From: [email-masked] [mailto:[email-masked]]On
Behalf Of
Paul Koning
Sent: Tuesday, February 26, 2002 9:51 PM
To: [email-masked]
Subject: sector alignment for DataOut PDUs?

In the past, a number of login parameters were specified as
multiples
of 512 bytes, which makes a lot of sense for disk targets (but
not so
much for tape targets).  With the spec as it stands now, you can
negotiate pretty much arbitrary burst sizes etc.  And in any
case, the
sender can pick "strange" PDU sizes even if the negotiated sizes
are
multiples of 512, because after all those are limits, not
required
sizes.

It would be very attractive for disk targets to be able to
specify
that they require DataOut PDUs to be multiples of 512 bytes in
length.
That way, any PDU would correspond exactly to one or more
sectors,
rather than potentially having several PDUs straddling sector
boundaries as is currently permitted.  This could be done by a
Boolean
key (512 byte alignment, yes or no).  (An integer key would allow
other values than 512, but I'm not sure that such flexibility is
a
whole lot more useful.)

Basically, the effect of this feature would be to tell the
initiator
that it must send DataOut PDUs and immediate data whose length is
always a multiple of 512.  Obviously, targets can't ask for that
unless the devices on that target already come with such a
limitation.

       paul

---

From: "Rod Harrison" <[email-masked]>
Date: Tue, 26 Feb 2002 23:50:47 -0000

I was talking about DATA-OUT PDUs.

	I would suggest we also restrict any target that wants to
negotiate for the 512 byte DATA-OUT option to not doing anything
weird with FirstBurstSize or MaxRecvPDULength. I think it would
unreasonable to allow a target to require 512 byte aligned
DATA-OUTs and have those other two parameters not multiples of
512 bytes.

	How do we handle the case where the iSCSI target node has
multiple LUNs and not all of them are disks? Perhaps the rule for
transfers lengths that are not multiples of 512 bytes works OK
here?

	Also, I think we should consider making the "alignment" any
multiple of 512 the target wants, not just 512. Otherwise it
seems to me you are back where you started if you have a disk
with 4096 byte sectors and the initiator chooses to send you
DATA-OUT PDUs that are not a multiple of 4k.

	- Rod

-----Original Message-----
From: Paul Koning [mailto:[email-masked]]
Sent: Tuesday, February 26, 2002 11:05 PM
To: [email-masked]
Cc: [email-masked]
Subject: RE: sector alignment for DataOut PDUs?

>>>>> "Rod" == Rod Harrison <[email-masked]> writes:

 Rod> I have no objection in principle to this but I have a
concern
 Rod> over non-media access commands. Things like mode select
 Rod> payloads, i.e. defect lists etc are not necessarily 512
byte
 Rod> multiples. The wording would need to allow "odd" sizes when
the
 Rod> SCSI transfer length is not a 512 byte multiple.

Are those DataOut or DataIn?  The target can arrange inbound PDU
sizes
to be whatever multiple is helpful if it wants to, that isn't the
case
I was talking about.

In any case, if there are cases where the total transfer length
for
data out isn't a multiple of 512, then the rule would have to
allow
the last transfer to have an odd length.  The earlier transfers
could
still be constrained if the constraint is enabled.

      paul