Lines Matching refs:cwnd

394 /* This routine updates the transport's cwnd and partial_bytes_acked
401 __u32 cwnd, ssthresh, flight_size, pba, pmtu;
403 cwnd = transport->cwnd;
415 if (cwnd <= ssthresh) {
417 * o When cwnd is less than or equal to ssthresh, an SCTP
419 * cwnd only if the current congestion window is being fully
422 * Only when these three conditions are met can the cwnd be
423 * increased; otherwise, the cwnd MUST not be increased.
424 * If these conditions are met, then cwnd MUST be increased
433 /* The appropriate cwnd increase algorithm is performed
438 if (flight_size < cwnd)
442 cwnd += pmtu;
444 cwnd += bytes_acked;
447 "cwnd:%d, ssthresh:%d, flight_size:%d, pba:%d\n",
448 __func__, transport, bytes_acked, cwnd, ssthresh,
451 /* RFC 2960 7.2.2 Whenever cwnd is greater than ssthresh,
458 * When partial_bytes_acked is greater than cwnd and
460 * bytes of data outstanding than cwnd (i.e., before
461 * arrival of the SACK, flightsize was less than cwnd),
462 * reset partial_bytes_acked to cwnd. (RFC 4960 Errata
466 * cwnd and before the arrival of the SACK the sender
467 * had cwnd or more bytes of data outstanding (i.e.,
469 * than or equal to cwnd), partial_bytes_acked is reset
470 * to (partial_bytes_acked - cwnd). Next, cwnd is
474 if (pba > cwnd && flight_size < cwnd)
475 pba = cwnd;
476 if (pba >= cwnd && flight_size >= cwnd) {
477 pba = pba - cwnd;
478 cwnd += pmtu;
482 "bytes_acked:%d, cwnd:%d, ssthresh:%d, "
484 transport, bytes_acked, cwnd, ssthresh,
488 transport->cwnd = cwnd;
492 /* This routine is used to lower the transport's cwnd when congestion is
505 * ssthresh = max(cwnd/2, 4*MTU)
506 * cwnd = 1*MTU
509 transport->ssthresh = max(transport->cwnd/2,
511 transport->cwnd = asoc->pathmtu;
518 /* RFC 2960 7.2.4 Adjust the ssthresh and cwnd of the
526 * ssthresh = max(cwnd/2, 4*MTU)
527 * cwnd = ssthresh
537 transport->ssthresh = max(transport->cwnd/2,
539 transport->cwnd = transport->ssthresh;
549 * source halves the congestion window "cwnd" and reduces the
557 transport->ssthresh = max(transport->cwnd/2,
559 transport->cwnd = transport->ssthresh;
567 * transport address, the cwnd of the transport address
568 * should be adjusted to max(cwnd/2, 4*MTU) per RTO.
573 transport->cwnd = max(transport->cwnd/2,
576 transport->ssthresh = transport->cwnd;
582 pr_debug("%s: transport:%p, reason:%d, cwnd:%d, ssthresh:%d\n",
583 __func__, transport, reason, transport->cwnd,
592 * The limit is applied by adjusting cwnd as follows:
593 * if ((flightsize+ Max.Burst * MTU) < cwnd)
594 * cwnd = flightsize + Max.Burst * MTU
600 u32 old_cwnd = t->cwnd;
608 t->cwnd = max_burst_bytes;
613 /* Restore the old cwnd congestion window, after the burst had it's
619 t->cwnd = t->burst_limited;
643 * All the congestion control parameters (e.g., cwnd, ssthresh)
647 t->cwnd = min(4*asoc->pathmtu, max_t(__u32, 2*asoc->pathmtu, 4380));