Commit:     f34d1955dff5a5769d24614d137003f0316406f3
Parent:     591e620693e71e24fb3450a4084217e44b7a60b6
Author:     Stephen Hemminger <[EMAIL PROTECTED]>
AuthorDate: Tue Aug 7 18:29:05 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Tue Aug 7 18:29:05 2007 -0700

    [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 <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
 net/ipv4/tcp_htcp.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/net/ipv4/tcp_htcp.c b/net/ipv4/tcp_htcp.c
index b66556c..5215691 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)
 static inline void measure_rtt(struct sock *sk, u32 srtt)
        const struct inet_connection_sock *icsk = inet_csk(sk);
-       const struct tcp_sock *tp = tcp_sk(sk);
        struct htcp *ca = inet_csk_ca(sk);
        /* 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)
                ca->minRTT = srtt;
        /* max RTT */
-       if (icsk->icsk_ca_state == TCP_CA_Open
-           && tp->snd_ssthresh < 0xFFFF && htcp_ccount(ca) > 3) {
+       if (icsk->icsk_ca_state == TCP_CA_Open) {
                if (ca->maxRTT < ca->minRTT)
                        ca->maxRTT = ca->minRTT;
                if (ca->maxRTT < srtt
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to