Subject: [Tsvwg] please give me yours feedback.

From: from dillip <[email-masked]>
Date: Thu, 6 Jun 2002 00:50:27 -0700 (PDT)

Dear Sir ! 
   I have some query on SCTP. Please help me regarding
this issue .

   I gone through RFC#2960 for implementing SCTP stack
and found some problem related to Gap-Ack-Ack . I am
writing details of the problem below here and please
reply me back . 

Accoridng to RFC:::
3.3.4 Selective Acknowledgement (SACK) (3):
   Gap Ack Block Start: 16 bits (unsigned integer)

      Indicates the Start offset TSN for this Gap Ack
Block.  To
      calculate the actual TSN number the Cumulative
TSN Ack is added to
      this offset number.  This calculated TSN
identifies the first TSN
      in this Gap Ack Block that has been received.

   Gap Ack Block End:  16 bits (unsigned integer)
   Indicates the End offset TSN for this Gap Ack
Block.  To calculate the actual TSN number the
Cumulative TSN Ack is added to this offset number. 
This calculated TSN identifies the TSN of the last
DATA chunk received in this Gap Ack Block.

Scenario-1>>>>>>>>
------------------
                        ----------
                        | TSN=17 |
                        ----------
                        |        | <- still missing
                        ----------
                        | TSN=15 |
                        ----------
                        | TSN=14 |
                        ----------
                        |        | <- still missing
                        ----------
                        | TSN=12 |
                        ----------
                        | TSN=11 |
                        ----------
                        | TSN=10 |
                        ----------

   then, the parameter part of the SACK MUST be
constructed as follows (assuming the new a_rwnd is set
to 4660 by the sender):

                  +--------------------------------+
                  |   Cumulative TSN Ack = 12      |
                  +--------------------------------+
                  |        a_rwnd = 4660           |
                  +----------------+---------------+
                  | num of block=2 | num of dup=0  |
                  +----------------+---------------+
                  |block #1 strt=2 |block #1 end=3 |
                  +----------------+---------------+
                  |block #2 strt=5 |block #2 end=5 |
                  +----------------+---------------+

	Here the actual TSN number should calculated by :::
		actual_tsn = cumulative_tsn + offset_number ;
	If this is correct then for the above scenario result
will be :::
                  +--------------------------------+
                  |   Cumulative TSN Ack = 12      |
                  +--------------------------------+
                  |        a_rwnd = 4660           |
                  +----------------+---------------+
                  | num of block=2 | num of dup=0  |
                  +----------------+---------------+
                  |block #1 strt=1 |block #1 end=1 |
                  +----------------+---------------+
                  |block #2 strt=4 |block #2 end=4 |
                  +----------------+---------------+
		
Scenario-2>>>>>>>>
------------------
	If the scenario looks::::::::::::::
                        ----------
                        | TSN=17 |
                        ----------
                        |        | <- still missing
                        ----------
                        | TSN=15 |
                        ----------
                        | 	   |
                        ----------
                        |        | <- still missing
                        ----------
                        | TSN=12 |
                        ----------
                        | TSN=11 |
                        ----------
	If this is correct then for the above scenario result
will be :::
                  +--------------------------------+
                  |   Cumulative TSN Ack = 12      |
                  +--------------------------------+
                  |        a_rwnd = 4660           |
                  +----------------+---------------+
                  | num of block=2 | num of dup=0  |
                  +----------------+---------------+
                  |block #1 strt=1 |block #1 end=2 |
                  +----------------+---------------+
                  |block #2 strt=4 |block #2 end=4 |
                  +----------------+---------------+

	Is it correct or I need to folow some other algorithm
to calculate the gaps ??

Regards , 
Dillip

=====
regards , 
DP 
Alliance Computer Telephony Inc .
Tel +91 6784 30418  (O)
    +91 6782 365252 (R)

__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

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

---

From: Randall Stewart <[email-masked]>
Date: Fri, 07 Jun 2002 11:53:34 -0500

DP:

As I said to you in private... comments below..

> DATA chunk received in this Gap Ack Block.

The above SACK is correct... it is what would appear on the wire..

>         If this is correct then for the above scenario result

I have NO idea what the aboe is... it IS NOT what is on the wire... but
instead the conclusion of what one receiving the above SACK would reach.

The key to remember is we send gaps showing what we have RECEIVED not
what is missing.. the reciever of the SACK must figure out what is
missing..

> Scenario-2>>>>>>>>

The ABOVE IS INCORRECT... it is NOT what would be on the wire... 

>         Is it correct or I need to folow some other algorithm

For the receiver of data .. yes you MUST use an algorithm to
calculate what to send in the SACK. The algorithm I used
in both the user space ref impl or the kernel space ref impl
available at:

http://www.sctp.org

is I take a bit (or byte) array with a array offset TSN number

So to find out if a TSN is received you take the base TSN of the
array subtract it from the TSN you wish to check... go to that
bit and see if it is a one or a zero... Note in the user
space implemention I burned more memory and did this on a byte basis...

I am sure there are other methods as well...

R

-- 
Randall R. Stewart
[email-masked] 815-342-5222 (cell phone)