diff options
-rw-r--r-- | net/ipv4/tcp_highspeed.c | 24 |
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 | ||
100 | static int max_ssthresh = 100; | ||
101 | module_param(max_ssthresh, int, 0644); | ||
102 | MODULE_PARM_DESC(max_ssthresh, "limited slow start threshold (RFC3742)"); | ||
103 | |||
104 | static void hstcp_init(struct sock *sk) | 100 | static 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: |