NAME

  InitCwndBeforeTrans.seq - The initial cwnd before DATA transmission MUST be set to min(4*MTU, max (2*MTU, 4380bytes))


PURPOSE

  To check that the initial cwnd before DATA transmission is set to 
  min(4*MTU, max (2*MTU, 4380 bytes)).


SYNOPSIS

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


PRE-TEST CONDITION

  Association not established between endpoint A and B. Also arrange 
  the data in endpoint B such that upper layers send Associate 
  primitive to startup an association with endpoint A.


TEST PROCEDURE

  Endpoint A                            Endpoint B         ULP
  (CLOSED)                              (CLOSED) 
  
                                                   <-----    Associate
  
                  <----------------       INIT
  
  INIT_ACK        ----------------->
  
                  <-----------------     COOKIE-ECHO
  COOKIE_ACK      ------------------> 
                                         Communication Up ---->
  TEST DESCRIPTION:
  1. Check that the initial cwnd before DATA transmission is set to
     min(4*MTU, max (2*MTU, 4380 bytes)).


NOTE

  None


REFERENCE

  RFC 4960
  7.2.1.  Slow-Start
    Beginning data transmission into a network with unknown conditions or
    after a sufficiently long idle period requires SCTP to probe the
    network to determine the available capacity.  The slow-start
    algorithm is used for this purpose at the beginning of a transfer, or
    after repairing loss detected by the retransmission timer.
    o  The initial cwnd before DATA transmission or after a sufficiently
       long idle period MUST be set to min(4*MTU, max (2*MTU, 4380
       bytes)).
    o  The initial cwnd after a retransmission timeout MUST be no more
       than 1*MTU.
    o  The initial value of ssthresh MAY be arbitrarily high (for
       example, implementations MAY use the size of the receiver
       advertised window).
    o  Whenever cwnd is greater than zero, the endpoint is allowed to
       have cwnd bytes of data outstanding on that transport address.
    o  When cwnd is less than or equal to ssthresh, an SCTP endpoint MUST
       use the slow-start algorithm to increase cwnd only if the current
       congestion window is being fully utilized, an incoming SACK
       advances the Cumulative TSN Ack Point, and the data sender is not
       in Fast Recovery.  Only when these three conditions are met can
       the cwnd be increased; otherwise, the cwnd MUST not be increased.
       If these conditions are met, then cwnd MUST be increased by, at
       most, the lesser of 1) the total size of the previously
       outstanding DATA chunk(s) acknowledged, and 2) the destination's
       path MTU.  This upper bound protects against the ACK-Splitting
       attack outlined in [SAVAGE99].
    In instances where its peer endpoint is multi-homed, if an endpoint
    receives a SACK that advances its Cumulative TSN Ack Point, then it
    should update its cwnd (or cwnds) apportioned to the destination
    addresses to which it transmitted the acknowledged data.  However, if
    the received SACK does not advance the Cumulative TSN Ack Point, the
    endpoint MUST NOT adjust the cwnd of any of the destination
    addresses.
    Because an endpoint's cwnd is not tied to its Cumulative TSN Ack
    Point, as duplicate SACKs come in, even though they may not advance
    the Cumulative TSN Ack Point an endpoint can still use them to clock
    out new data.  That is, the data newly acknowledged by the SACK
    diminishes the amount of data now in flight to less than cwnd, and so
    the current, unchanged value of cwnd now allows new data to be sent.
    On the other hand, the increase of cwnd must be tied to the
    Cumulative TSN Ack Point advancement as specified above.  Otherwise,
    the duplicate SACKs will not only clock out new data, but also will
    adversely clock out more new data than what has just left the
    network, during a time of possible congestion.
    o  When the endpoint does not transmit data on a given transport
       address, the cwnd of the transport address should be adjusted to
       max(cwnd/2, 4*MTU) per RTO.