[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>
This commit is contained in:

committed by
David S. Miller

parent
2d2abbab63
commit
7faffa1c7f
@@ -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 &&
|
||||
|
Reference in New Issue
Block a user