/kernel/linux/linux-5.10/net/ipv4/ |
H A 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>> in tcp_yeah_cong_avoid() [all...] |
H A 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 in tcp_veno_cong_avoid() [all...] |
H A D | tcp_highspeed.c | 127 * snd_cwnd <= in hstcp_cong_avoid() 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 in hstcp_ssthresh() [all...] |
H A 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 in hybla_cong_avoid() [all...] |
H A 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 > t in tcp_vegas_cong_avoid() [all...] |
H A D | tcp_bic.c | 22 * max_cwnd = snd_cwnd * beta 52 u32 last_max_cwnd; /* last maximum snd_cwnd */ 53 u32 last_cwnd; /* the last snd_cwnd */ 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 * bet in bictcp_recalc_ssthresh() [all...] |
H A 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...] |
H A 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 < in tcpnv_acked() [all...] |
H A 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()
|
H A D | tcp_cubic.c | 33 * max_cwnd = snd_cwnd * beta 86 u32 last_max_cwnd; /* last maximum snd_cwnd */ 87 u32 last_cwnd; /* the last snd_cwnd */ 344 bictcp_update(ca, tp->snd_cwnd, acked); in bictcp_cong_avoid() 356 if (tp->snd_cwnd < ca->last_max_cwnd && fast_convergence) in bictcp_recalc_ssthresh() 357 ca->last_max_cwnd = (tp->snd_cwnd * (BICTCP_BETA_SCALE + beta)) in bictcp_recalc_ssthresh() 360 ca->last_max_cwnd = tp->snd_cwnd; in bictcp_recalc_ssthresh() 362 return max((tp->snd_cwnd * beta) / BICTCP_BETA_SCALE, 2U); in bictcp_recalc_ssthresh() 423 ca->delay_min, hystart_ack_delay(sk), tp->snd_cwnd); in hystart_update() 428 tp->snd_cwnd); in hystart_update() [all...] |
H A 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()
|
H A D | tcp_cong.c | 398 u32 cwnd = min(tp->snd_cwnd + acked, tp->snd_ssthresh); in tcp_slow_start() 400 acked -= cwnd - tp->snd_cwnd; in tcp_slow_start() 401 tp->snd_cwnd = min(cwnd, tp->snd_cwnd_clamp); in tcp_slow_start() 407 /* In theory this is tp->snd_cwnd += 1 / tp->snd_cwnd (or alternative w), 415 tp->snd_cwnd++; in tcp_cong_avoid_ai() 423 tp->snd_cwnd += delta; in tcp_cong_avoid_ai() 425 tp->snd_cwnd = min(tp->snd_cwnd, tp->snd_cwnd_clamp); in tcp_cong_avoid_ai() 450 tcp_cong_avoid_ai(tp, tp->snd_cwnd, acke in tcp_reno_cong_avoid() [all...] |
H A D | tcp_illinois.c | 227 if (tp->snd_cwnd < win_thresh) { in update_params() 284 * tp->snd_cwnd += alpha/tp->snd_cwnd in tcp_illinois_cong_avoid() 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()
|
H A 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 in bbr_check_probe_rtt_done() [all...] |
H A D | tcp_lp.c | 293 tp->snd_cwnd, lp->remote_hz, lp->owd_min, lp->owd_max, in tcp_lp_pkts_acked() 307 * drop snd_cwnd into 1 */ in tcp_lp_pkts_acked() 309 tp->snd_cwnd = 1U; in tcp_lp_pkts_acked() 312 * cut snd_cwnd into half */ in tcp_lp_pkts_acked() 314 tp->snd_cwnd = max(tp->snd_cwnd >> 1U, 1U); in tcp_lp_pkts_acked()
|
H A 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() 243 * In theory this is tp->snd_cwnd += alpha / tp->snd_cwnd in htcp_cong_avoid() 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()
|
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/ |
H A D | bpf_tcp_helpers.h | 62 __u32 snd_cwnd; member 72 is_cwnd_limited:1,/* forward progress limited by snd_cwnd? */ 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 in tcp_cong_avoid_ai() [all...] |
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/progs/ |
H A 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()
|
H A D | bpf_cubic.c | 27 * max_cwnd = snd_cwnd * beta 75 __u32 last_max_cwnd; /* last maximum snd_cwnd */ 76 __u32 last_cwnd; /* the last snd_cwnd */ 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() [all...] |
/kernel/linux/linux-6.6/tools/testing/selftests/bpf/progs/ |
H A D | bpf_dctcp.c | 113 ca->loss_cwnd = tp->snd_cwnd; in BPF_PROG() 114 return max(tp->snd_cwnd - ((tp->snd_cwnd * ca->dctcp_alpha) >> 11U), 2U); in BPF_PROG() 152 ca->loss_cwnd = tp->snd_cwnd; in dctcp_react_to_loss() 153 tp->snd_ssthresh = max(tp->snd_cwnd >> 1U, 2U); in dctcp_react_to_loss() 228 return max(tcp_sk(sk)->snd_cwnd, ca->loss_cwnd); in BPF_PROG()
|
H A D | bpf_cubic.c | 27 * max_cwnd = snd_cwnd * beta 75 __u32 last_max_cwnd; /* last maximum snd_cwnd */ 76 __u32 last_cwnd; /* the last snd_cwnd */ 396 bictcp_update(ca, tp->snd_cwnd, acked); in BPF_STRUCT_OPS() 408 if (tp->snd_cwnd < ca->last_max_cwnd && fast_convergence) in BPF_STRUCT_OPS() 409 ca->last_max_cwnd = (tp->snd_cwnd * (BICTCP_BETA_SCALE + beta)) in BPF_STRUCT_OPS() 412 ca->last_max_cwnd = tp->snd_cwnd; in BPF_STRUCT_OPS() 414 return max((tp->snd_cwnd * beta) / BICTCP_BETA_SCALE, 2U); in BPF_STRUCT_OPS() 472 tp->snd_ssthresh = tp->snd_cwnd; in hystart_update() 487 tp->snd_ssthresh = tp->snd_cwnd; in hystart_update() [all...] |
H A D | tcp_ca_write_sk_pacing.c | 46 ((tp->snd_cwnd * tp->mss_cache * USEC_PER_SEC) << 3) / in BPF_PROG() 61 return tcp_sk(sk)->snd_cwnd; in BPF_PROG()
|
H A D | tcp_ca_incompl_cong_ops.c | 24 return tcp_sk(sk)->snd_cwnd; in BPF_PROG()
|
/kernel/linux/linux-5.10/include/trace/events/ |
H A D | tcp.h | 245 __field(__u32, snd_cwnd) 271 __entry->snd_cwnd = tp->snd_cwnd; 279 TP_printk("src=%pISpc dest=%pISpc mark=%#x data_len=%d snd_nxt=%#x snd_una=%#x snd_cwnd=%u ssthresh=%u snd_wnd=%u srtt=%u rcv_wnd=%u sock_cookie=%llx", 282 __entry->snd_cwnd, __entry->ssthresh, __entry->snd_wnd,
|
/kernel/linux/linux-6.6/tools/testing/selftests/bpf/ |
H A D | bpf_tcp_helpers.h | 72 __u32 snd_cwnd; member 82 is_cwnd_limited:1,/* forward progress limited by snd_cwnd? */ 202 return tp->snd_cwnd < tp->snd_ssthresh; in tcp_in_slow_start() 211 return tp->snd_cwnd < 2 * tp->max_packets_out; in tcp_is_cwnd_limited()
|