Return-Path: <owner-ips@ece.cmu.edu>
X-Sieve: cmu-sieve 2.0
Return-Path: <owner-ips@ece.cmu.edu>
Received: (from majordom@localhost)
	by ece.cmu.edu (8.11.0/8.10.2) id h1HBm7407084
	for ips-outgoing; Mon, 17 Feb 2003 06:48:07 -0500 (EST)
X-Authentication-Warning: ece.cmu.edu: majordom set sender to owner-ips@ece.cmu.edu using -f
Received: from d12lmsgate-2.de.ibm.com (d12lmsgate-2.de.ibm.com [194.196.100.235])
	by ece.cmu.edu (8.11.0/8.10.2) with ESMTP id h1HBm1W07080
	for <ips@ece.cmu.edu>; Mon, 17 Feb 2003 06:48:01 -0500 (EST)
Received: from d12relay02.de.ibm.com (d12relay02.de.ibm.com [9.165.215.23])
	by d12lmsgate-2.de.ibm.com (8.12.3/8.12.3) with ESMTP id h1HBlaWT066590;
	Mon, 17 Feb 2003 12:47:41 +0100
Received: from d10ml001.telaviv.ibm.com (d10ml001.telaviv.ibm.com [9.148.216.55])
	by d12relay02.de.ibm.com (8.12.3/NCO/VER6.5) with ESMTP id h1HBlakU261856;
	Mon, 17 Feb 2003 12:47:36 +0100
In-Reply-To: <200302171012.CAA14380@hpcuhe.cup.hp.com>
To: Santosh Rao <santoshr@cup.hp.com>
Cc: eddyq@ivivity.com ('Eddy Quicksall'), ips@ece.cmu.edu,
   owner-ips@ece.cmu.edu, santoshr@cup.hp.com ('Santosh Rao'),
   satran@haifasphere.co.il (Julian Satran)
Subject: Re: iSCSI: underrun with a check condition
MIME-Version: 1.0
X-Mailer: Lotus Notes Release 6.0.1 February 07, 2003
From: "Julian Satran" <Julian_Satran@il.ibm.com>
Message-ID: <OFC552BE0C.54370C8A-ONC2256CD0.003FDFF6-C2256CD0.0040C844@telaviv.ibm.com>
Date: Mon, 17 Feb 2003 13:47:35 +0200
X-MIMETrack: Serialize by Router on D10ML001/10/M/IBM(Release 5.0.9a |January 7, 2002) at
 17/02/2003 13:47:35,
	Serialize complete at 17/02/2003 13:47:35
Content-Type: multipart/alternative; boundary="=_alternative 004023CDC2256CD0_="
Sender: owner-ips@ece.cmu.edu
Precedence: bulk

This is a multipart message in MIME format.
--=_alternative 004023CDC2256CD0_=
Content-Type: text/plain; charset="US-ASCII"

Santosh,

I don't know the scenario you had in mind.
The SCSI LLP gets status (Busy, ACA active, etc.) that tells explicitly 
that the command did not execute.

Julo



Santosh Rao <santoshr@cup.hp.com> 
Sent by: owner-ips@ece.cmu.edu
17/02/03 12:12

To
satran@haifasphere.co.il (Julian Satran)
cc
santoshr@cup.hp.com ('Santosh Rao'), eddyq@ivivity.com ('Eddy Quicksall'), 
ips@ece.cmu.edu ("'\"Ips@Ece.Cmu.Edu\"'")
Subject
Re: iSCSI: underrun with a check condition






Julian,

The initiator SCSI LLP would not know if the device server processed 
the command successfully or not, except for the u/o/resid information. If 
the
device server did not process the command and returned a RECOVERED ERROR 
check
condition on it, the host may process the completion as if the command had
completed successfully, since the resid field will be 0 and the u/o bits 
not
set.

Such behaviour can result in a corrupt read due to the read being 
completed
with success, but no data having been read into the read data buffer. 

SAM-2 Section 5.3.2 is only discussing SCSI status precedence. It does not
explain the resid reporting precedence compared to SCSI status. 

Regards,
Santosh



> 
> Santosh,
> 
> For any check condition in which the target did process the command this
> is the expected behavior.
> The example Eddy gave involves a target that due to ACA or BUSY does not
> initiate processing the command.
> In this case the target provider does not HAVE TO set the U/O bits (and
> the associated values).
> The relevant piece of information appears in SAM2 5.3.2 that indicates
> that status precedence.
> Obviously a target MAY set the U/O bits although  I doubt that an
> initiator will look them up.
> 
> Regards,
> Julo
> 
> 
> -----Original Message-----
> From: owner-ips@ece.cmu.edu [mailto:owner-ips@ece.cmu.edu] On Behalf Of
> Santosh Rao
> Sent: 16 February, 2003 23:28
> To: Eddy Quicksall
> Cc: "Ips@Ece.Cmu.Edu (ips@ece.cmu.edu)"
> Subject: Re: iSCSI: underrun with a check condition
> 
> 
> Eddy,
> 
> Yes, anytime the amount of data transferred does not match the data
> transfer length specified, the target must set the U bit or O bit,
> depending on whether an underflow or overflow occurred.
> 
> A recovered error check condition may be returned as the response to a
> scsi command which was processed to completion. The recovered error
> indicates that a previous command completed successfully with some
> recovery action by the device server and the sense data provides
> additional details on that previous command.
> 
> The current command on which a recovered error check condition was
> returned may have been processed to completion, or experienced some
> underflow or overflow. This information must be conveyed by the target
> in the iscsi scsi response pdu using the appropriate fields to describe
> the underflow or overflow.
> 
> Thanks,
> Santosh
> 
> 
> > Should the target set the U bit when it gives a check condition to a 
> > data-in command?
> > 
> > 
> > Eddy
> 
> 


-- 
**************************
Santosh Rao
HP-UX SCSI Team,
Hewlett Packard, Cupertino
**************************


--=_alternative 004023CDC2256CD0_=
Content-Type: text/html; charset="US-ASCII"


<br><font size=2 face="sans-serif">Santosh,</font>
<br>
<br><font size=2 face="sans-serif">I don't know the scenario you had in
mind.</font>
<br><font size=2 face="sans-serif">The SCSI LLP gets status (Busy, ACA
active, etc.) that tells explicitly that the command did not execute.</font>
<br>
<br><font size=2 face="sans-serif">Julo</font>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>Santosh Rao &lt;santoshr@cup.hp.com&gt;</b>
</font>
<br><font size=1 face="sans-serif">Sent by: owner-ips@ece.cmu.edu</font>
<p><font size=1 face="sans-serif">17/02/03 12:12</font>
<td width=59%>
<table width=100%>
<tr>
<td>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td valign=top><font size=1 face="sans-serif">satran@haifasphere.co.il
(Julian Satran)</font>
<tr>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td valign=top><font size=1 face="sans-serif">santoshr@cup.hp.com ('Santosh
Rao'), eddyq@ivivity.com ('Eddy Quicksall'), ips@ece.cmu.edu (&quot;'\&quot;Ips@Ece.Cmu.Edu\&quot;'&quot;)</font>
<tr>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td valign=top><font size=1 face="sans-serif">Re: iSCSI: underrun with
a check condition</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br><font size=2><tt>Julian,<br>
<br>
The initiator SCSI LLP would not know if the device server processed <br>
the command successfully or not, except for the u/o/resid information.
If the<br>
device server did not process the command and returned a RECOVERED ERROR
check<br>
condition on it, the host may process the completion as if the command
had<br>
completed successfully, since the resid field will be 0 and the u/o bits
not<br>
set.<br>
<br>
Such behaviour can result in a corrupt read due to the read being completed<br>
with success, but no data having been read into the read data buffer. <br>
<br>
SAM-2 Section 5.3.2 is only discussing SCSI status precedence. It does
not<br>
explain the resid reporting precedence compared to SCSI status. <br>
<br>
Regards,<br>
Santosh<br>
<br>
<br>
<br>
&gt; <br>
&gt; Santosh,<br>
&gt; <br>
&gt; For any check condition in which the target did process the command
this<br>
&gt; is the expected behavior.<br>
&gt; The example Eddy gave involves a target that due to ACA or BUSY does
not<br>
&gt; initiate processing the command.<br>
&gt; In this case the target provider does not HAVE TO set the U/O bits
(and<br>
&gt; the associated values).<br>
&gt; The relevant piece of information appears in SAM2 5.3.2 that indicates<br>
&gt; that status precedence.<br>
&gt; Obviously a target MAY set the U/O bits although &nbsp;I doubt that
an<br>
&gt; initiator will look them up.<br>
&gt; <br>
&gt; Regards,<br>
&gt; Julo<br>
&gt; <br>
&gt; <br>
&gt; -----Original Message-----<br>
&gt; From: owner-ips@ece.cmu.edu [mailto:owner-ips@ece.cmu.edu] On Behalf
Of<br>
&gt; Santosh Rao<br>
&gt; Sent: 16 February, 2003 23:28<br>
&gt; To: Eddy Quicksall<br>
&gt; Cc: &quot;Ips@Ece.Cmu.Edu (ips@ece.cmu.edu)&quot;<br>
&gt; Subject: Re: iSCSI: underrun with a check condition<br>
&gt; <br>
&gt; <br>
&gt; Eddy,<br>
&gt; <br>
&gt; Yes, anytime the amount of data transferred does not match the data<br>
&gt; transfer length specified, the target must set the U bit or O bit,<br>
&gt; depending on whether an underflow or overflow occurred.<br>
&gt; <br>
&gt; A recovered error check condition may be returned as the response
to a<br>
&gt; scsi command which was processed to completion. The recovered error<br>
&gt; indicates that a previous command completed successfully with some<br>
&gt; recovery action by the device server and the sense data provides<br>
&gt; additional details on that previous command.<br>
&gt; <br>
&gt; The current command on which a recovered error check condition was<br>
&gt; returned may have been processed to completion, or experienced some<br>
&gt; underflow or overflow. This information must be conveyed by the target<br>
&gt; in the iscsi scsi response pdu using the appropriate fields to describe<br>
&gt; the underflow or overflow.<br>
&gt; <br>
&gt; Thanks,<br>
&gt; Santosh<br>
&gt; <br>
&gt; <br>
&gt; &gt; Should the target set the U bit when it gives a check condition
to a <br>
&gt; &gt; data-in command?<br>
&gt; &gt; &nbsp;<br>
&gt; &gt; &nbsp;<br>
&gt; &gt; Eddy<br>
&gt; <br>
&gt; <br>
<br>
<br>
-- <br>
**************************<br>
Santosh Rao<br>
HP-UX SCSI Team,<br>
Hewlett Packard, Cupertino<br>
**************************<br>
</tt></font>
<br>
--=_alternative 004023CDC2256CD0_=--
