Lines Matching defs:cwnd

59 	    (net->cwnd > assoc->max_cwnd) &&
60 (net->cwnd > (net->mtu - sizeof(struct sctphdr)))) {
61 net->cwnd = assoc->max_cwnd;
62 if (net->cwnd < (net->mtu - sizeof(struct sctphdr))) {
63 net->cwnd = net->mtu - sizeof(struct sctphdr);
78 net->cwnd = min((net->mtu * 4), max((2 * net->mtu), SCTP_INITIAL_CWND));
86 net->cwnd = (net->mtu - sizeof(struct sctphdr)) * cwnd_in_mtu;
91 net->cwnd /= assoc->numnets;
92 if (net->cwnd < (net->mtu - sizeof(struct sctphdr))) {
93 net->cwnd = net->mtu - sizeof(struct sctphdr);
98 SDT_PROBE(sctp, cwnd, net, init,
100 0, net->cwnd);
123 t_cwnd += net->cwnd;
125 t_ucwnd_sbw += (uint64_t) net->cwnd / (uint64_t) net->lastsa;
145 * adjust ssthresh and cwnd.
148 int old_cwnd = net->cwnd;
176 (uint64_t) net->cwnd) /
181 if ((net->cwnd > t_cwnd / 2) &&
182 (net->ssthresh < net->cwnd - t_cwnd / 2)) {
183 net->ssthresh = net->cwnd - t_cwnd / 2;
189 net->ssthresh = net->cwnd / 2;
194 net->cwnd = net->ssthresh;
196 SDT_PROBE(sctp, cwnd, net, fr,
198 old_cwnd, net->cwnd);
200 sctp_log_cwnd(stcb, net, (net->cwnd - old_cwnd),
236 * Mark a peg that we WOULD have done a cwnd
256 probepoint = (((uint64_t) net->cwnd) << 32);
264 SDT_PROBE(sctp, cwnd, net, rttvar,
285 SDT_PROBE(sctp, cwnd, net, rttstep,
291 if (net->cwnd > (4 * net->mtu)) {
292 net->cwnd -= net->mtu;
309 SDT_PROBE(sctp, cwnd, net, rttvar,
321 SDT_PROBE(sctp, cwnd, net, rttstep,
339 net->cc_mod.rtcc.cwnd_at_bw_set = net->cwnd;
352 SDT_PROBE(sctp, cwnd, net, rttvar,
368 if (net->cwnd > (4 * net->mtu)) {
369 net->cwnd -= net->mtu;
392 probepoint = (((uint64_t) net->cwnd) << 32);
396 if ((net->cwnd > net->cc_mod.rtcc.cwnd_at_bw_set) &&
401 SDT_PROBE(sctp, cwnd, net, rttvar,
412 net->ssthresh = net->cwnd - 1;
419 SDT_PROBE(sctp, cwnd, net, rttvar,
432 SDT_PROBE(sctp, cwnd, net, rttstep,
444 net->cwnd += net->mtu;
456 SDT_PROBE(sctp, cwnd, net, rttvar,
468 SDT_PROBE(sctp, cwnd, net, rttstep,
476 net->cwnd += net->mtu;
488 SDT_PROBE(sctp, cwnd, net, rttvar,
500 SDT_PROBE(sctp, cwnd, net, rttstep,
508 net->cwnd += net->mtu;
518 net->cc_mod.rtcc.cwnd_at_bw_set = net->cwnd;
537 probepoint = (((uint64_t) net->cwnd) << 32);
538 SDT_PROBE(sctp, cwnd, net, rttvar,
550 SDT_PROBE(sctp, cwnd, net, rttstep,
562 net->cc_mod.rtcc.cwnd_at_bw_set = net->cwnd;
566 /* RTCC Algoritm to limit growth of cwnd, return
567 * true if you want to NOT allow cwnd growth
582 * to limit cwnd growth due to increase
587 * return 1, then no cc update happens and cwnd
620 probepoint = (((uint64_t) net->cwnd) << 32);
650 SDT_PROBE(sctp, cwnd, net, rttvar,
706 t_cwnd += net->cwnd;
712 t_ucwnd_sbw += (uint64_t) net->cwnd / (uint64_t) srtt;
713 t_path_mptcp += (((uint64_t) net->cwnd) << SHIFT_MPTCP_MULTI_Z) /
715 tmp = (((uint64_t) net->cwnd) << SHIFT_MPTCP_MULTI_N) /
735 /* update cwnd and Early FR */
773 * If we are in loss recovery we skip any cwnd
804 probepoint = (((uint64_t) net->cwnd) << 32);
810 SDT_PROBE(sctp, cwnd, net, rttvar,
825 * CMT: CUC algorithm. Update cwnd if pseudo-cumack has
831 if (net->cwnd <= net->ssthresh) {
833 if (net->flight_size + net->net_ack >= net->cwnd) {
836 old_cwnd = net->cwnd;
864 (uint64_t) net->cwnd) /
868 (uint64_t) net->cwnd) /
903 net->cwnd += incr;
909 SDT_PROBE(sctp, cwnd, net, ack,
913 old_cwnd, net->cwnd);
927 if ((net->flight_size + net->net_ack >= net->cwnd) &&
928 (net->partial_bytes_acked >= net->cwnd)) {
929 net->partial_bytes_acked -= net->cwnd;
930 old_cwnd = net->cwnd;
950 (uint64_t) net->cwnd /
960 (uint64_t) net->cwnd) >>
970 net->cwnd += incr;
972 SDT_PROBE(sctp, cwnd, net, ack,
976 old_cwnd, net->cwnd);
1002 old_cwnd = net->cwnd;
1003 net->cwnd = net->mtu;
1004 SDT_PROBE(sctp, cwnd, net, ack,
1006 old_cwnd, net->cwnd);
1007 SCTPDBG(SCTP_DEBUG_INDATA1, "Destination %p moved from PF to reachable with cwnd %d.\n",
1008 (void *)net, net->cwnd);
1015 int old_cwnd = net->cwnd;
1030 t_cwnd += lnet->cwnd;
1034 t_ucwnd_sbw += (uint64_t) lnet->cwnd / (uint64_t) srtt;
1063 if ((net->cwnd > t_cwnd / 2) &&
1064 (net->ssthresh < net->cwnd - t_cwnd / 2)) {
1065 net->ssthresh = net->cwnd - t_cwnd / 2;
1071 net->ssthresh = max(net->cwnd / 2, 4 * net->mtu);
1073 net->cwnd = net->mtu;
1075 SDT_PROBE(sctp, cwnd, net, to,
1079 old_cwnd, net->cwnd);
1081 sctp_log_cwnd(stcb, net, net->cwnd - old_cwnd, SCTP_CWND_LOG_FROM_RTX);
1089 int old_cwnd = net->cwnd;
1095 * Go to CA with the cwnd at the point we sent the
1098 if (net->ecn_prev_cwnd < net->cwnd) {
1099 /* Restore to prev cwnd */
1100 net->cwnd = net->ecn_prev_cwnd - (net->mtu * num_pkt_lost);
1103 net->cwnd /= 2;
1106 net->ssthresh = net->cwnd - (num_pkt_lost * net->mtu);
1108 sctp_log_cwnd(stcb, net, (net->cwnd - old_cwnd), SCTP_CWND_LOG_FROM_SAT);
1116 net->cwnd -= (net->mtu * num_pkt_lost);
1118 sctp_log_cwnd(stcb, net, (net->cwnd - old_cwnd), SCTP_CWND_LOG_FROM_SAT);
1125 net->ssthresh = net->cwnd / 2;
1134 net->cwnd = net->ssthresh;
1135 SDT_PROBE(sctp, cwnd, net, ecn,
1139 old_cwnd, net->cwnd);
1141 sctp_log_cwnd(stcb, net, (net->cwnd - old_cwnd), SCTP_CWND_LOG_FROM_SAT);
1155 int old_cwnd = net->cwnd;
1193 * undo any cwnd adjustment that the sack might have
1196 net->cwnd = net->prev_cwnd;
1204 if (net->cwnd > net->flight_size) {
1212 diff_adj = net->cwnd - net->flight_size;
1219 * back down to the previous cwnd (assume we have had a sack
1223 net->cwnd -= my_portion;
1226 if (net->cwnd <= net->mtu) {
1227 net->cwnd = net->mtu;
1230 net->ssthresh = net->cwnd - 1;
1241 net->cwnd += incr;
1243 if (net->cwnd > bw_avail) {
1245 net->cwnd = bw_avail;
1247 if (net->cwnd < net->mtu) {
1249 net->cwnd = net->mtu;
1252 if (net->cwnd - old_cwnd != 0) {
1254 SDT_PROBE(sctp, cwnd, net, pd,
1258 old_cwnd, net->cwnd);
1260 sctp_log_cwnd(stcb, net, (net->cwnd - old_cwnd),
1270 int old_cwnd = net->cwnd;
1272 if (net->ssthresh < net->cwnd)
1273 net->ssthresh = net->cwnd;
1275 net->cwnd = (net->flight_size + (burst_limit * net->mtu));
1277 SDT_PROBE(sctp, cwnd, net, bl,
1281 old_cwnd, net->cwnd);
1283 sctp_log_cwnd(stcb, net, (net->cwnd - old_cwnd), SCTP_CWND_LOG_FROM_BRST);
1350 probepoint = (((uint64_t) net->cwnd) << 32);
1353 SDT_PROBE(sctp, cwnd, net, rttvar,
1373 /* less aggressive one - reset cwnd too */
1374 uint32_t cwnd_in_mtu, cwnd;
1382 cwnd = min((net->mtu * 4), max((2 * net->mtu), SCTP_INITIAL_CWND));
1390 cwnd = (net->mtu - sizeof(struct sctphdr)) * cwnd_in_mtu;
1392 if (net->cwnd > cwnd) {
1397 net->cwnd = cwnd;
1411 probepoint = (((uint64_t) net->cwnd) << 32);
1416 SDT_PROBE(sctp, cwnd, net, rttvar,
1528 int32_t cwnd;
1615 int old_cwnd = net->cwnd;
1617 cur_val = net->cwnd >> 10;
1620 if (cur_val < sctp_cwnd_adjust[0].cwnd) {
1623 net->cwnd += net->mtu;
1625 net->cwnd += net->net_ack;
1629 if (cur_val < sctp_cwnd_adjust[i].cwnd) {
1636 net->cwnd += incr;
1640 sctp_log_cwnd(stcb, net, (net->cwnd - old_cwnd), SCTP_CWND_LOG_FROM_SS);
1648 int old_cwnd = net->cwnd;
1650 cur_val = net->cwnd >> 10;
1651 if (cur_val < sctp_cwnd_adjust[0].cwnd) {
1653 net->ssthresh = net->cwnd / 2;
1657 net->cwnd = net->ssthresh;
1660 net->ssthresh = net->cwnd - (int)((net->cwnd / 100) *
1662 net->cwnd = net->ssthresh;
1665 cur_val = net->cwnd >> 10;
1667 if (cur_val < sctp_cwnd_adjust[0].cwnd) {
1672 if (cur_val > sctp_cwnd_adjust[i - 1].cwnd) {
1681 sctp_log_cwnd(stcb, net, (net->cwnd - old_cwnd), SCTP_CWND_LOG_FROM_FR);
1704 * adjust ssthresh and cwnd.
1743 * Mark a peg that we WOULD have done a cwnd
1759 /* update cwnd and Early FR */
1797 * If we are in loss recovery we skip any cwnd
1803 * CMT: CUC algorithm. Update cwnd if pseudo-cumack has
1809 if (net->cwnd <= net->ssthresh) {
1811 if (net->flight_size + net->net_ack >= net->cwnd) {
1822 if ((net->flight_size + net->net_ack >= net->cwnd) &&
1823 (net->partial_bytes_acked >= net->cwnd)) {
1824 net->partial_bytes_acked -= net->cwnd;
1825 net->cwnd += net->mtu;
1895 return (max(net->cwnd, ((net->ssthresh / net->mtu << 7) / net->cc_mod.htcp_ca.beta) * net->mtu));
1937 if ((net->cc_mod.htcp_ca.bytecount >= net->cwnd - (((net->cc_mod.htcp_ca.alpha >> 7) ? (net->cc_mod.htcp_ca.alpha >> 7) : 1) * net->mtu)) &&
2038 return (max(((net->cwnd / net->mtu * net->cc_mod.htcp_ca.beta) >> 7) * net->mtu, 2U * net->mtu));
2049 if (net->cwnd <= net->ssthresh) {
2051 if (net->flight_size + net->net_ack >= net->cwnd) {
2053 net->cwnd += (net->mtu * SCTP_BASE_SYSCTL(sctp_L2_abc_variable));
2059 net->cwnd += net->net_ack;
2077 * net->cwnd += alpha / net->cwnd
2080 if (((net->partial_bytes_acked / net->mtu * net->cc_mod.htcp_ca.alpha) >> 7) * net->mtu >= net->cwnd) {
2082 * Does SCTP have a cwnd clamp?
2085 net->cwnd += net->mtu;
2132 net->cwnd = min((net->mtu * 4), max((2 * net->mtu), SCTP_INITIAL_CWND));
2150 /* update cwnd and Early FR */
2188 * If we are in loss recovery we skip any cwnd
2194 * CMT: CUC algorithm. Update cwnd if pseudo-cumack has
2229 * adjust ssthresh and cwnd.
2232 int old_cwnd = net->cwnd;
2237 net->cwnd = net->ssthresh;
2240 sctp_log_cwnd(stcb, net, (net->cwnd - old_cwnd),
2276 * Mark a peg that we WOULD have done a cwnd
2288 int old_cwnd = net->cwnd;
2293 net->cwnd = net->mtu;
2296 sctp_log_cwnd(stcb, net, net->cwnd - old_cwnd, SCTP_CWND_LOG_FROM_RTX);
2306 old_cwnd = net->cwnd;
2318 net->cwnd = net->ssthresh;
2321 sctp_log_cwnd(stcb, net, (net->cwnd - old_cwnd), SCTP_CWND_LOG_FROM_SAT);