Subject: iSCSI: draft 7: Abort Task and RefCmdSN

From: "Elliott, Robert" <[email-masked]>
Date: Sun, 5 Aug 2001 12:36:10 -0500

The Task Management [function] Command PDU includes two fields
currently only used by the ABORT TASK function:

2.5.2 Referenced Task Tag  
  Initiator Task Tag of the task to be aborted - for abort task 
 
2.5.3 RefCmdSN [Referenced command sequence number]
  For abort-task the task CmdSN to enable task removal. If RefCmdSN is 
  is lower that ExpCmdSN or higher than MaxCmdSN the target will ignore 
  RefCmdSN.

Both fields identify the task to be aborted.  The Referenced Task
Tag field sits at the SCSI level and matches the SAM-2 function
call description (SAM-2 revision 18):
6.2 ABORT TASK
  Function call:
    Service Response = ABORT TASK (IN (I_T_L_Q Nexus) )

The RefCmdSN field sits at the iSCSI level.

I suggest removing one of these fields.  Having two ways to
specify the same thing just raises the question of what to do
when the values don't agree.  If that happens, should the 
target:
send back a Reject PDU
abort both tasks
abort the task indicated by the Referenced Task Tag
abort the task indicated by the RefCmdSN
abort one of the tasks but also report an error
do any of the above

Since task management functions in general may rely on the
SCSI tag (although Abort Task is the only current user of it), 
I suggest keeping that flag and dropping the iSCSI field.

--
[email-masked]
Compaq Computer Server Storage

---

From: "Julian Satran" <[email-masked]>
Date: Mon, 6 Aug 2001 10:40:37 +0300

Sorry David - Since 06 this is not true anymore as they carry their own
CmdSN for the purpose you mentioned (even when immediate) - but although
this is good for clear task set it is not good enough for singles for which
we still need both.

Julo

[email-masked]@ece.cmu.edu on 06-08-2001 10:14:43

Please respond to [email-masked]

Sent by:  [email-masked]

To:   [email-masked], [email-masked]
cc:
Subject:  RE: iSCSI: draft 7: Abort Task and RefCmdSN

ABORT TASK SET and CLEAR TASK SET also need the RefCmdSN to
indicate where in the stream of commands they were issued.
Julian - you probably need to revise your revised text to
take this into account.

--David

> -----Original Message-----
> From: Elliott, Robert [mailto:[email-masked]]
> Sent: Sunday, August 05, 2001 1:36 PM
> To: [email-masked]'
> Subject: iSCSI: draft 7: Abort Task and RefCmdSN
>
>

---

From: [email-masked]
Date: Mon, 6 Aug 2001 03:14:43 -0400

--David

---

From: "Julian Satran" <[email-masked]>
Date: Mon, 6 Aug 2001 23:21:13 +0300

Alex,

That is correct but has no relevance if you want to abbort one specific
task.

Julo

"Nicolson, Alex" <[email-masked]> on 06-08-2001 21:16:28

Please respond to <[email-masked]>

To:   Julian Satran/Haifa/IBM@IBMIL, <[email-masked]>
cc:
Subject:  RE: iSCSI: draft 7: Abort Task and RefCmdSN

Julo,

I must be misunderstanding something. I thought that Task Management
commands were to be executed as if they had arrived in sequence based on
their CmdSN.

        "Task management commands must be executed
        as if all the commands having a CmdSN lower or equal to the task
        management CmdSN have been received by the target (i.e., have to be
        executed as if received for ordered delivery even when marked for
        immediate delivery)."

Why wouldn't that be the case with Abort Task?

[email-masked]

> From: [email-masked] [mailto:[email-masked]]On Behalf Of
> Julian Satran
> Sent: Sunday, August 05, 2001 2:37 PM
> To: [email-masked]
> Subject: Re: iSCSI: draft 7: Abort Task and RefCmdSN
>
>
> Robert,
>
> This is related to the fact that the abort command can arrive before the
> command to be aborted if sent on a different connection (or the
> command has
> been dropped due to some error). As such RefCmdSN indicates where the
> command would have been in the command queue.  If they don't agree the
> target should not abbort. And the main criteria for finding a task is the
> Initiator Task Tag.
> I've changed the wording to:
>
> 1.1.1     RefCmdSN
>
>    For abort-task the task CmdSN to enable task removal. If RefCmdSN does
>    not match the CmdSN of the command to be aborted at the target
> The abort action MUST not be performed and the response MUST be function
> rejected.
>
> Julo
>
>
>
> "Elliott, Robert" <[email-masked]>@ece.cmu.edu on 05-08-2001
> 20:36:10
>
> Please respond to "Elliott, Robert" <[email-masked]>
>
> To:   "[email-masked]'" <[email-masked]>
> cc:

---

From: "Julian Satran" <[email-masked]>
Date: Wed, 8 Aug 2001 13:02:22 +0300

Correct - expect CmdSN should take a value of one more the last CmdSN (the
value that would have beein give to it would it not have been immediate).
And tere is bound bound to be a slight correction som simplify abbort task
in most of the cases comming in several days (nothing major only a
clarification and a recommended behaviour).

Julo

"Nicolson, Alex" <[email-masked]> on 07-08-2001 16:28:42

To:   Julian Satran/Haifa/IBM@IBMIL
cc:
Subject:  RE: iSCSI: draft 7: Abort Task and RefCmdSN

Julo,

Thanks for having patience with me.

The way I understand the CmdSN for Task Management in the Rev 7 spec, it
looked that for all practical purposes, the CmdSn was going to have to be
set to the last value sent for it to properly handle all outstanding
commands, otherwise there would be lost Task Tags. I read it as there would
be no responses for any tasks greater than CmdSN, therefore CmdSN seems to
requires some not so arbitrary value. Is there something I should read more
carefully?

Alex

> From: Julian Satran [mailto:[email-masked]]
> Sent: Tuesday, August 07, 2001 1:58 AM
> To: [email-masked]
> Alex
> CmdSN can take any value. CmdSN is meant mainly as a generalized
reference
> for where in the stream an immediate command was issue - or as a
> CmdSN when
> not immediate (even Abort Task does not have to be immediate).
>
> Julo
>
> "Nicolson, Alex" <[email-masked]> on 07-08-2001 00:21:01
>
> To:   Julian Satran/Haifa/IBM@IBMIL
> cc:
> I'm sorry I am being so thick, I am quite confused. My understanding was
> that to Abort Task aborted the task based on the Referenced Task
> Tag. Is it
> now required that to abort a task both the CmdSn and Task Tag must be
used
> ID a particular Task? I'm not sure why both are required.
>
> I can understand that a Abort Task might arrive before the iSCSI SCSI PDU
> for that task to be aborted arrived, but can't the problem be detected
and
> manged by use of the CmdSN.
>
> (I guess I liked it better when the only purpose of CmdSn was for command
> ordering between the iSCSI and SCSI layer. :))
>
> [email-masked]
>
>
> > From: Julian Satran [mailto:[email-masked]]
> > Sent: Monday, August 06, 2001 4:21 PM
> > To: [email-masked]
> > Cc: [email-masked]