Subject: RE: [Ips] iSCSI: Handling R2T SNACK requests

From: [email-masked]
Date: Tue, 27 Jan 2004 11:53:52 -0700

Julian and Ken,

To answer Ken's last question first, this does seem to be a very odd scenario. The initiator obviously received the R2T because it responded by sending data and then it SNACKs the R2T.

10.16 says: 
Any SNACK that requests a numbered-response, Data, or R2T that was
not sent by the target or was already acknowledged by the initiator,
MUST be rejected with a reason code of "Protocol error".

3.2.2.3 says:
Data and R2T PDUs are implicity acknowledged by status for the command.

There doesn't seem to be a description of the exact event that triggers the implicit acknowlegement for an R2T. 

Is the R2T acknowledge when one receives the first Data-out in response to it? If so, then R2TSN=2 was already acknowledged and the target should reject the SNACK with reason code of Protocol error. This seems a reasonable interpretation since the initial Data-Out demonstrates that the initiator received the R2T.

Is the R2T acknowledged only by the Data-out response to it with F=1? One could interpret that only the final Data-out PDU changes the status of the command and therefore acknowledges the R2T. If this is the case, then SNACK should cause retransmission R2TSN 2 and R2TSN 3. (Run length of zero requested retransmission of R2Ts starting with the initial and it doesn't matter that R2TSN was a recovery R2T.)

So it should be either a or c.

Pat

-----Original Message-----
From: Julian Satran [mailto:[email-masked]]
Sent: Saturday, January 24, 2004 7:41 PM
To: Ken Sandars
Cc: [email-masked]; [email-masked]
Subject: Re: [Ips] iSCSI: Handling R2T SNACK requests

[email-masked] wrote on 23/01/2004 05:09:33:

> Hi all,
> 
> Curly scenario #27468:
> 
> A session is established with no unsolicited data allowed,
> ErrorRecoveryLevel=1, MaxOutstandingR2T=1, MaxBurstLength=64KB. The
> target has declared MaxPDUDataSegmentLength=32KB
> 
> Here's a sequence attempting to process a single task:
> 
> I->T SCSI WRITE Command for 256KB
> 
> T->I R2T TTT=180 R2TSN=0 offset=0 len=64KB
> I->T DATA-OUT TTT=80 DataSN=0 offset=0 len=32KB F=0
> I->T DATA-OUT TTT=80 DataSN=1 offset=32KB len=32KB F=1
> 
> T->I R2T TTT=190 R2TSN=1 offset=64KB len=64KB
> I->T DATA-OUT TTT=190 DataSN=2 offset=64KB len=32KB F=0
> I->T DATA-OUT TTT=190 DataSN=3 offset=92KB len=32KB F=1
> 
> T->I R2T TTT=200 R2TSN=2 offset=128KB len=64KB
> I->T DATA-OUT TTT=200 DataSN=4 offset=128KB len=32KB F=0
> I->T DATA-OUT TTT=200 DataSN=5 offset=160KB len=32KB F=1 (lost at
> target)
> 
> Some time later, a receive sequence timer pops at the target and a
> recovery R2T is issued for this task:
> 
> T->I R2T TTT=210 R2TSN=3 offset=160KB len=32KB
> 
> In the meantime, the initiator ignores the 'SHOULD' in the 2nd last 
> paragraph of section 6.4.4.1 and sends an R2T SNACK for the command
> with BegRun of 2 and RunLength 0.
> 
> 
> 1. Should the target send:
> (a) reject (because the BegRun value asks for a non-existent task)

the task exists :-)
> (b) Copy of R2T with R2TSN=2 (because it must obey the MaxOutstandingR2T
> limit)

That's what the initiator is asking for! If it was not sent yet you can 
reject it or better ignore it untill you send the real thing

> (c) Copy of R2T with R2TSN=2 and the recovery R2T with R2TSN=3
> (d) Copy of R2T with R2TSN=3 (because it considers the R2TSN=2 task as
> terminated)
> or do something else?
> 
> 2. Is this a contrived question?  A sane initiator would never send a
> SNACK in this situation, and if it did it would use BegRun=0 and
> RunLength=0 to get whatever it can.
> 
> 
> As always, all replies thanked for in advance
> Ken Sandars
> Elipsan UK
> 
> 
> 
> _______________________________________________
> Ips mailing list
> [email-masked]
> https://www1.ietf.org/mailman/listinfo/ips

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

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