From 61e925cbdea6af0d838c9e2313aa65d187e68268 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Date: Thu, 3 May 2007 13:28:35 -0700 Subject: [PATCH] --- yaml --- r: 53491 b: refs/heads/master c: 03fba0479600114f32d29eee74ca3eaa364606bf h: refs/heads/master i: 53489: a2ae3b3aa736907a8ff29cfafdd64fd22ec4f66d 53487: 5dae2ecafbad778d45ae50ab2065e9147c8c9f1a v: v3 --- [refs] | 2 +- trunk/net/ipv4/tcp_highspeed.c | 24 +++--------------------- 2 files changed, 4 insertions(+), 22 deletions(-) diff --git a/[refs] b/[refs] index 4c5acfd2aa03..c9ce8cc1a952 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 72fbaeb623971c321112de7fe3fa4e24e12ca59e +refs/heads/master: 03fba0479600114f32d29eee74ca3eaa364606bf diff --git a/trunk/net/ipv4/tcp_highspeed.c b/trunk/net/ipv4/tcp_highspeed.c index a291097fcc0a..43d624e5043c 100644 --- a/trunk/net/ipv4/tcp_highspeed.c +++ b/trunk/net/ipv4/tcp_highspeed.c @@ -97,10 +97,6 @@ struct hstcp { 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) { 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)) return; - if (tp->snd_cwnd <= tp->snd_ssthresh) { - /* RFC3742: limited slow start - * the window is increased by 1/K MSS for each arriving ACK, - * 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 { + if (tp->snd_cwnd <= tp->snd_ssthresh) + tcp_slow_start(tp); + else { /* Update AIMD parameters. * * We want to guarantee that: