diff options
author | Li RongQing <roy.qing.li@gmail.com> | 2014-09-29 21:49:55 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-09-30 17:09:16 -0400 |
commit | a12a601ed163578084a48708ae376805f79a1ccf (patch) | |
tree | 9cf7ebc0f7e86bc54c72cd0e4a42895017d00c78 | |
parent | 3243acd37fd9b7fc4b19318eddf28b418b3b060a (diff) |
tcp: Change tcp_slow_start function to return void
No caller uses the return value, so make this function return void.
Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | include/net/tcp.h | 2 | ||||
-rw-r--r-- | net/ipv4/tcp_cong.c | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h index 545a79aa4212..ba2f9d03076b 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -830,7 +830,7 @@ void tcp_get_available_congestion_control(char *buf, size_t len); | |||
830 | void tcp_get_allowed_congestion_control(char *buf, size_t len); | 830 | void tcp_get_allowed_congestion_control(char *buf, size_t len); |
831 | int tcp_set_allowed_congestion_control(char *allowed); | 831 | int tcp_set_allowed_congestion_control(char *allowed); |
832 | int tcp_set_congestion_control(struct sock *sk, const char *name); | 832 | int tcp_set_congestion_control(struct sock *sk, const char *name); |
833 | int tcp_slow_start(struct tcp_sock *tp, u32 acked); | 833 | void tcp_slow_start(struct tcp_sock *tp, u32 acked); |
834 | void tcp_cong_avoid_ai(struct tcp_sock *tp, u32 w); | 834 | void tcp_cong_avoid_ai(struct tcp_sock *tp, u32 w); |
835 | 835 | ||
836 | u32 tcp_reno_ssthresh(struct sock *sk); | 836 | u32 tcp_reno_ssthresh(struct sock *sk); |
diff --git a/net/ipv4/tcp_cong.c b/net/ipv4/tcp_cong.c index a6c8a5775624..b1c5970d47a1 100644 --- a/net/ipv4/tcp_cong.c +++ b/net/ipv4/tcp_cong.c | |||
@@ -291,15 +291,13 @@ int tcp_set_congestion_control(struct sock *sk, const char *name) | |||
291 | * ABC caps N to 2. Slow start exits when cwnd grows over ssthresh and | 291 | * ABC caps N to 2. Slow start exits when cwnd grows over ssthresh and |
292 | * returns the leftover acks to adjust cwnd in congestion avoidance mode. | 292 | * returns the leftover acks to adjust cwnd in congestion avoidance mode. |
293 | */ | 293 | */ |
294 | int tcp_slow_start(struct tcp_sock *tp, u32 acked) | 294 | void tcp_slow_start(struct tcp_sock *tp, u32 acked) |
295 | { | 295 | { |
296 | u32 cwnd = tp->snd_cwnd + acked; | 296 | u32 cwnd = tp->snd_cwnd + acked; |
297 | 297 | ||
298 | if (cwnd > tp->snd_ssthresh) | 298 | if (cwnd > tp->snd_ssthresh) |
299 | cwnd = tp->snd_ssthresh + 1; | 299 | cwnd = tp->snd_ssthresh + 1; |
300 | acked -= cwnd - tp->snd_cwnd; | ||
301 | tp->snd_cwnd = min(cwnd, tp->snd_cwnd_clamp); | 300 | tp->snd_cwnd = min(cwnd, tp->snd_cwnd_clamp); |
302 | return acked; | ||
303 | } | 301 | } |
304 | EXPORT_SYMBOL_GPL(tcp_slow_start); | 302 | EXPORT_SYMBOL_GPL(tcp_slow_start); |
305 | 303 | ||