NAME

  MS_MixA2B1A1B2.seq - Multi-Stream Ordered Data chunks are received for Re-order(A2->B1->A1->B2)


PURPOSE

  To check that if DATA chunks arrive out of order of their stream
  sequence number, the endpoint MUST hold the received DATA chunks
  from delivery to the ULP until they are re-ordered.


SYNOPSIS

  ./MS_MixA2B1A1B2.seq [-tooloption ...] -pkt ./MS_Segment.def
    -tooloption : v6eval tool option
  See Also: ../common/STD_PKT_COMMON.def
            ../common/SCTP_COMMON.def


PRE-TEST CONDITION

  Association is established between endpoint A and B. Arrange data 
  in endpoint A such that multi-stream and ordered DATA messages are
  sent to endpoint B.


TEST PROCEDURE

  Endpoint A                           Endpoint B                ULP
  (ESTABLISHED)                        (ESTABLISHED)
  DATA A2      ---------------->
  [Strm=0, Seq=1]
               <----------------        SACK
  DATA B1      ---------------->
  [Strm=1, Seq=0]
               <----------------        SACK
                                        DATA B1 Arrive       ----->
               <----------------        DATA R3 (ECHO of B1)
  SACK         ---------------->
  DATA A1      ---------------->
  [Strm=0, Seq=0]
               <----------------        SACK
                                        DATA A1, A2 Arrive       ----->
               <----------------        DATA R1 (ECHO of A1)
  SACK         ---------------->
               <----------------        DATA R2 (ECHO of A2)
  SACK         ---------------->
  DATA B2      ---------------->
  [Strm=1, Seq=1]
               <----------------        SACK
                                        DATA B2 Arrive       ----->
               <----------------        DATA R4 (ECHO of B2)
  SACK         ---------------->
  TEST DESCRIPTION:
  1. Send DATA A2 from endpoint A to B with Strm=0 and Seq=1.
  2. Check A: DATA A2 is not delivered to the ULP.
  3. Send DATA B1 from endpoint A to B with Strm=0 and Seq=0.
  4. Check B: DATA B1 is delivered to the ULP and be send back.
  5. Send DATA A1 from endpoint A to B with Strm=0 and Seq=0.
  6. Check C: DATA A1 and A2 is delivered to the ULP and be send back.
  7. Send DATA B2 from endpoint A to B with Strm=0 and Seq=1.
  8. Check D: DATA B2 is delivered to the ULP and be send back.


NOTE

  None


REFERENCE

  RFC 4960
  6.6.  Ordered and Unordered Delivery
    Within a stream, an endpoint MUST deliver DATA chunks received with
    the U flag set to 0 to the upper layer according to the order of
    their Stream Sequence Number.  If DATA chunks arrive out of order of
    their Stream Sequence Number, the endpoint MUST hold the received
    DATA chunks from delivery to the ULP until they are reordered.
    However, an SCTP endpoint can indicate that no ordered delivery is
    required for a particular DATA chunk transmitted within the stream by
    setting the U flag of the DATA chunk to 1.