/Linux-v5.10/net/ipv4/ |
D | tcp_yeah.c | 74 tcp_cong_avoid_ai(tp, min(tp->snd_cwnd, TCP_SCALABLE_AI_CNT), in tcp_yeah_cong_avoid() 78 tcp_cong_avoid_ai(tp, tp->snd_cwnd, acked); in tcp_yeah_cong_avoid() 133 bw = tp->snd_cwnd; in tcp_yeah_cong_avoid() 141 tp->snd_cwnd > yeah->reno_count) { in tcp_yeah_cong_avoid() 143 tp->snd_cwnd >> TCP_YEAH_EPSILON); in tcp_yeah_cong_avoid() 145 tp->snd_cwnd -= reduction; in tcp_yeah_cong_avoid() 147 tp->snd_cwnd = max(tp->snd_cwnd, in tcp_yeah_cong_avoid() 150 tp->snd_ssthresh = tp->snd_cwnd; in tcp_yeah_cong_avoid() 154 yeah->reno_count = max(tp->snd_cwnd>>1, 2U); in tcp_yeah_cong_avoid() 179 yeah->vegas.beg_snd_cwnd = tp->snd_cwnd; in tcp_yeah_cong_avoid() [all …]
|
D | tcp_highspeed.c | 130 if (tp->snd_cwnd > hstcp_aimd_vals[ca->ai].cwnd) { in hstcp_cong_avoid() 131 while (tp->snd_cwnd > hstcp_aimd_vals[ca->ai].cwnd && in hstcp_cong_avoid() 134 } else if (ca->ai && tp->snd_cwnd <= hstcp_aimd_vals[ca->ai-1].cwnd) { in hstcp_cong_avoid() 135 while (ca->ai && tp->snd_cwnd <= hstcp_aimd_vals[ca->ai-1].cwnd) in hstcp_cong_avoid() 140 if (tp->snd_cwnd < tp->snd_cwnd_clamp) { in hstcp_cong_avoid() 143 if (tp->snd_cwnd_cnt >= tp->snd_cwnd) { in hstcp_cong_avoid() 144 tp->snd_cwnd_cnt -= tp->snd_cwnd; in hstcp_cong_avoid() 145 tp->snd_cwnd++; in hstcp_cong_avoid() 157 return max(tp->snd_cwnd - ((tp->snd_cwnd * hstcp_aimd_vals[ca->ai].md) >> 8), 2U); in hstcp_ssthresh()
|
D | tcp_veno.c | 149 target_cwnd = (u64)tp->snd_cwnd * veno->basertt; in tcp_veno_cong_avoid() 153 veno->diff = (tp->snd_cwnd << V_PARAM_SHIFT) - target_cwnd; in tcp_veno_cong_avoid() 167 tcp_cong_avoid_ai(tp, tp->snd_cwnd, acked); in tcp_veno_cong_avoid() 172 if (tp->snd_cwnd_cnt >= tp->snd_cwnd) { in tcp_veno_cong_avoid() 174 tp->snd_cwnd < tp->snd_cwnd_clamp) { in tcp_veno_cong_avoid() 175 tp->snd_cwnd++; in tcp_veno_cong_avoid() 184 if (tp->snd_cwnd < 2) in tcp_veno_cong_avoid() 185 tp->snd_cwnd = 2; in tcp_veno_cong_avoid() 186 else if (tp->snd_cwnd > tp->snd_cwnd_clamp) in tcp_veno_cong_avoid() 187 tp->snd_cwnd = tp->snd_cwnd_clamp; in tcp_veno_cong_avoid() [all …]
|
D | tcp_hybla.c | 57 tp->snd_cwnd = 2; in hybla_init() 65 tp->snd_cwnd = ca->rho; in hybla_init() 140 increment = ca->rho2_7ls / tp->snd_cwnd; in hybla_cong_avoid() 146 tp->snd_cwnd += increment >> 7; in hybla_cong_avoid() 151 tp->snd_cwnd++; in hybla_cong_avoid() 156 if (increment == 0 && odd == 0 && tp->snd_cwnd_cnt >= tp->snd_cwnd) { in hybla_cong_avoid() 157 tp->snd_cwnd++; in hybla_cong_avoid() 162 tp->snd_cwnd = min(tp->snd_cwnd, tp->snd_ssthresh); in hybla_cong_avoid() 164 tp->snd_cwnd = min_t(u32, tp->snd_cwnd, tp->snd_cwnd_clamp); in hybla_cong_avoid()
|
D | tcp_vegas.c | 162 return min(tp->snd_ssthresh, tp->snd_cwnd); in tcp_vegas_ssthresh() 220 target_cwnd = (u64)tp->snd_cwnd * vegas->baseRTT; in tcp_vegas_cong_avoid() 227 diff = tp->snd_cwnd * (rtt-vegas->baseRTT) / vegas->baseRTT; in tcp_vegas_cong_avoid() 241 tp->snd_cwnd = min(tp->snd_cwnd, (u32)target_cwnd+1); in tcp_vegas_cong_avoid() 257 tp->snd_cwnd--; in tcp_vegas_cong_avoid() 264 tp->snd_cwnd++; in tcp_vegas_cong_avoid() 272 if (tp->snd_cwnd < 2) in tcp_vegas_cong_avoid() 273 tp->snd_cwnd = 2; in tcp_vegas_cong_avoid() 274 else if (tp->snd_cwnd > tp->snd_cwnd_clamp) in tcp_vegas_cong_avoid() 275 tp->snd_cwnd = tp->snd_cwnd_clamp; in tcp_vegas_cong_avoid()
|
D | tcp_cdg.c | 164 tp->snd_cwnd); in tcp_cdg_hystart_update() 165 tp->snd_ssthresh = tp->snd_cwnd; in tcp_cdg_hystart_update() 183 tp->snd_cwnd); in tcp_cdg_hystart_update() 184 tp->snd_ssthresh = tp->snd_cwnd; in tcp_cdg_hystart_update() 255 ca->shadow_wnd = max(ca->shadow_wnd, tp->snd_cwnd); in tcp_cdg_backoff() 288 ca->shadow_wnd = min(ca->shadow_wnd, tp->snd_cwnd); in tcp_cdg_cong_avoid() 292 prior_snd_cwnd = tp->snd_cwnd; in tcp_cdg_cong_avoid() 295 incr = tp->snd_cwnd - prior_snd_cwnd; in tcp_cdg_cong_avoid() 334 return max(2U, (tp->snd_cwnd * min(1024U, backoff_beta)) >> 10); in tcp_cdg_ssthresh() 337 return tp->snd_cwnd; in tcp_cdg_ssthresh() [all …]
|
D | tcp_nv.c | 201 cnt = tp->snd_cwnd << -ca->cwnd_growth_factor; in tcpnv_cong_avoid() 204 cnt = max(4U, tp->snd_cwnd >> ca->cwnd_growth_factor); in tcpnv_cong_avoid() 213 return max((tp->snd_cwnd * nv_loss_dec_factor) >> 10, 2U); in tcpnv_recalc_ssthresh() 261 if (ca->nv_catchup && tp->snd_cwnd >= nv_min_cwnd) { in tcpnv_acked() 375 if (tp->snd_cwnd > max_win) { in tcpnv_acked() 402 if (tp->snd_cwnd - max_win > 2) { in tcpnv_acked() 406 dec = max(2U, ((tp->snd_cwnd - max_win) * in tcpnv_acked() 408 tp->snd_cwnd -= dec; in tcpnv_acked() 410 tp->snd_cwnd = max_win; in tcpnv_acked() 415 } else if (tp->snd_cwnd <= max_win - nv_pad_buffer) { in tcpnv_acked() [all …]
|
D | tcp_bic.c | 153 bictcp_update(ca, tp->snd_cwnd); in bictcp_cong_avoid() 169 if (tp->snd_cwnd < ca->last_max_cwnd && fast_convergence) in bictcp_recalc_ssthresh() 170 ca->last_max_cwnd = (tp->snd_cwnd * (BICTCP_BETA_SCALE + beta)) in bictcp_recalc_ssthresh() 173 ca->last_max_cwnd = tp->snd_cwnd; in bictcp_recalc_ssthresh() 175 if (tp->snd_cwnd <= low_window) in bictcp_recalc_ssthresh() 176 return max(tp->snd_cwnd >> 1U, 2U); in bictcp_recalc_ssthresh() 178 return max((tp->snd_cwnd * beta) / BICTCP_BETA_SCALE, 2U); in bictcp_recalc_ssthresh()
|
D | tcp_cong.c | 394 u32 cwnd = min(tp->snd_cwnd + acked, tp->snd_ssthresh); in tcp_slow_start() 396 acked -= cwnd - tp->snd_cwnd; in tcp_slow_start() 397 tp->snd_cwnd = min(cwnd, tp->snd_cwnd_clamp); in tcp_slow_start() 411 tp->snd_cwnd++; in tcp_cong_avoid_ai() 419 tp->snd_cwnd += delta; in tcp_cong_avoid_ai() 421 tp->snd_cwnd = min(tp->snd_cwnd, tp->snd_cwnd_clamp); in tcp_cong_avoid_ai() 446 tcp_cong_avoid_ai(tp, tp->snd_cwnd, acked); in tcp_reno_cong_avoid() 455 return max(tp->snd_cwnd >> 1U, 2U); in tcp_reno_ssthresh() 463 return max(tp->snd_cwnd, tp->prior_cwnd); in tcp_reno_undo_cwnd()
|
D | tcp_cubic.c | 346 bictcp_update(ca, tp->snd_cwnd, acked); in bictcp_cong_avoid() 358 if (tp->snd_cwnd < ca->last_max_cwnd && fast_convergence) in bictcp_recalc_ssthresh() 359 ca->last_max_cwnd = (tp->snd_cwnd * (BICTCP_BETA_SCALE + beta)) in bictcp_recalc_ssthresh() 362 ca->last_max_cwnd = tp->snd_cwnd; in bictcp_recalc_ssthresh() 364 return max((tp->snd_cwnd * beta) / BICTCP_BETA_SCALE, 2U); in bictcp_recalc_ssthresh() 422 ca->delay_min, hystart_ack_delay(sk), tp->snd_cwnd); in hystart_update() 427 tp->snd_cwnd); in hystart_update() 428 tp->snd_ssthresh = tp->snd_cwnd; in hystart_update() 447 tp->snd_cwnd); in hystart_update() 448 tp->snd_ssthresh = tp->snd_cwnd; in hystart_update() [all …]
|
D | tcp_dctcp.c | 107 ca->loss_cwnd = tp->snd_cwnd; in dctcp_ssthresh() 108 return max(tp->snd_cwnd - ((tp->snd_cwnd * ca->dctcp_alpha) >> 11U), 2U); in dctcp_ssthresh() 149 ca->loss_cwnd = tp->snd_cwnd; in dctcp_react_to_loss() 150 tp->snd_ssthresh = max(tp->snd_cwnd >> 1U, 2U); in dctcp_react_to_loss() 213 return max(tcp_sk(sk)->snd_cwnd, ca->loss_cwnd); in dctcp_cwnd_undo()
|
D | tcp_illinois.c | 227 if (tp->snd_cwnd < win_thresh) { in update_params() 287 if (delta >= tp->snd_cwnd) { in tcp_illinois_cong_avoid() 288 tp->snd_cwnd = min(tp->snd_cwnd + delta / tp->snd_cwnd, in tcp_illinois_cong_avoid() 301 return max(tp->snd_cwnd - ((tp->snd_cwnd * ca->beta) >> BETA_SHIFT), 2U); in tcp_illinois_ssthresh()
|
D | tcp_scalable.c | 30 tcp_cong_avoid_ai(tp, min(tp->snd_cwnd, TCP_SCALABLE_AI_CNT), in tcp_scalable_cong_avoid() 38 return max(tp->snd_cwnd - (tp->snd_cwnd>>TCP_SCALABLE_MD_SCALE), 2U); in tcp_scalable_ssthresh()
|
D | tcp_htcp.c | 127 if (ca->packetcount >= tp->snd_cwnd - (ca->alpha >> 7 ? : 1) && in measure_achieved_throughput() 228 return max((tp->snd_cwnd * ca->beta) >> 7, 2U); in htcp_recalc_ssthresh() 245 if ((tp->snd_cwnd_cnt * ca->alpha)>>7 >= tp->snd_cwnd) { in htcp_cong_avoid() 246 if (tp->snd_cwnd < tp->snd_cwnd_clamp) in htcp_cong_avoid() 247 tp->snd_cwnd++; in htcp_cong_avoid()
|
D | tcp_lp.c | 293 tp->snd_cwnd, lp->remote_hz, lp->owd_min, lp->owd_max, in tcp_lp_pkts_acked() 309 tp->snd_cwnd = 1U; in tcp_lp_pkts_acked() 314 tp->snd_cwnd = max(tp->snd_cwnd >> 1U, 1U); in tcp_lp_pkts_acked()
|
D | tcp_bbr.c | 277 bw = (u64)tp->snd_cwnd * BW_UNIT; in bbr_init_pacing_rate_from_rtt() 324 bbr->prior_cwnd = tp->snd_cwnd; /* this cwnd is good enough */ in bbr_save_cwnd() 326 bbr->prior_cwnd = max(bbr->prior_cwnd, tp->snd_cwnd); in bbr_save_cwnd() 483 u32 cwnd = tp->snd_cwnd; in bbr_set_cwnd_to_recover_or_restore() 521 u32 cwnd = tp->snd_cwnd, target_cwnd = 0; in bbr_set_cwnd() 545 tp->snd_cwnd = min(cwnd, tp->snd_cwnd_clamp); /* apply global cap */ in bbr_set_cwnd() 547 tp->snd_cwnd = min(tp->snd_cwnd, bbr_cwnd_min_target); in bbr_set_cwnd() 857 extra_acked = min(extra_acked, tp->snd_cwnd); in bbr_update_ack_aggregation() 915 tp->snd_cwnd = max(tp->snd_cwnd, bbr->prior_cwnd); in bbr_check_probe_rtt_done() 1094 return tcp_sk(sk)->snd_cwnd; in bbr_undo_cwnd()
|
D | bpf_tcp_ca.c | 120 case offsetof(struct tcp_sock, snd_cwnd): in bpf_tcp_ca_btf_struct_access() 121 end = offsetofend(struct tcp_sock, snd_cwnd); in bpf_tcp_ca_btf_struct_access()
|
D | tcp_metrics.c | 391 if (val && (tp->snd_cwnd >> 1) > val) in tcp_update_metrics() 393 tp->snd_cwnd >> 1); in tcp_update_metrics() 397 if (tp->snd_cwnd > val) in tcp_update_metrics() 399 tp->snd_cwnd); in tcp_update_metrics() 407 max(tp->snd_cwnd >> 1, tp->snd_ssthresh)); in tcp_update_metrics() 410 tcp_metric_set(tm, TCP_METRIC_CWND, (val + tp->snd_cwnd) >> 1); in tcp_update_metrics()
|
D | tcp_output.c | 145 u32 cwnd = tp->snd_cwnd; in tcp_cwnd_restart() 154 tp->snd_cwnd = max(cwnd, restart_cwnd); in tcp_cwnd_restart() 1016 tp->snd_cwnd > tcp_packets_in_flight(tp)) { in tcp_tsq_write() 1865 if (win_used < tp->snd_cwnd) { in tcp_cwnd_application_limited() 1867 tp->snd_cwnd = (tp->snd_cwnd + win_used) >> 1; in tcp_cwnd_application_limited() 2039 cwnd = tp->snd_cwnd; in tcp_cwnd_test() 2195 BUG_ON(tp->snd_cwnd <= in_flight); in tcp_tso_should_defer() 2200 cong_win = (tp->snd_cwnd - in_flight) * tp->mss_cache; in tcp_tso_should_defer() 2214 u32 chunk = min(tp->snd_wnd, tp->snd_cwnd * tp->mss_cache); in tcp_tso_should_defer() 2342 tp->snd_cwnd < 11 || in tcp_mtu_probe() [all …]
|
/Linux-v5.10/tools/testing/selftests/bpf/ |
D | bpf_tcp_helpers.h | 62 __u32 snd_cwnd; member 190 __u32 cwnd = min(tp->snd_cwnd + acked, tp->snd_ssthresh); in tcp_slow_start() 192 acked -= cwnd - tp->snd_cwnd; in tcp_slow_start() 193 tp->snd_cwnd = min(cwnd, tp->snd_cwnd_clamp); in tcp_slow_start() 200 return tp->snd_cwnd < tp->snd_ssthresh; in tcp_in_slow_start() 209 return tp->snd_cwnd < 2 * tp->max_packets_out; in tcp_is_cwnd_limited() 219 tp->snd_cwnd++; in tcp_cong_avoid_ai() 227 tp->snd_cwnd += delta; in tcp_cong_avoid_ai() 229 tp->snd_cwnd = min(tp->snd_cwnd, tp->snd_cwnd_clamp); in tcp_cong_avoid_ai()
|
/Linux-v5.10/tools/testing/selftests/bpf/progs/ |
D | bpf_dctcp.c | 79 ca->loss_cwnd = tp->snd_cwnd; in BPF_PROG() 80 return max(tp->snd_cwnd - ((tp->snd_cwnd * ca->dctcp_alpha) >> 11U), 2U); in BPF_PROG() 118 ca->loss_cwnd = tp->snd_cwnd; in dctcp_react_to_loss() 119 tp->snd_ssthresh = max(tp->snd_cwnd >> 1U, 2U); in dctcp_react_to_loss() 194 return max(tcp_sk(sk)->snd_cwnd, ca->loss_cwnd); in BPF_PROG() 212 tcp_cong_avoid_ai(tp, tp->snd_cwnd, acked); in BPF_PROG()
|
D | bpf_cubic.c | 402 bictcp_update(ca, tp->snd_cwnd, acked); in BPF_STRUCT_OPS() 414 if (tp->snd_cwnd < ca->last_max_cwnd && fast_convergence) in BPF_STRUCT_OPS() 415 ca->last_max_cwnd = (tp->snd_cwnd * (BICTCP_BETA_SCALE + beta)) in BPF_STRUCT_OPS() 418 ca->last_max_cwnd = tp->snd_cwnd; in BPF_STRUCT_OPS() 420 return max((tp->snd_cwnd * beta) / BICTCP_BETA_SCALE, 2U); in BPF_STRUCT_OPS() 478 tp->snd_ssthresh = tp->snd_cwnd; in hystart_update() 493 tp->snd_ssthresh = tp->snd_cwnd; in hystart_update() 524 tp->snd_cwnd >= hystart_low_window) in BPF_STRUCT_OPS() 532 return max(tp->snd_cwnd, tp->prior_cwnd); in BPF_STRUCT_OPS()
|
D | test_sock_fields.c | 87 dst->snd_cwnd = src->snd_cwnd; in tpcpy()
|
/Linux-v5.10/include/trace/events/ |
D | tcp.h | 245 __field(__u32, snd_cwnd) 271 __entry->snd_cwnd = tp->snd_cwnd; 282 __entry->snd_cwnd, __entry->ssthresh, __entry->snd_wnd,
|
/Linux-v5.10/tools/testing/selftests/bpf/prog_tests/ |
D | sock_fields.c | 82 tp->snd_cwnd, tp->srtt_us, tp->rtt_min, tp->snd_ssthresh, in print_tp() 173 srv_tp.snd_cwnd != 10 || in check_result() 181 cli_tp.snd_cwnd != 10 || in check_result()
|