Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 27922b4260f65d317aabda37e42bbbff > files > 3151

kernel-2.6.18-238.el5.src.rpm

From: Thomas Graf <tgraf@redhat.com>
Date: Fri, 23 Jul 2010 15:35:19 -0400
Subject: [net] tcp: tcp_hybla zero congestion window growth fix
Message-id: <20100723153519.GK14925@lsx.localdomain>
Patchwork-id: 27069
O-Subject: [RHEL5.6 PATCH 9/14] tcp: Fix tcp_hybla zero congestion window
	growth with small rho and large cwnd.
Bugzilla: 612709
RH-Acked-by: Neil Horman <nhorman@redhat.com>
RH-Acked-by: David S. Miller <davem@redhat.com>

commit 9d2c27e17b7574023b5adb5c6a50d7aaeb915543
Author: Daniele Lacamera <root@danielinux.net>
Date:   Tue Oct 7 15:58:17 2008 -0700

    tcp: Fix tcp_hybla zero congestion window growth with small rho and large cwnd.

    Because of rounding, in certain conditions, i.e. when in congestion
    avoidance state rho is smaller than 1/128 of the current cwnd, TCP
    Hybla congestion control starves and the cwnd is kept constant
    forever.

    This patch forces an increment by one segment after #send_cwnd calls
    without increments(newreno behavior).

    Signed-off-by: Daniele Lacamera <root@danielinux.net>
    Signed-off-by: David S. Miller <davem@davemloft.net>

Signed-off-by: Jarod Wilson <jarod@redhat.com>

diff --git a/net/ipv4/tcp_hybla.c b/net/ipv4/tcp_hybla.c
index 7406e0c..b81db5a 100644
--- a/net/ipv4/tcp_hybla.c
+++ b/net/ipv4/tcp_hybla.c
@@ -149,7 +149,11 @@ static void hybla_cong_avoid(struct sock *sk, u32 ack, u32 rtt,
 		ca->snd_cwnd_cents -= 128;
 		tp->snd_cwnd_cnt = 0;
 	}
-
+	/* check when cwnd has not been incremented for a while */
+	if (increment == 0 && odd == 0 && tp->snd_cwnd_cnt >= tp->snd_cwnd) {
+		tp->snd_cwnd++;
+		tp->snd_cwnd_cnt = 0;
+	}
 	/* clamp down slowstart cwnd to ssthresh value. */
 	if (is_slowstart)
 		tp->snd_cwnd = min(tp->snd_cwnd, tp->snd_ssthresh);