Subject: Re: [Ips] StatSN question

From: "Eddy Quicksall" <[email-masked]>
Date: Fri, 18 May 2007 01:03:08 -0400

It would mean the header and data has been received. The reason is because 
the target can use ExpStatSN to free the resources used to send the Data-in. 
At ERL 0 it is faster to just use the TCP ACK; for ERL > 0 I think there was 
argument given once that the TCP ACK may not really indicate that the data 
was received and hence the ExpStatSN would be used for that purpose (I don't 
really remember that well though).

Eddy

----- Original Message ----- 
From: "Ken Craig" <[email-masked]>
To: <[email-masked]>
Sent: Friday, April 27, 2007 5:23 PM
Subject: [Ips] StatSN question

I have a question about what ExpStatSN means that
I can't find an answer for in the reflector archives
or in any of the RFCs.

I, as an iSCSI Target running at ERL=0, send a
DATA IN PDU with FINAL=1 and a StatSN of 0.  I
receive a SCSI CMD PDU with an ExpStatSN of 1.
Does this mean that the Initiator has received
the PDU BHS and all of the data or is it simply
an acknowledgement that it has received the PDU
BHS?

Thanks,
Ken Craig

_______________________________________________
Ips mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/ips

_______________________________________________
Ips mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/ips

---

From: "Ken Craig" <[email-masked]>
Date: Fri, 18 May 2007 09:46:46 -0700

Eddy,

Thanks for the response.  I've got an Initiator
that is updating ExpStatSn before receiving all
of the data.  I consider that Initiator to be
broken but since the RFC doesn't specifically
state what you said I've got no choice but to
find a way to deal with it.

Ken Craig

-----Original Message-----
From: Eddy Quicksall [mailto:[email-masked]] 
Sent: Thursday, May 17, 2007 10:03 PM
To: Ken Craig; [email-masked]
Subject: Re: [Ips] StatSN question

It would mean the header and data has been received. The reason is
because 
the target can use ExpStatSN to free the resources used to send the
Data-in. 
At ERL 0 it is faster to just use the TCP ACK; for ERL > 0 I think there
was 
argument given once that the TCP ACK may not really indicate that the
data 
was received and hence the ExpStatSN would be used for that purpose (I
don't 
really remember that well though).

Eddy

----- Original Message ----- 
From: "Ken Craig" <[email-masked]>
To: <[email-masked]>
Sent: Friday, April 27, 2007 5:23 PM
Subject: [Ips] StatSN question

Thanks,
Ken Craig

---

From: Julian Satran <[email-masked]>
Date: Fri, 18 May 2007 22:47:06 +0300

ExpStatSN indicates to the target that the initiator has received the 
status for the task and the target may discard whatever it may have hold 
for the task.
It also indicates to to the target when it is safe to send the response to 
a task abort or a "group" abort task management function.
Whether you can you use TCP ack for the same pupose dependes on how you 
stack is layered and/or how your recovery from end-to-end errors is done.

Julo

"Eddy Quicksall" <[email-masked]> 
18/05/07 08:03

To
"Ken Craig" <[email-masked]>, <[email-masked]>
cc

Subject
Re: [Ips] StatSN question

Eddy

----- Original Message ----- 
From: "Ken Craig" <[email-masked]>
To: <[email-masked]>
Sent: Friday, April 27, 2007 5:23 PM
Subject: [Ips] StatSN question

Thanks,
Ken Craig

---

From: "Ken Craig" <[email-masked]>
Date: Fri, 18 May 2007 13:05:17 -0700

Julian,
 
When you say "target may discard whatever it may have
hold for the task" aren't you saying the same thing as
Eddy.  That the ExpStatSN is an indication that the
Initiator has also received the data since resources would
have been used for the data.
 
Thanks,
Ken Craig

 -----Original Message-----
From: Julian Satran [mailto:[email-masked]] 
Sent: Friday, May 18, 2007 12:47 PM
To: Eddy Quicksall
Cc: [email-masked]; Ken Craig
Subject: Re: [Ips] StatSN question

	ExpStatSN indicates to the target that the initiator has
received the status for the task and the target may discard whatever it
may have hold for the task. 
	It also indicates to to the target when it is safe to send the
response to a task abort or a "group" abort task management function. 
	Whether you can you use TCP ack for the same pupose dependes on
how you stack is layered and/or how your recovery from end-to-end errors
is done. 
	
	Julo 

18/05/07 08:03 

To

	It would mean the header and data has been received. The reason
is because 
	the target can use ExpStatSN to free the resources used to send
the Data-in. 
	At ERL 0 it is faster to just use the TCP ACK; for ERL > 0 I
think there was 
	argument given once that the TCP ACK may not really indicate
that the data 
	was received and hence the ExpStatSN would be used for that
purpose (I don't 
	really remember that well though).
	
	Eddy
	
	----- Original Message ----- 
	From: "Ken Craig" <[email-masked]>
	To: <[email-masked]>
	Sent: Friday, April 27, 2007 5:23 PM
	Subject: [Ips] StatSN question

	
	Thanks,
	Ken Craig

---

From: Julian Satran <[email-masked]>
Date: Fri, 18 May 2007 23:15:13 +0300

Definitely yes (acknowledging the status is equivalent to acking all the 
data). In addition resources are help to enable status retransmission even 
in commands that do not have data transfers. Julo

"Ken Craig" <[email-masked]> 
18/05/07 23:05

To
Julian Satran/Haifa/IBM@IBMIL
cc
<[email-masked]>
Subject
RE: [Ips] StatSN question

Julian,

Thanks,
Ken Craig

 -----Original Message-----
From: Julian Satran [mailto:[email-masked]] 
Sent: Friday, May 18, 2007 12:47 PM
To: Eddy Quicksall
Cc: [email-masked]; Ken Craig
Subject: Re: [Ips] StatSN question

Julo 

To

Subject

Eddy

----- Original Message ----- 
From: "Ken Craig" <[email-masked]>
To: <[email-masked]>
Sent: Friday, April 27, 2007 5:23 PM
Subject: [Ips] StatSN question

Thanks,
Ken Craig

---

From: [email-masked]
Date: Sat, 19 May 2007 16:05:20 -0400

In the original message, Ken did NOT say that the "S" bit was set to 1 in the last Data-In PDU.
 
According to the RFC (3270) - Section 10.7.3"
 
"The fields StatSN, Status, and Residual Count only have meaningful content if the S bit is set to 1 and their values are defined in Section 10.4 SCSI Response." 
My interpretation of that section would be that the iSCSI Initiator should NOT have sent ExpStatSN=1, until the SCSI Response PDU was received.
 
Take Care,
 
Greg Alvey
Solution Technoloy
www.soltechnology.com

-----Original Message-----
From: [email-masked]
To: [email-masked]
Cc: [email-masked]
Sent: Fri, 18 May 2007 1:15 PM
Subject: RE: [Ips] StatSN question

Definitely yes (acknowledging the status is equivalent to acking all the data). In addition resources are help to enable status retransmission even in commands that do not have data transfers. Julo 

"Ken Craig" <[email-masked]> 
18/05/07 23:05 ToJulian Satran/Haifa/IBM@IBMIL 
cc<[email-masked]> 
SubjectRE: [Ips] StatSN question

Julian, 

Thanks, 
Ken Craig 

 -----Original Message-----
From: Julian Satran [mailto:[email-masked]] 
Sent: Friday, May 18, 2007 12:47 PM
To: Eddy Quicksall
Cc: [email-masked]; Ken Craig
Subject: Re: [Ips] StatSN question

ExpStatSN indicates to the target that the initiator has received the status for the task and the target may discard whatever it may have hold for the task. 
It also indicates to to the target when it is safe to send the response to a task abort or a "group" abort task management function. 
Whether you can you use TCP ack for the same pupose dependes on how you stack is layered and/or how your recovery from end-to-end errors is done. 

Julo 

"Eddy Quicksall" <[email-masked]> 
18/05/07 08:03 
To"Ken Craig" <[email-masked]>, <[email-masked]> 
cc
SubjectRe: [Ips] StatSN question

Eddy

----- Original Message ----- 
From: "Ken Craig" <[email-masked]>
To: <[email-masked]>
Sent: Friday, April 27, 2007 5:23 PM
Subject: [Ips] StatSN question

Thanks,
Ken Craig

_______________________________________________
Ips mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/ips
________________________________________________________________________
AOL now offers free email to everyone.  Find out more about what's free from AOL at AOL.com.
_______________________________________________
Ips mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/ips

---

From: "Sandars, Ken" <[email-masked]>
Date: Sun, 20 May 2007 19:34:18 -0700

Hi Ken,

Interesting initiator. If it is truly issuing an ExpStatSN which
acknowledges a response which has not been sent by the target, the
implementers should be directed to section 3.2.2.2 of RFC3720.

Is it possible that the target is not initialising its StatSN counter
correctly? Your example refers to a StatSN of 0 for the Data-In PDU
(which I am assuming also has the S bit set). Have a read of section
10.13.4 and ensure the target is incrementing StatSN correctly.

HTH,
Ken

-----Original Message-----
From: Ken Craig [mailto:[email-masked]] 
Sent: Saturday, 19 May 2007 02:47
To: Eddy Quicksall; [email-masked]
Subject: RE: [Ips] StatSN question

Eddy,

Thanks for the response.  I've got an Initiator that is updating
ExpStatSn before receiving all of the data.  I consider that Initiator
to be broken but since the RFC doesn't specifically state what you said
I've got no choice but to find a way to deal with it.

Ken Craig

-----Original Message-----
From: Eddy Quicksall [mailto:[email-masked]]
Sent: Thursday, May 17, 2007 10:03 PM
To: Ken Craig; [email-masked]
Subject: Re: [Ips] StatSN question

Eddy

----- Original Message ----- 
From: "Ken Craig" <[email-masked]>
To: <[email-masked]>
Sent: Friday, April 27, 2007 5:23 PM
Subject: [Ips] StatSN question

Thanks,
Ken Craig

---

From: "Ken Craig" <[email-masked]>
Date: Mon, 21 May 2007 10:16:24 -0700

Ken,

My iSCSI Target has been working for the last
couple of years with all of the Initiators I
have been able to get a hold of.  I guess I
should have been more explicit in my example.
The Initiator negotiated a 256K
MaxRecvDataSegmentLength of 256K then sent a
128K Read command which allowed me to send all
of the data in one PDU.  The DATA IN PDU had
the Status and Final bits set with Command
Status of Good.  It wasn't until I had a
situation where a few of the Ethernet Frames
with the rest of the data for this particular
DATA IN PDU were stalled for ~.5 second (due
to what I think was the Initiator not opening
up its window size) that the problem was seen.  

Ken Craig

-----Original Message-----
From: Sandars, Ken [mailto:[email-masked]] 
Sent: Sunday, May 20, 2007 7:34 PM
To: Ken Craig; Eddy Quicksall; [email-masked]
Subject: RE: [Ips] StatSN question

Hi Ken,

HTH,
Ken

-----Original Message-----
From: Ken Craig [mailto:[email-masked]] 
Sent: Saturday, 19 May 2007 02:47
To: Eddy Quicksall; [email-masked]
Subject: RE: [Ips] StatSN question

Eddy,

Ken Craig

-----Original Message-----
From: Eddy Quicksall [mailto:[email-masked]]
Sent: Thursday, May 17, 2007 10:03 PM
To: Ken Craig; [email-masked]
Subject: Re: [Ips] StatSN question

Eddy

----- Original Message ----- 
From: "Ken Craig" <[email-masked]>
To: <[email-masked]>
Sent: Friday, April 27, 2007 5:23 PM
Subject: [Ips] StatSN question

Thanks,
Ken Craig

---

From: "Eddy Quicksall" <[email-masked]>
Date: Wed, 23 May 2007 08:49:52 -0400

It would behoove all of us if the initiator was fixed. We should not be 
adding code to overcome a bug in the initiator especially if it is hard to 
detect.

Can you tell us the initiator so we can run tests too?

Eddy
----- Original Message ----- 
From: "Ken Craig" <[email-masked]>
To: "Sandars, Ken" <[email-masked]>; <[email-masked]>
Sent: Monday, May 21, 2007 1:16 PM
Subject: RE: [Ips] StatSN question

Ken,

Ken Craig

-----Original Message-----
From: Sandars, Ken [mailto:[email-masked]]
Sent: Sunday, May 20, 2007 7:34 PM
To: Ken Craig; Eddy Quicksall; [email-masked]
Subject: RE: [Ips] StatSN question

Hi Ken,

HTH,
Ken

-----Original Message-----
From: Ken Craig [mailto:[email-masked]]
Sent: Saturday, 19 May 2007 02:47
To: Eddy Quicksall; [email-masked]
Subject: RE: [Ips] StatSN question

Eddy,

Ken Craig

-----Original Message-----
From: Eddy Quicksall [mailto:[email-masked]]
Sent: Thursday, May 17, 2007 10:03 PM
To: Ken Craig; [email-masked]
Subject: Re: [Ips] StatSN question

Eddy

----- Original Message ----- 
From: "Ken Craig" <[email-masked]>
To: <[email-masked]>
Sent: Friday, April 27, 2007 5:23 PM
Subject: [Ips] StatSN question

Thanks,
Ken Craig

---

From: "Ken Craig" <[email-masked]>
Date: Wed, 23 May 2007 10:29:32 -0700

Eddy,

The person in my organization that has all of
the pertinent information is out of the office
until next week so I won't be able to get it
to you until then.

Ken Craig

-----Original Message-----
From: Eddy Quicksall [mailto:[email-masked]] 
Sent: Wednesday, May 23, 2007 5:50 AM
To: Ken Craig; Sandars, Ken; [email-masked]
Subject: Re: [Ips] StatSN question

It would behoove all of us if the initiator was fixed. We should not be 
adding code to overcome a bug in the initiator especially if it is hard
to 
detect.

Eddy
----- Original Message ----- 
From: "Ken Craig" <[email-masked]>
To: "Sandars, Ken" <[email-masked]>; <[email-masked]>
Sent: Monday, May 21, 2007 1:16 PM
Subject: RE: [Ips] StatSN question

Ken,

Ken Craig

-----Original Message-----
From: Sandars, Ken [mailto:[email-masked]]
Sent: Sunday, May 20, 2007 7:34 PM
To: Ken Craig; Eddy Quicksall; [email-masked]
Subject: RE: [Ips] StatSN question

Hi Ken,

HTH,
Ken

-----Original Message-----
From: Ken Craig [mailto:[email-masked]]
Sent: Saturday, 19 May 2007 02:47
To: Eddy Quicksall; [email-masked]
Subject: RE: [Ips] StatSN question

Eddy,

Ken Craig

-----Original Message-----
From: Eddy Quicksall [mailto:[email-masked]]
Sent: Thursday, May 17, 2007 10:03 PM
To: Ken Craig; [email-masked]
Subject: Re: [Ips] StatSN question

It would mean the header and data has been received. The reason is
because the target can use ExpStatSN to free the resources used to send
the Data-in. At ERL 0 it is faster to just use the TCP ACK; for ERL > 0
I think there was argument given once that the TCP ACK may not really
indicate that the data was received and hence the ExpStatSN would be
used for that purpose (I don't really remember that well though).

Eddy

----- Original Message ----- 
From: "Ken Craig" <[email-masked]>
To: <[email-masked]>
Sent: Friday, April 27, 2007 5:23 PM
Subject: [Ips] StatSN question

Thanks,
Ken Craig

---

From: "Ken Craig" <[email-masked]>
Date: Thu, 31 May 2007 15:15:47 -0700

Eddy,

The iSCSI initiator that we have confirmed sends updated
ExpStatSN before receiving all of the data is from SourceForge.
The name of the project on SourceForge is "linux-iscsi".
The version that we looked at the source code for is 4.0.2.

I also had a mistake in my detailed example.  The Initiator
negotiated a 128K MaxRecvDataSegmentLength instead of the
256K I mentioned.  That doesn't change anything since the
command that turned up the issue was a 128K Read.

Ken Craig

-----Original Message-----
From: Eddy Quicksall [mailto:[email-masked]] 
Sent: Wednesday, May 23, 2007 5:50 AM
To: Ken Craig; Sandars, Ken; [email-masked]
Subject: Re: [Ips] StatSN question

Eddy
----- Original Message ----- 
From: "Ken Craig" <[email-masked]>
To: "Sandars, Ken" <[email-masked]>; <[email-masked]>
Sent: Monday, May 21, 2007 1:16 PM
Subject: RE: [Ips] StatSN question

Ken,

Ken Craig

-----Original Message-----
From: Sandars, Ken [mailto:[email-masked]]
Sent: Sunday, May 20, 2007 7:34 PM
To: Ken Craig; Eddy Quicksall; [email-masked]
Subject: RE: [Ips] StatSN question

Hi Ken,

HTH,
Ken

-----Original Message-----
From: Ken Craig [mailto:[email-masked]]
Sent: Saturday, 19 May 2007 02:47
To: Eddy Quicksall; [email-masked]
Subject: RE: [Ips] StatSN question

Eddy,

Ken Craig

-----Original Message-----
From: Eddy Quicksall [mailto:[email-masked]]
Sent: Thursday, May 17, 2007 10:03 PM
To: Ken Craig; [email-masked]
Subject: Re: [Ips] StatSN question

Eddy

----- Original Message ----- 
From: "Ken Craig" <[email-masked]>
To: <[email-masked]>
Sent: Friday, April 27, 2007 5:23 PM
Subject: [Ips] StatSN question

Thanks,
Ken Craig