aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/tcp.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/tcp.h')
-rw-r--r--include/net/tcp.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h
index b71a446d58f6..56b76027b85e 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -793,6 +793,13 @@ static inline unsigned int tcp_packets_in_flight(const struct tcp_sock *tp)
793 return tp->packets_out - tcp_left_out(tp) + tp->retrans_out; 793 return tp->packets_out - tcp_left_out(tp) + tp->retrans_out;
794} 794}
795 795
796#define TCP_INFINITE_SSTHRESH 0x7fffffff
797
798static inline bool tcp_in_initial_slowstart(const struct tcp_sock *tp)
799{
800 return tp->snd_ssthresh >= TCP_INFINITE_SSTHRESH;
801}
802
796/* If cwnd > ssthresh, we may raise ssthresh to be half-way to cwnd. 803/* If cwnd > ssthresh, we may raise ssthresh to be half-way to cwnd.
797 * The exception is rate halving phase, when cwnd is decreasing towards 804 * The exception is rate halving phase, when cwnd is decreasing towards
798 * ssthresh. 805 * ssthresh.