diff options
author | Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> | 2009-09-15 04:30:10 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-09-15 04:30:10 -0400 |
commit | 0b6a05c1dbebe8c616e2e5b0f52b7a01fd792911 (patch) | |
tree | 18b5a2d16ac3fa8dd6d4528469725c216aed428c /include | |
parent | 036d6a673fa0a2e2c5b72a3b1d1b86114c1711c0 (diff) |
tcp: fix ssthresh u16 leftover
It was once upon time so that snd_sthresh was a 16-bit quantity.
...That has not been true for long period of time. I run across
some ancient compares which still seem to trust such legacy.
Put all that magic into a single place, I hopefully found all
of them.
Compile tested, though linking of allyesconfig is ridiculous
nowadays it seems.
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/tcp.h | 7 |
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 | |||
798 | static 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. |