Subject: [Tsvwg] text inconsistency in draft-ietf-tsvwg-2960bis-02

From: Vlad Yasevich <[email-masked]>
Date: Tue, 05 Dec 2006 15:15:01 -0500

Hi

I recent found the following text inconsistency in 2960bis-02.

Section 6.2 says:

   Acknowledegments MUST be sent in SACK chunks unless shutdown was
   requested by the ULP, in which case an endpoint MAY send an
   acknowledgement in the SHUTDOWN chunk.  A SACK chunk can acknowledge
   the reception of multiple DATA chunks.  See Section 3.3.4 for SACK
   chunk format.  In particular, the SCTP endpoint MUST fill in the
   Cumulative TSN Ack field to indicate the latest sequential TSN (of a
   valid DATA chunk) it has received.  Any received DATA chunks with TSN
   greater than the value in the Cumulative TSN Ack field are reported
   in the Gap Ack Block fields.  The SCTP endpoint MUST report as many
   Gap Ack Blocks as can fit in a single SACK chunk limited by the
   current path MTU.

   Note: The SHUTDOWN chunk does not contain Gap Ack Block fields.
   Therefore, the endpoint should use a SACK instead of the SHUTDOWN
   chunk to acknowledge DATA chunks received out of order .

Note the use of "MAY" in the first sentence above.   Also the Note doesn't
really mandate anything.  May be the "should" needs to be a "SHOULD"?

Then looking at section 9.2.
   While in SHUTDOWN-SENT state, the SHUTDOWN sender MUST immediately
   respond to each received packet containing one or more DATA chunks
   with a SHUTDOWN chunk and restart the T2-shutdown timer.  If a
   SHUTDOWN chunk by itself cannot acknowledge all of the received DATA
   chunks (i.e., there are TSNs that can be acknowledged that are larger
   than the cumulative TSN, and thus gaps exist in the TSN sequence), or
   if duplicate TSNs have been received, then a SACK chunk MUST also be
   sent.

While Section 6.2 says the SHUTDOWN "MAY" be used, section 9.2 says that
SHUTDOWN "MUST" be used.  Section 9.2 also mandates a "MUST" for a SACK, while
the Note in Section 6.2 only says "should".

It would probably better for Section 6.2 to point to Section 9.2 for the correct
behavior.

Something like:

   Acknowledegments MUST be sent in SACK chunks unless shutdown was
   requested by the ULP, in which case Section 9.2 describes the proper
   response.

And remove the Note.

-vlad

---

From: "Brian F. G. Bidulock" <[email-masked]>
Date: Tue, 5 Dec 2006 15:34:05 -0700

Vlad,

Section 6.2 say that a SHUTDOWN MAY be used to acknowledge.  Section
9.2 says when a SHUTDOWN MUST be sent, but a SACK can still be used to
acknowledge data.  So, I don't see the where there is a contradiction.

--brian

Vlad Yasevich wrote:                                                  (Tue, 05 Dec 2006 15:15:01)

-- 
Brian F. G. Bidulock
[email-masked]
http://www.openss7.org/

---

From: Vlad Yasevich <[email-masked]>
Date: Wed, 06 Dec 2006 09:46:38 -0500

Hi Brian

> acknowledge data.  So, I don't see the where there is a contradiction.

It's not a contradiction, but an inconsistency in requirements.

Section 6.2 says that an implementation MAY send a SHUTDOWN to acknowledge
DATA.  Section 9.2 says that an implementation MUST send a SHUTDOWN to
acknowledge DATA, and MUST send a SACK as well under certain conditions.

The two requirements are inconsistent to my POV.

-vlad

>>    respond to each received packFrom [email-masked] Wed Dec 06 09:47:17 2006
Date: Wed, 06 Dec 2006 09:46:38 -0500
From: Vlad Yasevich <[email-masked]>
To: Vlad Yasevich <[email-masked]>, tsvwg <[email-masked]>
Subject: Re: [Tsvwg] text inconsistency in draft-ietf-tsvwg-2960bis-02
Cc: 

Hi Brian

> acknowledge data.  So, I don't see the where there is a contradiction.

It's not a contradiction, but an inconsistency in requirements.

Section 6.2 says that an implementation MAY send a SHUTDOWN to acknowledge
DATA.  Section 9.2 says that an implementation MUST send a SHUTDOWN to
acknowledge DATA, and MUST send a SACK as well under certain conditions.

The two requirements are inconsistent to my POV.

-vlad

---

From: "Brian F. G. Bidulock" <[email-masked]>
Date: Wed, 6 Dec 2006 16:46:45 -0700

Vlad,

Vlad Yasevich wrote:                                                 (Wed, 06 Dec 2006 09:46:38)
> acknowledge DATA, and MUST send a SACK as well under certain conditions.

Well not, 9.2 does not say that a SHUTDOWN MUST be sent to acknowledge data,
but that it MUST be sent to shutdown the association.  A SACK can be used
to acknowledge data.  Therefore, 6.2 and 9.2 are consistent (a SHUTDOWN may
acknowledge data).

--brian

-- 
Brian F. G. Bidulock
[email-masked]
http://www.openss7.org/

---

From: Vlad Yasevich <[email-masked]>
Date: Thu, 07 Dec 2006 09:15:35 -0500

> to acknowledge data.  Therefore, 6.2 and 9.2 are consistent (a SHUTDOWN may

Sorry, but that's not how I read the text.  Here is the text from 9.2 again

  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

The above text clearly states that the SHUTDOWN is used to acknowledge data
and if it _can_ acknowledge ALL the data, then SACK is optional. 

On the other hand, Section 6.2 says that SACK is used to acknowledge data
and the the SHUTDOWN MAY be used when the ULP requested a shutdown.

This is inconsistent in the requirements.

I've already sent text that would make 6.2 consistent.

-vlad

---

From: "Brian F. G. Bidulock" <[email-masked]>
Date: Thu, 7 Dec 2006 07:48:13 -0700

Vlad,

Vlad Yasevich wrote:                                                                  (Thu, 07 Dec 2006 09:15:35)
>    SHUTDOWN chunk by itself cannot acknowledge all of the received DATA

No, they both say that a SACK is used to acknowledge data and that a SHUTDOWN
is sent when shutting down.  No inconsistency.

--brian

-- 
Brian F. G. Bidulock
[email-masked]
http://www.openss7.org/

---

From: Vlad Yasevich <[email-masked]>
Date: Thu, 07 Dec 2006 10:06:46 -0500

> is sent when shutting down.  No inconsistency.

No, 9.2 says that a SHUTDOWN is used to acknowledge DATA.  At lease that's how
I read the text.

-vlad

---

From: "Brian F. G. Bidulock" <[email-masked]>
Date: Thu, 7 Dec 2006 08:25:23 -0700

Vlad,

Vlad Yasevich wrote:                                                  (Thu, 07 Dec 2006 10:06:46)
> No, 9.2 says that a SHUTDOWN is used to acknowledge DATA.  At lease that's how

No, both 6.2 and 9.2 say that a SHUTDOWN may be used to acknowledge data,
but a SACK must be used to report gaps or duplications in all situations.
Both sections also say that the SHUTDOWN is sent when the user requests a
shutdown or when in the SHUTDOWN-SENT state and DATA is received.

I think you are misreading that "a SHUTDOWN MUST be sent when shutting down"
as requring that the SHUTDOWN acknowledge data: there is no such requirement
in either 6.2 or 9.2.  A SHUTDOWN chunk need never be used to acknowledge
data: a SACK can always be bundled with it.  The reason for sending the
SHUTDOWN chunk again and again is that it is not immediately acknowledged
and might have been lost, not because it is required to acknowlege any DATA.

--brian

-- 
Brian F. G. Bidulock
[email-masked]
http://www.openss7.org/

---

From: Vlad Yasevich <[email-masked]>
Date: Thu, 07 Dec 2006 10:38:35 -0500

Brian F. G. Bidulock wrote:
> as requring that the SHUTDOWN acknowledge data:

No, that's not the text that I am misreading.

If I am misreading anything, it is the text in 6.2 that says:

   Acknowledegments MUST be sent in SACK chunks unless shutdown was
   requested by the ULP, in which case an endpoint MAY send an
   acknowledgement in the SHUTDOWN chunk. 

I read this to say, that if the ULP requested a shutdown (called close() or
shutdown() on the socket), then the implementation doesn't need to send
a SACK if it choses to use SHUTDOWN to acknowledge DATA.

-vlad

---

From: Lars Eggert <[email-masked]>
Date: Thu, 7 Dec 2006 16:51:43 +0100

> and might have been lost, not because it is required to acknowlege  

If this turns out to clear up the issue, a small wording change to  
the document might be a good idea.

Lars

---

From: Lars Eggert <[email-masked]>
Date: Thu, 7 Dec 2006 17:04:45 +0100

> the document might be a good idea.

OK, so this didn't clear it up. Let me try again.

Whatever turns out to clear up this issue, a corresponding small  
wording change to the document might be a good idea.

Lars

---

From: Vlad Yasevich <[email-masked]>
Date: Thu, 07 Dec 2006 11:11:05 -0500

Lars Eggert wrote:
>> If this turns out to clear up the issue, a small wording change to the
>> document might be a good idea.
> 
> Whatever turns out to clear up this issue, a corresponding small wording
> change to the document might be a good idea.
> 
> Lars
> 

The wording change that would clear this up completely for me would be something
along these lines:

Section 6.2

And remove the Note.

-vlad

---

From: Randall Stewart <[email-masked]>
Date: Mon, 11 Dec 2006 11:02:02 -0500

> a SACK if it choses to use SHUTDOWN to acknowledge DATA.
Vlad:

But you are failing to take into account the next paragraph:

I have to agree with Brian here.. the text is not inconsistent.. if
you read all of it..

a) You always repeate the SHUTDOWN because you don't know
    if the peer got it or not (if it was lost)

b) You CAN use the SHUTDOWN chunk by itself to ack data
    if there are no gap-acks.

c) You MUST add a SACK with a SHUTDOWN if you have gaps since
    the shutdown cannot convey this.

d) You can always have a SHUTDOWN+SACK.. if you want.. even if
    there are no GAPS... and in the case of no gaps its the
    only case I think where it does not matter if the SACK is
    first and then the SHUTDOWN.. or vice-versa...

I don't think the text is inconsistent if you read the whole
thing..

R

-- 
Randall Stewart
803-345-0369 <or> 815-342-5222(cell)

---

From: Randall Stewart <[email-masked]>
Date: Mon, 11 Dec 2006 11:04:29 -0500

>    requested by the ULP, in which case Section 9.2 describes the proper
But that is incorrect...

If the upper layer has requested a shutdown and there are gaps, you
cannot use a SHUTDOWN by itself to ack data.. you need a SACK too.

Yes, you can shortcut and put only a SHUTDOWN in if there are no
gaps.. but that is a side benefit of the SHUTDOWN...

The reason you always retransmit the SHUTDOWN too is not for
the fact that you are trying to ack things.. but to make sure
the last stand-alone SD did not get lost..

R

---

From: Vlad Yasevich <[email-masked]>
Date: Mon, 11 Dec 2006 11:38:16 -0500

> cannot use a SHUTDOWN by itself to ack data.. you need a SACK too.

Well, section 9.2 already addresses this, but I think I am starting to
see what I am misreading... (as I thought I _was_ misreading 6.2).

What section 6.2 appears to be addressing in the " MAY send an acknowledgment
in the SHUTDOWN chunk" text is a race between DATA incoming from
the network and a Shutdown Request coming from ULP.

If this is the case, I withdraw my objection.  Text in 6.2 might
be made a bit more clear, but I have no idea on how to do that... :)

BTW, it seems I wasn't the only one bit by this as I got a "conformance"
test report where someone misread the same text.

> the last stand-alone SD did not get lost..

Hmmm... this reason sounds a heck of lot like retransmit to me, and there
is T2-shutdown timer for that.

Yes, T2-timer gets reset for every packet containing DATA chunks, so if the
original SHUTDOWN is lost, there would be no repeat SHUTDOWN and thus nothing
to stop new data on the peer.  I understand that.

However, the approach of sending a SHUTDOWN (which "may revoke gaps", as you
said in the other mail), just to keep telling the peer that we are shutting down
seems suboptimal.  I understand that it may be too late to change this in
any way...  :(

-vlad