Lines Matching refs:cwnd

552 /* This routine updates the transport's cwnd and partial_bytes_acked
559 __u32 cwnd, ssthresh, flight_size, pba, pmtu;
561 cwnd = transport->cwnd;
573 if (cwnd <= ssthresh) {
575 * o When cwnd is less than or equal to ssthresh, an SCTP
577 * cwnd only if the current congestion window is being fully
580 * Only when these three conditions are met can the cwnd be
581 * increased; otherwise, the cwnd MUST not be increased.
582 * If these conditions are met, then cwnd MUST be increased
591 /* The appropriate cwnd increase algorithm is performed
596 if (flight_size < cwnd)
600 cwnd += pmtu;
602 cwnd += bytes_acked;
605 "cwnd:%d, ssthresh:%d, flight_size:%d, pba:%d\n",
606 __func__, transport, bytes_acked, cwnd, ssthresh,
609 /* RFC 2960 7.2.2 Whenever cwnd is greater than ssthresh,
616 * When partial_bytes_acked is greater than cwnd and
618 * bytes of data outstanding than cwnd (i.e., before
619 * arrival of the SACK, flightsize was less than cwnd),
620 * reset partial_bytes_acked to cwnd. (RFC 4960 Errata
624 * cwnd and before the arrival of the SACK the sender
625 * had cwnd or more bytes of data outstanding (i.e.,
627 * than or equal to cwnd), partial_bytes_acked is reset
628 * to (partial_bytes_acked - cwnd). Next, cwnd is
632 if (pba > cwnd && flight_size < cwnd)
633 pba = cwnd;
634 if (pba >= cwnd && flight_size >= cwnd) {
635 pba = pba - cwnd;
636 cwnd += pmtu;
640 "bytes_acked:%d, cwnd:%d, ssthresh:%d, "
642 transport, bytes_acked, cwnd, ssthresh,
646 transport->cwnd = cwnd;
650 /* This routine is used to lower the transport's cwnd when congestion is
663 * ssthresh = max(cwnd/2, 4*MTU)
664 * cwnd = 1*MTU
667 transport->ssthresh = max(transport->cwnd/2,
669 transport->cwnd = asoc->pathmtu;
676 /* RFC 2960 7.2.4 Adjust the ssthresh and cwnd of the
684 * ssthresh = max(cwnd/2, 4*MTU)
685 * cwnd = ssthresh
695 transport->ssthresh = max(transport->cwnd/2,
697 transport->cwnd = transport->ssthresh;
707 * source halves the congestion window "cwnd" and reduces the
715 transport->ssthresh = max(transport->cwnd/2,
717 transport->cwnd = transport->ssthresh;
725 * transport address, the cwnd of the transport address
726 * should be adjusted to max(cwnd/2, 4*MTU) per RTO.
731 transport->cwnd = max(transport->cwnd/2,
734 transport->ssthresh = transport->cwnd;
740 pr_debug("%s: transport:%p, reason:%d, cwnd:%d, ssthresh:%d\n",
741 __func__, transport, reason, transport->cwnd,
750 * The limit is applied by adjusting cwnd as follows:
751 * if ((flightsize+ Max.Burst * MTU) < cwnd)
752 * cwnd = flightsize + Max.Burst * MTU
758 u32 old_cwnd = t->cwnd;
766 t->cwnd = max_burst_bytes;
771 /* Restore the old cwnd congestion window, after the burst had it's
777 t->cwnd = t->burst_limited;
801 * All the congestion control parameters (e.g., cwnd, ssthresh)
805 t->cwnd = min(4*asoc->pathmtu, max_t(__u32, 2*asoc->pathmtu, 4380));