Appropriate setting of Underrun bit in FCP_Response IU

phil.colline at dothill.com phil.colline at dothill.com
Thu Oct 7 11:41:26 PDT 2004


* 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




More information about the T10 mailing list