Lines Matching defs:cwnd

378 /* This routine updates the transport's cwnd and partial_bytes_acked
385 __u32 cwnd, ssthresh, flight_size, pba, pmtu;
387 cwnd = transport->cwnd;
395 /* The appropriate cwnd increase algorithm is performed if, and only
400 (flight_size < cwnd))
407 if (cwnd <= ssthresh) {
409 * o When cwnd is less than or equal to ssthresh, an SCTP
411 * cwnd only if the current congestion window is being fully
414 * Only when these three conditions are met can the cwnd be
415 * increased; otherwise, the cwnd MUST not be increased.
416 * If these conditions are met, then cwnd MUST be increased
426 cwnd += pmtu;
428 cwnd += bytes_acked;
431 "cwnd:%d, ssthresh:%d, flight_size:%d, pba:%d\n",
432 __func__, transport, bytes_acked, cwnd, ssthresh,
435 /* RFC 2960 7.2.2 Whenever cwnd is greater than ssthresh,
442 * When partial_bytes_acked is equal to or greater than cwnd
443 * and before the arrival of the SACK the sender had cwnd or
445 * SACK, flightsize was greater than or equal to cwnd),
446 * increase cwnd by MTU, and reset partial_bytes_acked to
447 * (partial_bytes_acked - cwnd).
450 if (pba >= cwnd) {
451 cwnd += pmtu;
452 pba = ((cwnd < pba) ? (pba - cwnd) : 0);
456 "bytes_acked:%d, cwnd:%d, ssthresh:%d, "
458 transport, bytes_acked, cwnd, ssthresh,
462 transport->cwnd = cwnd;
466 /* This routine is used to lower the transport's cwnd when congestion is
479 * ssthresh = max(cwnd/2, 4*MTU)
480 * cwnd = 1*MTU
483 transport->ssthresh = max(transport->cwnd/2,
485 transport->cwnd = asoc->pathmtu;
492 /* RFC 2960 7.2.4 Adjust the ssthresh and cwnd of the
500 * ssthresh = max(cwnd/2, 4*MTU)
501 * cwnd = ssthresh
511 transport->ssthresh = max(transport->cwnd/2,
513 transport->cwnd = transport->ssthresh;
523 * source halves the congestion window "cwnd" and reduces the
531 transport->ssthresh = max(transport->cwnd/2,
533 transport->cwnd = transport->ssthresh;
541 * transport address, the cwnd of the transport address
542 * should be adjusted to max(cwnd/2, 4*MTU) per RTO.
547 transport->cwnd = max(transport->cwnd/2,
554 pr_debug("%s: transport:%p, reason:%d, cwnd:%d, ssthresh:%d\n",
555 __func__, transport, reason, transport->cwnd,
564 * The limit is applied by adjusting cwnd as follows:
565 * if ((flightsize+ Max.Burst * MTU) < cwnd)
566 * cwnd = flightsize + Max.Burst * MTU
572 u32 old_cwnd = t->cwnd;
580 t->cwnd = max_burst_bytes;
585 /* Restore the old cwnd congestion window, after the burst had it's
591 t->cwnd = t->burst_limited;
615 * All the congestion control parameters (e.g., cwnd, ssthresh)
619 t->cwnd = min(4*asoc->pathmtu, max_t(__u32, 2*asoc->pathmtu, 4380));