Appropriate setting of Underrun bit in FCP_Response IU

Lawrence Chen LawrenceChen at MaXXan.com
Mon Oct 11 19:47:26 PDT 2004


* From the T10 Reflector (t10 at t10.org), posted by:
* "Lawrence Chen" <LawrenceChen at MaXXan.com>
*
Hi Matthew,

For Non Read/Write commands, it would be preferable if the target device
could pad out their response data to FCP_DL in size. Then, there wouldn't have
to be an under run situation reported by the target device in the first place.

Best Regards,

Lawrence Chen

Principal Member of Technical Staff (PMTS)
MaXXan Systems, Inc.

(408) 382-6427 (V)
(832) 382-6599 (F)
(408) 204-2460 (C)

LawrenceChen at maxxan.com


-----Original Message-----
From: Matthew Jacob [mailto:mj at feral.com]
Sent: Saturday, October 09, 2004 1:00 PM
To: phil.colline at dothill.com
Cc: t10 at t10.org
Subject: Re: Appropriate setting of Underrun bit in FCP_Response IU


* From the T10 Reflector (t10 at t10.org), posted by:
* Matthew Jacob <mj at feral.com>
*

I didn't see an answer on this from the alias.

My own practice is to set the FCP length related response values 
irrespective of the value of status. In a layered target implementation, 
it's really the transport layer which should note whether or not the 
data specified by FCP_DL was underfulfilled (or attempted to be 
overfulfilled), while it is the interpreter layer that understands the 
CDB which sets SCSI status.


> * From the T10 Reflector (t10 at t10.org), posted by:
> * phil.colline at dothill.com
> *
> Hello,
>
> I wanted to clarify when it was required to set the underrun bit (and
> associated underrun amount) within the FCP_Response IU.  My understanding
> from reading FCP/FCP-2 that any time the data specified by the FCP_DL is not
> returned, an underrun condition has occurred from the perspective of FCP.
> The reasons why the data is not returned is immaterial; simply the fact the
> FCP_DL amount wasn't fully returned is all that is needed to trigger the
> FCP_Response underrun condition.  Is this a true statement, or are there
> conditions (Command Not Supported, Task Set Full, Busy, etc.) where
> returning a check condition or other error obviates the need to set underrun
> within FCP_Response?
>
> The relevant section within FCP-2 (section 9.4.8 in FCP2R07) is below:
>
> -- begin section copy --
>
> "If the FCP_RESID_UNDER bit or the FCP_RESID_OVER bit is set to one, the
> FCP_RESID field contains a count of the number of residual data bytes that
> were not transferred in the FCP_DATA IUs for this SCSI command. Upon
> successful completion of an FCP I/O operation, the residual value is
> normally zero and the FCP_RESID value is not valid. FCP devices having
> indeterminate data lengths may have a nonzero residual byte count after
> completing valid operations. Targets are not required to verify that the
> data length implied by the contents of the CDB cause an overrun or underrun
> before beginning execution of a SCSI command.
>
> If the FCP_RESID_UNDER bit is set to one, a transfer that did not fill the
> buffer to the expected displacement FCP_DL was performed and the value of
> FCP_RESID is defined as follows:
>
> FCP_RESID = FCP_DL - (highest offset of any byte transmitted + 1)
>
> A condition of FCP_RESID_UNDER may not be an error for some FCP devices and
> some commands.
>
> If the FCP_RESID_OVER bit is set to one, the transfer was truncated because
> the data transfer required by the SCSI command extended beyond the
> displacement value of FCP_DL. Those bytes that could be transferred without
> violating the FCP_DL value may be transferred. The FCP_RESID is defined as
> follows:
>
> FCP_RESID = (Transfer length required by command) - FCP_DL"
>
> -- end section copy --
>
> Thanks for your time,
>
> Phil
> *
> * For T10 Reflector information, send a message with
> * 'info t10' (no quotes) in the message body to majordomo at t10.org
>
*
* For T10 Reflector information, send a message with
* 'info t10' (no quotes) in the message body to majordomo at t10.org

This email message is for the sole use of the intended recipient(s) and may contain confidential information. Any unauthorized use; review, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by return email and destroy all copies of the original message.

Copyright  2004 MaXXan Systems, Inc. All rights reserved.
*
* 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