SRP Sense Buffer Length

Patrick Fitzpatrick PFitzpatrick at jni.com
Thu Mar 7 15:46:23 PST 2002


* From the T10 Reflector (t10 at t10.org), posted by:
* Patrick Fitzpatrick <PFitzpatrick at JNI.com>
*
Hi Edward,
	thanks for the background. I am fine with the clarification. It
would have been nice for the SRP doc to have stated that the length should
be rounded up and unspecified padded used. There is a possibility of
confusion because of the rules for treating sense data when it will not fit
within the IU, i.e truncate. This led me to infer that if sense data was not
multiple of 4 bytes long that I should truncate the sense data. 


Patrick

-----Original Message-----
From: Edward A. Gardner [mailto:eag at ophidian.com]
Sent: Thursday, March 07, 2002 3:41 PM
To: Patrick Fitzpatrick; t10 at t10.org
Subject: Re: SRP Sense Buffer Length


> STP T10 Rev 10 Page 37 Line 30 states
>SRP RSP IU: "The SENSE DATA LIST LENGTH field shall only contain lengths
>that are a multiple of 4."
>
>I am confused as to the reasoning for this because it seems that most sense
>data is 18 bytes long. There is nothing to say what should be done is the
>actual sense data is not a multiple of 4 bytes long. Should the data be
>trunacated down to the lowest length multiple of 4 or should it be rounded
>up. What happens to the (1 to 3) undefined bytes that are now in the sense
>buffer if rounding up is the solution.
>
>I do not see the need for this restriction, other than for alignment, but
as
>sense data is at the end of the IU, alignment should not be an issue.

The SENSE DATA LIST LENGTH field specifies the length of the SENSE DATA
field, *not* the length of the sense data.  The sense data is
self-describing, including its own length field.  When 18 bytes of sense
data are returned, the SENSE DATA field contains 18 bytes of sense data and
two bytes of padding.  SRP doesn't specify the contents of the padding.
They are not part of the sense data.

FCP/FCP-2 and SPI-n IUs share this "feature" and use almost identical
wording.  It arises from a requirement to keep FCP / SPI-n / SRP IUs 32-bit
aligned.  It is just unfortunate (and a historical accident) that standard
sense data is 18 bytes, which is not 32-bit aligned.

If you want to pursue this further, there is an SRP conference call at 9 AM
PST tomorrow (Friday Mar 8).

Edward A. Gardner               eag at ophidian.com
Ophidian Designs                719 593-8866 voice
1262 Hofstead Terrace           719 593-8989 fax
Colorado Springs, CO  80907     719 210-7200 cell

*
* For T10 Reflector information, send a message with
* 'info t10' (no quotes) in the message body to majordomo at t10.org




More information about the T10 mailing list