Subject: [Ips] iSCSI: Handling R2T SNACK requests

From: "Ken Sandars" <[email-masked]>
Date: Fri, 23 Jan 2004 13:09:33 -0000

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)
(b) Copy of R2T with R2TSN=2 (because it must obey the MaxOutstandingR2T
limit)
(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

---

From: Julian Satran <[email-masked]>
Date: Sun, 25 Jan 2004 05:40:53 +0200

> (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

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