Lines Matching refs:tp
378 u32 tcp_slow_start(struct tcp_sock *tp, u32 acked) in tcp_slow_start() argument
380 u32 cwnd = min(tp->snd_cwnd + acked, tp->snd_ssthresh); in tcp_slow_start()
382 acked -= cwnd - tp->snd_cwnd; in tcp_slow_start()
383 tp->snd_cwnd = min(cwnd, tp->snd_cwnd_clamp); in tcp_slow_start()
392 void tcp_cong_avoid_ai(struct tcp_sock *tp, u32 w, u32 acked) in tcp_cong_avoid_ai() argument
395 if (tp->snd_cwnd_cnt >= w) { in tcp_cong_avoid_ai()
396 tp->snd_cwnd_cnt = 0; in tcp_cong_avoid_ai()
397 tp->snd_cwnd++; in tcp_cong_avoid_ai()
400 tp->snd_cwnd_cnt += acked; in tcp_cong_avoid_ai()
401 if (tp->snd_cwnd_cnt >= w) { in tcp_cong_avoid_ai()
402 u32 delta = tp->snd_cwnd_cnt / w; in tcp_cong_avoid_ai()
404 tp->snd_cwnd_cnt -= delta * w; in tcp_cong_avoid_ai()
405 tp->snd_cwnd += delta; in tcp_cong_avoid_ai()
407 tp->snd_cwnd = min(tp->snd_cwnd, tp->snd_cwnd_clamp); in tcp_cong_avoid_ai()
420 struct tcp_sock *tp = tcp_sk(sk); in tcp_reno_cong_avoid() local
426 if (tcp_in_slow_start(tp)) { in tcp_reno_cong_avoid()
427 acked = tcp_slow_start(tp, acked); in tcp_reno_cong_avoid()
432 tcp_cong_avoid_ai(tp, tp->snd_cwnd, acked); in tcp_reno_cong_avoid()
439 const struct tcp_sock *tp = tcp_sk(sk); in tcp_reno_ssthresh() local
441 return max(tp->snd_cwnd >> 1U, 2U); in tcp_reno_ssthresh()