netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Fix tcp_hybla zero congestion window growth with small rho and large cwnd
@ 2008-10-04 15:34 Daniele Lacamera
  2008-10-07 22:58 ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Daniele Lacamera @ 2008-10-04 15:34 UTC (permalink / raw)
  To: netdev; +Cc: Carlo Caini, rfirrincieli

[-- Attachment #1: Type: text/plain, Size: 389 bytes --]

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).

Please apply.

Signed-off-by: Daniele Lacamera <root@danielinux.net>



[-- Attachment #2: hybla_not_incrementing_cwnd.patch --]
[-- Type: text/x-diff, Size: 576 bytes --]

diff -ruN a/net/ipv4/tcp_hybla.c b/net/ipv4/tcp_hybla.c
--- a/net/ipv4/tcp_hybla.c	2008-07-13 23:51:29.000000000 +0200
+++ b/net/ipv4/tcp_hybla.c	2008-10-04 16:57:54.000000000 +0200
@@ -150,7 +150,12 @@
 		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);


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] Fix tcp_hybla zero congestion window growth with small rho and large cwnd
@ 2008-10-06 17:26 Daniele Lacamera
  2008-10-06 17:40 ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Daniele Lacamera @ 2008-10-06 17:26 UTC (permalink / raw)
  To: shemminger, davem; +Cc: netdev, Carlo Caini, rfirrincieli

[-- Attachment #1: Type: text/plain, Size: 431 bytes --]

(Sorry for repost, but I've got no reply.)

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 #snd_cwnd calls
without increments(newreno behavior).

Please apply.

Signed-off-by: Daniele Lacamera <root@danielinux.net>




[-- Attachment #2: hybla_not_incrementing_cwnd.patch --]
[-- Type: text/x-diff, Size: 577 bytes --]

diff -ruN a/net/ipv4/tcp_hybla.c b/net/ipv4/tcp_hybla.c
--- a/net/ipv4/tcp_hybla.c	2008-07-13 23:51:29.000000000 +0200
+++ b/net/ipv4/tcp_hybla.c	2008-10-04 16:57:54.000000000 +0200
@@ -150,7 +150,12 @@
 		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);



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Fix tcp_hybla zero congestion window growth with small rho and large cwnd
  2008-10-06 17:26 [PATCH] Fix tcp_hybla zero congestion window growth with small rho and large cwnd Daniele Lacamera
@ 2008-10-06 17:40 ` David Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2008-10-06 17:40 UTC (permalink / raw)
  To: root; +Cc: shemminger, netdev, ccaini, rfirrincieli

From: Daniele Lacamera <root@danielinux.net>
Date: Mon, 06 Oct 2008 19:26:37 +0200

> (Sorry for repost, but I've got no reply.)

Getting no reply for a few days doesn't mean anything.

Stephen and I have been away in Europe for more than a week.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Fix tcp_hybla zero congestion window growth with small rho and large cwnd
  2008-10-04 15:34 Daniele Lacamera
@ 2008-10-07 22:58 ` David Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2008-10-07 22:58 UTC (permalink / raw)
  To: root; +Cc: netdev, ccaini, rfirrincieli

From: Daniele Lacamera <root@danielinux.net>
Date: Sat, 04 Oct 2008 17:34:57 +0200

> 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>

I mad a slight coding style fix and then applied
your patch to net-2.6 as follows.

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>

diff --git a/net/ipv4/tcp_hybla.c b/net/ipv4/tcp_hybla.c
index bfcbd14..c209e05 100644
--- a/net/ipv4/tcp_hybla.c
+++ b/net/ipv4/tcp_hybla.c
@@ -150,7 +150,11 @@ static void hybla_cong_avoid(struct sock *sk, u32 ack, u32 in_flight)
 		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);

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-10-07 22:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-06 17:26 [PATCH] Fix tcp_hybla zero congestion window growth with small rho and large cwnd Daniele Lacamera
2008-10-06 17:40 ` David Miller
  -- strict thread matches above, loose matches on Subject: below --
2008-10-04 15:34 Daniele Lacamera
2008-10-07 22:58 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).