Subject: RE: iSCSI: MaxCmdSN rule

From: "Julian Satran" <[email-masked]>
Date: Fri, 8 Feb 2002 02:30:16 +0200

Please consider also carefully the Serial Arithmetic rules with regard to
"lower/higher" and the bounds on the ExpComdSN and MaxCmdSN difference.

Julo
----- Forwarded by Julian Satran/Haifa/IBM on 08-02-02 02:26 -----
                                                                                             
                    "Ayman Ghanem"                                                           
                    <aghanem@cisco       To:     <[email-masked]>                           
                    .com>                cc:                                                 
                    Sent by:             Subject:     RE: iSCSI: MaxCmdSN rule               
                    owner-ips@ece.                                                           
                    cmu.edu                                                                  

                    08-02-02 00:53                                                           

This sentence should be changed to:

"The target MUST NOT transmit a MaxCmdSN that is less than the last
ExpCmdSN-1"

The paragraph above this states:

"If the PDU MaxCmdSN is less than the PDU ExpCmdSN-1 (in Serial Arithmetic
Sense), they are both ignored."

which allows MaxCmdSN = ExpCmdSN-1,valid, for the case when the target's
command window is closed.

-Ayman

 -----Original Message-----
 From: [email-masked] [mailto:[email-masked]]On Behalf Of
 Buck Landry
 Sent: Thursday, February 07, 2002 2:40 PM
 To: [email-masked]
 Subject: iSCSI: MaxCmdSN rule

 Hi all, I'm struggling over how to interpret this rule in section 1.2.2 of
 draft v10:

 >>> The target MUST NOT transmit a MaxCmdSN that is less than
         the last ExpCmdSN.
 <<<

 This confuses me because it says to me (in some cases) that a target must
 be able to handle an unlimited number of commands.  For example, let's say
 the target has just about reached the limit of the commands it can handle:

 T=>(Nop-In) (MaxCmdSN = 1, ExpCmdSN = 1)

 I=>(Scsi Read Cmd) (CmdSN = 1)

 T=>(Data-in) (MaxCmdSN = 1, ExpCmdSN = 2 /* acknowledging scsi read cmd
 */)

 Now the target may have many more data-ins to transmit.  But according to
 the rule, since the last ExpCmdSN the target transmitted was 2, the target
 is now forced to send a MaxCmdSN of 2:

 T=>(Data-in) (MaxCmdSN = 2, ExpCmdSN = 2)

 But this allows the initiator to send another command, even though the
 target can't handle it!

 Obviously something is wrong with my reasoning here (perhaps my
 interpretation of 'last ExpCmdSN', or when I"m supposed to acknowledge the
 scsi cmd); can anybody clarify?

 --buck

----- Forwarded by Julian Satran/Haifa/IBM on 08-02-02 02:26 -----
                                                                                             
                    "Buck Landry"                                                            
                    <blandry@cross       To:     <[email-masked]>                           
                    roads.com>           cc:                                                 
                    Sent by:             Subject:     iSCSI: MaxCmdSN rule                   
                    owner-ips@ece.                                                           
                    cmu.edu                                                                  

                    07-02-02 22:40                                                           

Hi all, I'm struggling over how to interpret this rule in section 1.2.2 of
draft v10:

>>> The target MUST NOT transmit a MaxCmdSN that is less than
        the last ExpCmdSN.
<<<

This confuses me because it says to me (in some cases) that a target must
be able to handle an unlimited number of commands.  For example, let's say
the target has just about reached the limit of the commands it can handle:

T=>(Nop-In) (MaxCmdSN = 1, ExpCmdSN = 1)

I=>(Scsi Read Cmd) (CmdSN = 1)

T=>(Data-in) (MaxCmdSN = 1, ExpCmdSN = 2 /* acknowledging scsi read cmd */)

Now the target may have many more data-ins to transmit.  But according to
the rule, since the last ExpCmdSN the target transmitted was 2, the target
is now forced to send a MaxCmdSN of 2:

T=>(Data-in) (MaxCmdSN = 2, ExpCmdSN = 2)

But this allows the initiator to send another command, even though the
target can't handle it!

Obviously something is wrong with my reasoning here (perhaps my
interpretation of 'last ExpCmdSN', or when I"m supposed to acknowledge the
scsi cmd); can anybody clarify?

--buck