[TCP] Highspeed: Limited slow-start is nowadays in tcp_slow_start

Reuse limited slow-start (RFC3742) included into tcp_cong instead
of having another implementation in High Speed TCP.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Ilpo Järvinen 2007-05-03 13:28:35 -07:00 коммит произвёл David S. Miller
Родитель 72fbaeb623
Коммит 03fba04796
1 изменённых файлов: 3 добавлений и 21 удалений

Просмотреть файл

@ -97,10 +97,6 @@ struct hstcp {
u32 ai; u32 ai;
}; };
static int max_ssthresh = 100;
module_param(max_ssthresh, int, 0644);
MODULE_PARM_DESC(max_ssthresh, "limited slow start threshold (RFC3742)");
static void hstcp_init(struct sock *sk) static void hstcp_init(struct sock *sk)
{ {
struct tcp_sock *tp = tcp_sk(sk); struct tcp_sock *tp = tcp_sk(sk);
@ -122,23 +118,9 @@ static void hstcp_cong_avoid(struct sock *sk, u32 adk, u32 rtt,
if (!tcp_is_cwnd_limited(sk, in_flight)) if (!tcp_is_cwnd_limited(sk, in_flight))
return; return;
if (tp->snd_cwnd <= tp->snd_ssthresh) { if (tp->snd_cwnd <= tp->snd_ssthresh)
/* RFC3742: limited slow start tcp_slow_start(tp);
* the window is increased by 1/K MSS for each arriving ACK, else {
* for K = int(cwnd/(0.5 max_ssthresh))
*/
if (max_ssthresh > 0 && tp->snd_cwnd > max_ssthresh) {
u32 k = max(tp->snd_cwnd / (max_ssthresh >> 1), 1U);
if (++tp->snd_cwnd_cnt >= k) {
if (tp->snd_cwnd < tp->snd_cwnd_clamp)
tp->snd_cwnd++;
tp->snd_cwnd_cnt = 0;
}
} else {
if (tp->snd_cwnd < tp->snd_cwnd_clamp)
tp->snd_cwnd++;
}
} else {
/* Update AIMD parameters. /* Update AIMD parameters.
* *
* We want to guarantee that: * We want to guarantee that: