This is a note to let you know that I've just added the patch titled

    [PATCH 14/28] tcp: fix tcp_rcv_rtt_update() use of an unscaled RTT sample

to the 3.3-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     tcp-fix-tcp_rcv_rtt_update-use-of-an-unscaled-rtt-sample.patch
and it can be found in the queue-3.3 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From 96030da82358d976c3be492d91f050a51b7d00f1 Mon Sep 17 00:00:00 2001
From: Neal Cardwell <[email protected]>
Date: Tue, 10 Apr 2012 07:59:20 +0000
Subject: [PATCH 14/28] tcp: fix tcp_rcv_rtt_update() use of an unscaled RTT 
sample


From: Neal Cardwell <[email protected]>

[ Upstream commit 18a223e0b9ec8979320ba364b47c9772391d6d05 ]

Fix a code path in tcp_rcv_rtt_update() that was comparing scaled and
unscaled RTT samples.

The intent in the code was to only use the 'm' measurement if it was a
new minimum.  However, since 'm' had not yet been shifted left 3 bits
but 'new_sample' had, this comparison would nearly always succeed,
leading us to erroneously set our receive-side RTT estimate to the 'm'
sample when that sample could be nearly 8x too high to use.

The overall effect is to often cause the receive-side RTT estimate to
be significantly too large (up to 40% too large for brief periods in
my tests).

Signed-off-by: Neal Cardwell <[email protected]>
Acked-by: Eric Dumazet <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
 net/ipv4/tcp_input.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -472,8 +472,11 @@ static void tcp_rcv_rtt_update(struct tc
                if (!win_dep) {
                        m -= (new_sample >> 3);
                        new_sample += m;
-               } else if (m < new_sample)
-                       new_sample = m << 3;
+               } else {
+                       m <<= 3;
+                       if (m < new_sample)
+                               new_sample = m;
+               }
        } else {
                /* No previous measure. */
                new_sample = m << 3;


Patches currently in stable-queue which might be from [email protected] are

queue-3.3/tcp-fix-tcp_maxseg-for-established-ipv6-passive-sockets.patch
queue-3.3/tcp-allow-splice-to-build-full-tso-packets.patch
queue-3.3/tcp-fix-tcp_grow_window-for-large-incoming-frames.patch
queue-3.3/tcp-fix-tcp_rcv_rtt_update-use-of-an-unscaled-rtt-sample.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to