Lines Matching refs:cwnd

64 	    (net->cwnd > assoc->max_cwnd) &&  in sctp_enforce_cwnd_limit()
65 (net->cwnd > (net->mtu - sizeof(struct sctphdr)))) { in sctp_enforce_cwnd_limit()
66 net->cwnd = assoc->max_cwnd; in sctp_enforce_cwnd_limit()
67 if (net->cwnd < (net->mtu - sizeof(struct sctphdr))) { in sctp_enforce_cwnd_limit()
68 net->cwnd = net->mtu - sizeof(struct sctphdr); in sctp_enforce_cwnd_limit()
83 net->cwnd = min((net->mtu * 4), max((2 * net->mtu), SCTP_INITIAL_CWND)); in sctp_set_initial_cc_param()
91 net->cwnd = (net->mtu - sizeof(struct sctphdr)) * cwnd_in_mtu; in sctp_set_initial_cc_param()
96 net->cwnd /= assoc->numnets; in sctp_set_initial_cc_param()
97 if (net->cwnd < (net->mtu - sizeof(struct sctphdr))) { in sctp_set_initial_cc_param()
98 net->cwnd = net->mtu - sizeof(struct sctphdr); in sctp_set_initial_cc_param()
103 SDT_PROBE5(sctp, cwnd, net, init, in sctp_set_initial_cc_param()
105 0, net->cwnd); in sctp_set_initial_cc_param()
128 t_cwnd += net->cwnd; in sctp_cwnd_update_after_fr()
130 t_ucwnd_sbw += (uint64_t)net->cwnd / (uint64_t)net->lastsa; in sctp_cwnd_update_after_fr()
154 int old_cwnd = net->cwnd; in sctp_cwnd_update_after_fr()
181 (uint64_t)net->cwnd) / in sctp_cwnd_update_after_fr()
186 if ((net->cwnd > t_cwnd / 2) && in sctp_cwnd_update_after_fr()
187 (net->ssthresh < net->cwnd - t_cwnd / 2)) { in sctp_cwnd_update_after_fr()
188 net->ssthresh = net->cwnd - t_cwnd / 2; in sctp_cwnd_update_after_fr()
194 net->ssthresh = net->cwnd / 2; in sctp_cwnd_update_after_fr()
199 net->cwnd = net->ssthresh; in sctp_cwnd_update_after_fr()
201 SDT_PROBE5(sctp, cwnd, net, fr, in sctp_cwnd_update_after_fr()
203 old_cwnd, net->cwnd); in sctp_cwnd_update_after_fr()
205 sctp_log_cwnd(stcb, net, (net->cwnd - old_cwnd), in sctp_cwnd_update_after_fr()
260 probepoint = (((uint64_t)net->cwnd) << 32); in cc_bw_same()
268 SDT_PROBE5(sctp, cwnd, net, rttvar, in cc_bw_same()
289 SDT_PROBE5(sctp, cwnd, net, rttstep, in cc_bw_same()
295 if (net->cwnd > (4 * net->mtu)) { in cc_bw_same()
296 net->cwnd -= net->mtu; in cc_bw_same()
313 SDT_PROBE5(sctp, cwnd, net, rttvar, in cc_bw_same()
325 SDT_PROBE5(sctp, cwnd, net, rttstep, in cc_bw_same()
343 net->cc_mod.rtcc.cwnd_at_bw_set = net->cwnd; in cc_bw_same()
356 SDT_PROBE5(sctp, cwnd, net, rttvar, in cc_bw_same()
372 if (net->cwnd > (4 * net->mtu)) { in cc_bw_same()
373 net->cwnd -= net->mtu; in cc_bw_same()
396 probepoint = (((uint64_t)net->cwnd) << 32); in cc_bw_decrease()
400 if ((net->cwnd > net->cc_mod.rtcc.cwnd_at_bw_set) && in cc_bw_decrease()
405 SDT_PROBE5(sctp, cwnd, net, rttvar, in cc_bw_decrease()
416 net->ssthresh = net->cwnd - 1; in cc_bw_decrease()
423 SDT_PROBE5(sctp, cwnd, net, rttvar, in cc_bw_decrease()
436 SDT_PROBE5(sctp, cwnd, net, rttstep, in cc_bw_decrease()
448 net->cwnd += net->mtu; in cc_bw_decrease()
460 SDT_PROBE5(sctp, cwnd, net, rttvar, in cc_bw_decrease()
472 SDT_PROBE5(sctp, cwnd, net, rttstep, in cc_bw_decrease()
480 net->cwnd += net->mtu; in cc_bw_decrease()
492 SDT_PROBE5(sctp, cwnd, net, rttvar, in cc_bw_decrease()
504 SDT_PROBE5(sctp, cwnd, net, rttstep, in cc_bw_decrease()
512 net->cwnd += net->mtu; in cc_bw_decrease()
522 net->cc_mod.rtcc.cwnd_at_bw_set = net->cwnd; in cc_bw_decrease()
541 probepoint = (((uint64_t)net->cwnd) << 32); in cc_bw_increase()
542 SDT_PROBE5(sctp, cwnd, net, rttvar, in cc_bw_increase()
554 SDT_PROBE5(sctp, cwnd, net, rttstep, in cc_bw_increase()
566 net->cc_mod.rtcc.cwnd_at_bw_set = net->cwnd; in cc_bw_increase()
624 probepoint = (((uint64_t)net->cwnd) << 32); in cc_bw_limit()
654 SDT_PROBE5(sctp, cwnd, net, rttvar, in cc_bw_limit()
714 t_ucwnd_sbw += (uint64_t)net->cwnd / (uint64_t)srtt; in sctp_cwnd_update_after_sack_common()
715 t_path_mptcp += (((uint64_t)net->cwnd) << SHIFT_MPTCP_MULTI_Z) / in sctp_cwnd_update_after_sack_common()
717 tmp = (((uint64_t)net->cwnd) << SHIFT_MPTCP_MULTI_N) / in sctp_cwnd_update_after_sack_common()
805 probepoint = (((uint64_t)net->cwnd) << 32); in sctp_cwnd_update_after_sack_common()
811 SDT_PROBE5(sctp, cwnd, net, rttvar, in sctp_cwnd_update_after_sack_common()
832 if (net->cwnd <= net->ssthresh) { in sctp_cwnd_update_after_sack_common()
834 if (net->flight_size + net->net_ack >= net->cwnd) { in sctp_cwnd_update_after_sack_common()
837 old_cwnd = net->cwnd; in sctp_cwnd_update_after_sack_common()
865 (uint64_t)net->cwnd) / in sctp_cwnd_update_after_sack_common()
869 (uint64_t)net->cwnd) / in sctp_cwnd_update_after_sack_common()
904 net->cwnd += incr; in sctp_cwnd_update_after_sack_common()
910 SDT_PROBE5(sctp, cwnd, net, ack, in sctp_cwnd_update_after_sack_common()
914 old_cwnd, net->cwnd); in sctp_cwnd_update_after_sack_common()
928 if ((net->flight_size + net->net_ack >= net->cwnd) && in sctp_cwnd_update_after_sack_common()
929 (net->partial_bytes_acked >= net->cwnd)) { in sctp_cwnd_update_after_sack_common()
930 net->partial_bytes_acked -= net->cwnd; in sctp_cwnd_update_after_sack_common()
931 old_cwnd = net->cwnd; in sctp_cwnd_update_after_sack_common()
951 (uint64_t)net->cwnd / in sctp_cwnd_update_after_sack_common()
961 (uint64_t)net->cwnd) >> in sctp_cwnd_update_after_sack_common()
971 net->cwnd += incr; in sctp_cwnd_update_after_sack_common()
973 SDT_PROBE5(sctp, cwnd, net, ack, in sctp_cwnd_update_after_sack_common()
977 old_cwnd, net->cwnd); in sctp_cwnd_update_after_sack_common()
1003 old_cwnd = net->cwnd; in sctp_cwnd_update_exit_pf_common()
1004 net->cwnd = net->mtu; in sctp_cwnd_update_exit_pf_common()
1005 SDT_PROBE5(sctp, cwnd, net, ack, in sctp_cwnd_update_exit_pf_common()
1007 old_cwnd, net->cwnd); in sctp_cwnd_update_exit_pf_common()
1009 (void *)net, net->cwnd); in sctp_cwnd_update_exit_pf_common()
1015 int old_cwnd = net->cwnd; in sctp_cwnd_update_after_timeout()
1030 t_cwnd += lnet->cwnd; in sctp_cwnd_update_after_timeout()
1034 t_ucwnd_sbw += (uint64_t)lnet->cwnd / (uint64_t)srtt; in sctp_cwnd_update_after_timeout()
1063 if ((net->cwnd > t_cwnd / 2) && in sctp_cwnd_update_after_timeout()
1064 (net->ssthresh < net->cwnd - t_cwnd / 2)) { in sctp_cwnd_update_after_timeout()
1065 net->ssthresh = net->cwnd - t_cwnd / 2; in sctp_cwnd_update_after_timeout()
1071 net->ssthresh = max(net->cwnd / 2, 4 * net->mtu); in sctp_cwnd_update_after_timeout()
1073 net->cwnd = net->mtu; in sctp_cwnd_update_after_timeout()
1075 SDT_PROBE5(sctp, cwnd, net, to, in sctp_cwnd_update_after_timeout()
1079 old_cwnd, net->cwnd); in sctp_cwnd_update_after_timeout()
1081 sctp_log_cwnd(stcb, net, net->cwnd - old_cwnd, SCTP_CWND_LOG_FROM_RTX); in sctp_cwnd_update_after_timeout()
1089 int old_cwnd = net->cwnd; in sctp_cwnd_update_after_ecn_echo_common()
1098 if (net->ecn_prev_cwnd < net->cwnd) { in sctp_cwnd_update_after_ecn_echo_common()
1100 net->cwnd = net->ecn_prev_cwnd - (net->mtu * num_pkt_lost); in sctp_cwnd_update_after_ecn_echo_common()
1103 net->cwnd /= 2; in sctp_cwnd_update_after_ecn_echo_common()
1106 net->ssthresh = net->cwnd - (num_pkt_lost * net->mtu); in sctp_cwnd_update_after_ecn_echo_common()
1108 sctp_log_cwnd(stcb, net, (net->cwnd - old_cwnd), SCTP_CWND_LOG_FROM_SAT); in sctp_cwnd_update_after_ecn_echo_common()
1116 net->cwnd -= (net->mtu * num_pkt_lost); in sctp_cwnd_update_after_ecn_echo_common()
1118 sctp_log_cwnd(stcb, net, (net->cwnd - old_cwnd), SCTP_CWND_LOG_FROM_SAT); in sctp_cwnd_update_after_ecn_echo_common()
1125 net->ssthresh = net->cwnd / 2; in sctp_cwnd_update_after_ecn_echo_common()
1134 net->cwnd = net->ssthresh; in sctp_cwnd_update_after_ecn_echo_common()
1135 SDT_PROBE5(sctp, cwnd, net, ecn, in sctp_cwnd_update_after_ecn_echo_common()
1139 old_cwnd, net->cwnd); in sctp_cwnd_update_after_ecn_echo_common()
1141 sctp_log_cwnd(stcb, net, (net->cwnd - old_cwnd), SCTP_CWND_LOG_FROM_SAT); in sctp_cwnd_update_after_ecn_echo_common()
1155 int old_cwnd = net->cwnd; in sctp_cwnd_update_after_packet_dropped()
1196 net->cwnd = net->prev_cwnd; in sctp_cwnd_update_after_packet_dropped()
1204 if (net->cwnd > net->flight_size) { in sctp_cwnd_update_after_packet_dropped()
1212 diff_adj = net->cwnd - net->flight_size; in sctp_cwnd_update_after_packet_dropped()
1223 net->cwnd -= my_portion; in sctp_cwnd_update_after_packet_dropped()
1226 if (net->cwnd <= net->mtu) { in sctp_cwnd_update_after_packet_dropped()
1227 net->cwnd = net->mtu; in sctp_cwnd_update_after_packet_dropped()
1230 net->ssthresh = net->cwnd - 1; in sctp_cwnd_update_after_packet_dropped()
1241 net->cwnd += incr; in sctp_cwnd_update_after_packet_dropped()
1243 if (net->cwnd > bw_avail) { in sctp_cwnd_update_after_packet_dropped()
1245 net->cwnd = bw_avail; in sctp_cwnd_update_after_packet_dropped()
1247 if (net->cwnd < net->mtu) { in sctp_cwnd_update_after_packet_dropped()
1249 net->cwnd = net->mtu; in sctp_cwnd_update_after_packet_dropped()
1252 if (net->cwnd - old_cwnd != 0) { in sctp_cwnd_update_after_packet_dropped()
1254 SDT_PROBE5(sctp, cwnd, net, pd, in sctp_cwnd_update_after_packet_dropped()
1258 old_cwnd, net->cwnd); in sctp_cwnd_update_after_packet_dropped()
1260 sctp_log_cwnd(stcb, net, (net->cwnd - old_cwnd), in sctp_cwnd_update_after_packet_dropped()
1270 int old_cwnd = net->cwnd; in sctp_cwnd_update_after_output()
1272 if (net->ssthresh < net->cwnd) in sctp_cwnd_update_after_output()
1273 net->ssthresh = net->cwnd; in sctp_cwnd_update_after_output()
1275 net->cwnd = (net->flight_size + (burst_limit * net->mtu)); in sctp_cwnd_update_after_output()
1277 SDT_PROBE5(sctp, cwnd, net, bl, in sctp_cwnd_update_after_output()
1281 old_cwnd, net->cwnd); in sctp_cwnd_update_after_output()
1283 sctp_log_cwnd(stcb, net, (net->cwnd - old_cwnd), SCTP_CWND_LOG_FROM_BRST); in sctp_cwnd_update_after_output()
1348 probepoint = (((uint64_t)net->cwnd) << 32); in sctp_cwnd_new_rtcc_transmission_begins()
1351 SDT_PROBE5(sctp, cwnd, net, rttvar, in sctp_cwnd_new_rtcc_transmission_begins()
1372 uint32_t cwnd_in_mtu, cwnd; in sctp_cwnd_new_rtcc_transmission_begins() local
1380 cwnd = min((net->mtu * 4), max((2 * net->mtu), SCTP_INITIAL_CWND)); in sctp_cwnd_new_rtcc_transmission_begins()
1388 cwnd = (net->mtu - sizeof(struct sctphdr)) * cwnd_in_mtu; in sctp_cwnd_new_rtcc_transmission_begins()
1390 if (net->cwnd > cwnd) { in sctp_cwnd_new_rtcc_transmission_begins()
1395 net->cwnd = cwnd; in sctp_cwnd_new_rtcc_transmission_begins()
1409 probepoint = (((uint64_t)net->cwnd) << 32); in sctp_set_rtcc_initial_cc_param()
1414 SDT_PROBE5(sctp, cwnd, net, rttvar, in sctp_set_rtcc_initial_cc_param()
1524 int32_t cwnd; member
1611 int old_cwnd = net->cwnd; in sctp_hs_cwnd_increase()
1613 cur_val = net->cwnd >> 10; in sctp_hs_cwnd_increase()
1616 if (cur_val < sctp_cwnd_adjust[0].cwnd) { in sctp_hs_cwnd_increase()
1619 net->cwnd += net->mtu; in sctp_hs_cwnd_increase()
1621 net->cwnd += net->net_ack; in sctp_hs_cwnd_increase()
1625 if (cur_val < sctp_cwnd_adjust[i].cwnd) { in sctp_hs_cwnd_increase()
1632 net->cwnd += incr; in sctp_hs_cwnd_increase()
1636 sctp_log_cwnd(stcb, net, (net->cwnd - old_cwnd), SCTP_CWND_LOG_FROM_SS); in sctp_hs_cwnd_increase()
1644 int old_cwnd = net->cwnd; in sctp_hs_cwnd_decrease()
1646 cur_val = net->cwnd >> 10; in sctp_hs_cwnd_decrease()
1647 if (cur_val < sctp_cwnd_adjust[0].cwnd) { in sctp_hs_cwnd_decrease()
1649 net->ssthresh = net->cwnd / 2; in sctp_hs_cwnd_decrease()
1653 net->cwnd = net->ssthresh; in sctp_hs_cwnd_decrease()
1656 net->ssthresh = net->cwnd - (int)((net->cwnd / 100) * in sctp_hs_cwnd_decrease()
1658 net->cwnd = net->ssthresh; in sctp_hs_cwnd_decrease()
1661 cur_val = net->cwnd >> 10; in sctp_hs_cwnd_decrease()
1663 if (cur_val < sctp_cwnd_adjust[0].cwnd) { in sctp_hs_cwnd_decrease()
1668 if (cur_val > sctp_cwnd_adjust[i - 1].cwnd) { in sctp_hs_cwnd_decrease()
1677 sctp_log_cwnd(stcb, net, (net->cwnd - old_cwnd), SCTP_CWND_LOG_FROM_FR); in sctp_hs_cwnd_decrease()
1804 if (net->cwnd <= net->ssthresh) { in sctp_hs_cwnd_update_after_sack()
1806 if (net->flight_size + net->net_ack >= net->cwnd) { in sctp_hs_cwnd_update_after_sack()
1817 if ((net->flight_size + net->net_ack >= net->cwnd) && in sctp_hs_cwnd_update_after_sack()
1818 (net->partial_bytes_acked >= net->cwnd)) { in sctp_hs_cwnd_update_after_sack()
1819 net->partial_bytes_acked -= net->cwnd; in sctp_hs_cwnd_update_after_sack()
1820 net->cwnd += net->mtu; in sctp_hs_cwnd_update_after_sack()
1888 return (max(net->cwnd, ((net->ssthresh / net->mtu << 7) / net->cc_mod.htcp_ca.beta) * net->mtu)); in htcp_cwnd_undo()
1931 …if ((net->cc_mod.htcp_ca.bytecount >= net->cwnd - (((net->cc_mod.htcp_ca.alpha >> 7) ? (net->cc_mo… in measure_achieved_throughput()
2035 return (max(((net->cwnd / net->mtu * net->cc_mod.htcp_ca.beta) >> 7) * net->mtu, 2U * net->mtu)); in htcp_recalc_ssthresh()
2046 if (net->cwnd <= net->ssthresh) { in htcp_cong_avoid()
2048 if (net->flight_size + net->net_ack >= net->cwnd) { in htcp_cong_avoid()
2050 net->cwnd += (net->mtu * SCTP_BASE_SYSCTL(sctp_L2_abc_variable)); in htcp_cong_avoid()
2057 net->cwnd += net->net_ack; in htcp_cong_avoid()
2078 …((net->partial_bytes_acked / net->mtu * net->cc_mod.htcp_ca.alpha) >> 7) * net->mtu >= net->cwnd) { in htcp_cong_avoid()
2083 net->cwnd += net->mtu; in htcp_cong_avoid()
2129 net->cwnd = min((net->mtu * 4), max((2 * net->mtu), SCTP_INITIAL_CWND)); in sctp_htcp_set_initial_cc_param()
2228 int old_cwnd = net->cwnd; in sctp_htcp_cwnd_update_after_fr()
2233 net->cwnd = net->ssthresh; in sctp_htcp_cwnd_update_after_fr()
2236 sctp_log_cwnd(stcb, net, (net->cwnd - old_cwnd), in sctp_htcp_cwnd_update_after_fr()
2284 int old_cwnd = net->cwnd; in sctp_htcp_cwnd_update_after_timeout()
2289 net->cwnd = net->mtu; in sctp_htcp_cwnd_update_after_timeout()
2292 sctp_log_cwnd(stcb, net, net->cwnd - old_cwnd, SCTP_CWND_LOG_FROM_RTX); in sctp_htcp_cwnd_update_after_timeout()
2302 old_cwnd = net->cwnd; in sctp_htcp_cwnd_update_after_ecn_echo()
2314 net->cwnd = net->ssthresh; in sctp_htcp_cwnd_update_after_ecn_echo()
2317 sctp_log_cwnd(stcb, net, (net->cwnd - old_cwnd), SCTP_CWND_LOG_FROM_SAT); in sctp_htcp_cwnd_update_after_ecn_echo()