[TCP] Vegas: stop resetting rtt every ack
authorThomas Young <tyo@ee.mu.oz.au>
Wed, 7 Dec 2005 00:16:34 +0000 (16:16 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 7 Dec 2005 00:16:34 +0000 (16:16 -0800)
Move the resetting of rtt measurements to inside the once per RTT
block of code.

Signed-off-by: Thomas Young <tyo@ee.mu.oz.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_vegas.c

index b7d296a8ac6d2366e2470607d579ef1bac5cc3ab..8f06a479305bb9ae27d74579e900aa54a2087eac 100644 (file)
@@ -333,11 +333,11 @@ static void tcp_vegas_cong_avoid(struct sock *sk, u32 ack,
                        else if (tp->snd_cwnd > tp->snd_cwnd_clamp)
                                tp->snd_cwnd = tp->snd_cwnd_clamp;
                }
-       }
 
-       /* Wipe the slate clean for the next RTT. */
-       vegas->cntRTT = 0;
-       vegas->minRTT = 0x7fffffff;
+               /* Wipe the slate clean for the next RTT. */
+               vegas->cntRTT = 0;
+               vegas->minRTT = 0x7fffffff;
+       }
 }
 
 /* Extract info for Tcp socket info provided via netlink. */