aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@linux-foundation.org>2007-08-07 21:29:05 -0400
committerDavid S. Miller <davem@davemloft.net>2007-08-07 21:29:05 -0400
commitf34d1955dff5a5769d24614d137003f0316406f3 (patch)
tree4787a616396aa8ea32bdb262043e7b784861cbeb /net/ipv4
parent591e620693e71e24fb3450a4084217e44b7a60b6 (diff)
[TCP]: H-TCP maxRTT estimation at startup
Small patch to H-TCP from Douglas Leith. Fix estimation of maxRTT. The original code ignores rtt measurements during slow start (via the check tp->snd_ssthresh < 0xFFFF) yet this is probably a good time to try to estimate max rtt as delayed acking is disabled and slow start will only exit on a loss which presumably corresponds to a maxrtt measurement. Second, the original code (via the check htcp_ccount(ca) > 3) ignores rtt data during what it estimates to be the first 3 round-trip times. This seems like an unnecessary check now that the RCV timestamp are no longer used for rtt estimation. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/tcp_htcp.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/net/ipv4/tcp_htcp.c b/net/ipv4/tcp_htcp.c
index b66556c0a5b..5215691f276 100644
--- a/net/ipv4/tcp_htcp.c
+++ b/net/ipv4/tcp_htcp.c
@@ -79,7 +79,6 @@ static u32 htcp_cwnd_undo(struct sock *sk)
79static inline void measure_rtt(struct sock *sk, u32 srtt) 79static inline void measure_rtt(struct sock *sk, u32 srtt)
80{ 80{
81 const struct inet_connection_sock *icsk = inet_csk(sk); 81 const struct inet_connection_sock *icsk = inet_csk(sk);
82 const struct tcp_sock *tp = tcp_sk(sk);
83 struct htcp *ca = inet_csk_ca(sk); 82 struct htcp *ca = inet_csk_ca(sk);
84 83
85 /* keep track of minimum RTT seen so far, minRTT is zero at first */ 84 /* keep track of minimum RTT seen so far, minRTT is zero at first */
@@ -87,8 +86,7 @@ static inline void measure_rtt(struct sock *sk, u32 srtt)
87 ca->minRTT = srtt; 86 ca->minRTT = srtt;
88 87
89 /* max RTT */ 88 /* max RTT */
90 if (icsk->icsk_ca_state == TCP_CA_Open 89 if (icsk->icsk_ca_state == TCP_CA_Open) {
91 && tp->snd_ssthresh < 0xFFFF && htcp_ccount(ca) > 3) {
92 if (ca->maxRTT < ca->minRTT) 90 if (ca->maxRTT < ca->minRTT)
93 ca->maxRTT = ca->minRTT; 91 ca->maxRTT = ca->minRTT;
94 if (ca->maxRTT < srtt 92 if (ca->maxRTT < srtt