aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_highspeed.c
diff options
context:
space:
mode:
authorIlpo Järvinen <ilpo.jarvinen@helsinki.fi>2007-05-03 16:28:35 -0400
committerDavid S. Miller <davem@davemloft.net>2007-05-03 16:28:35 -0400
commit03fba0479600114f32d29eee74ca3eaa364606bf (patch)
tree855d3bed8b4e825e93837bb4090e18e47a09a273 /net/ipv4/tcp_highspeed.c
parent72fbaeb623971c321112de7fe3fa4e24e12ca59e (diff)
[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>
Diffstat (limited to 'net/ipv4/tcp_highspeed.c')
-rw-r--r--net/ipv4/tcp_highspeed.c24
1 files changed, 3 insertions, 21 deletions
diff --git a/net/ipv4/tcp_highspeed.c b/net/ipv4/tcp_highspeed.c
index a291097fcc0a..43d624e5043c 100644
--- a/net/ipv4/tcp_highspeed.c
+++ b/net/ipv4/tcp_highspeed.c
@@ -97,10 +97,6 @@ struct hstcp {
97 u32 ai; 97 u32 ai;
98}; 98};
99 99
100static int max_ssthresh = 100;
101module_param(max_ssthresh, int, 0644);
102MODULE_PARM_DESC(max_ssthresh, "limited slow start threshold (RFC3742)");
103
104static void hstcp_init(struct sock *sk) 100static void hstcp_init(struct sock *sk)
105{ 101{
106 struct tcp_sock *tp = tcp_sk(sk); 102 struct tcp_sock *tp = tcp_sk(sk);
@@ -122,23 +118,9 @@ static void hstcp_cong_avoid(struct sock *sk, u32 adk, u32 rtt,
122 if (!tcp_is_cwnd_limited(sk, in_flight)) 118 if (!tcp_is_cwnd_limited(sk, in_flight))
123 return; 119 return;
124 120
125 if (tp->snd_cwnd <= tp->snd_ssthresh) { 121 if (tp->snd_cwnd <= tp->snd_ssthresh)
126 /* RFC3742: limited slow start 122 tcp_slow_start(tp);
127 * the window is increased by 1/K MSS for each arriving ACK, 123 else {
128 * for K = int(cwnd/(0.5 max_ssthresh))
129 */
130 if (max_ssthresh > 0 && tp->snd_cwnd > max_ssthresh) {
131 u32 k = max(tp->snd_cwnd / (max_ssthresh >> 1), 1U);
132 if (++tp->snd_cwnd_cnt >= k) {
133 if (tp->snd_cwnd < tp->snd_cwnd_clamp)
134 tp->snd_cwnd++;
135 tp->snd_cwnd_cnt = 0;
136 }
137 } else {
138 if (tp->snd_cwnd < tp->snd_cwnd_clamp)
139 tp->snd_cwnd++;
140 }
141 } else {
142 /* Update AIMD parameters. 124 /* Update AIMD parameters.
143 * 125 *
144 * We want to guarantee that: 126 * We want to guarantee that: