Lines Matching refs:tp
366 u32 tcp_slow_start(struct tcp_sock *tp, u32 acked) in tcp_slow_start() argument
368 u32 cwnd = tp->snd_cwnd + acked; in tcp_slow_start()
370 if (cwnd > tp->snd_ssthresh) in tcp_slow_start()
371 cwnd = tp->snd_ssthresh + 1; in tcp_slow_start()
372 acked -= cwnd - tp->snd_cwnd; in tcp_slow_start()
373 tp->snd_cwnd = min(cwnd, tp->snd_cwnd_clamp); in tcp_slow_start()
382 void tcp_cong_avoid_ai(struct tcp_sock *tp, u32 w, u32 acked) in tcp_cong_avoid_ai() argument
385 if (tp->snd_cwnd_cnt >= w) { in tcp_cong_avoid_ai()
386 tp->snd_cwnd_cnt = 0; in tcp_cong_avoid_ai()
387 tp->snd_cwnd++; in tcp_cong_avoid_ai()
390 tp->snd_cwnd_cnt += acked; in tcp_cong_avoid_ai()
391 if (tp->snd_cwnd_cnt >= w) { in tcp_cong_avoid_ai()
392 u32 delta = tp->snd_cwnd_cnt / w; in tcp_cong_avoid_ai()
394 tp->snd_cwnd_cnt -= delta * w; in tcp_cong_avoid_ai()
395 tp->snd_cwnd += delta; in tcp_cong_avoid_ai()
397 tp->snd_cwnd = min(tp->snd_cwnd, tp->snd_cwnd_clamp); in tcp_cong_avoid_ai()
410 struct tcp_sock *tp = tcp_sk(sk); in tcp_reno_cong_avoid() local
416 if (tp->snd_cwnd <= tp->snd_ssthresh) { in tcp_reno_cong_avoid()
417 acked = tcp_slow_start(tp, acked); in tcp_reno_cong_avoid()
422 tcp_cong_avoid_ai(tp, tp->snd_cwnd, acked); in tcp_reno_cong_avoid()
429 const struct tcp_sock *tp = tcp_sk(sk); in tcp_reno_ssthresh() local
431 return max(tp->snd_cwnd >> 1U, 2U); in tcp_reno_ssthresh()