This patch fix the chance for tcp_lp_remote_hz_estimator return 0, if
0 < rhz < 64. It also make sure the flag LP_VALID_RHZ is set
correctly.

Signed-off-by: Wong Hoi Sing Edison <[EMAIL PROTECTED]>

---

diff -urpN linux-2.6.18/net/ipv4/tcp_lp.c linux/net/ipv4/tcp_lp.c
--- linux-2.6.18/net/ipv4/tcp_lp.c      2006-09-20 11:42:06.000000000 +0800
+++ linux/net/ipv4/tcp_lp.c     2006-09-28 18:30:17.000000000 +0800
@@ -32,7 +32,7 @@
 * SourceForge project page:
 *   http://tcp-lp-mod.sourceforge.net/
 *
- * Version: $Id: tcp_lp.c,v 1.24 2006/09/05 20:22:53 hswong3i Exp $
+ * Version: $Id: tcp_lp.c,v 1.25 2006/09/22 20:50:27 hswong3i Exp $
 */

#include <linux/config.h>
@@ -165,7 +165,7 @@ static u32 tcp_lp_remote_hz_estimator(st

 out:
        /* record time for successful remote HZ calc */
-       if (rhz > 0)
+       if ((rhz >> 6) > 0)
                lp->flag |= LP_VALID_RHZ;
        else
                lp->flag &= ~LP_VALID_RHZ;
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to