diff options
author | Stephen Hemminger <shemminger@osdl.org> | 2005-11-11 04:07:24 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-11-11 04:07:24 +0300 |
commit | 7faffa1c7fb9b8e8917e3225d4e2638270c0a48b (patch) | |
tree | 3c9f998639bc2374a86b1f2251ae421e625c1e9d /include/net/tcp.h | |
parent | 2d2abbab63f6726a147ae61ada39bf2c9ee0db9a (diff) | |
download | linux-7faffa1c7fb9b8e8917e3225d4e2638270c0a48b.tar.xz |
[TCP]: add tcp_slow_start helper
Move all the code that does linear TCP slowstart to one
inline function to ease later patch to add ABC support.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/tcp.h')
-rw-r--r-- | include/net/tcp.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h index 15bdbc6bd571..54c399886275 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -765,6 +765,16 @@ static inline __u32 tcp_current_ssthresh(const struct sock *sk) (tp->snd_cwnd >> 2))); } +/* + * Linear increase during slow start + */ +static inline void tcp_slow_start(struct tcp_sock *tp) +{ + if (tp->snd_cwnd < tp->snd_cwnd_clamp) + tp->snd_cwnd++; +} + + static inline void tcp_sync_left_out(struct tcp_sock *tp) { if (tp->rx_opt.sack_ok && |