CoDel AQM discussions
 help / color / mirror / Atom feed
* [Codel] [RFC PATCH] codel: ecn mark at target
@ 2012-08-04  2:44 Dave Täht
  2012-08-04  6:45 ` Eric Dumazet
  2012-08-04  7:00 ` Roger Jørgensen
  0 siblings, 2 replies; 24+ messages in thread
From: Dave Täht @ 2012-08-04  2:44 UTC (permalink / raw)
  To: codel; +Cc: Dave Taht

From: Dave Taht <dave.taht@bufferbloat.net>

The consensus at ietf was that ecn marking should start at
target, and then the results fed into the codel drop scheduler.

While I agree with the latter, I feel that waiting an interval
before starting to mark will be more in-tune with the concept
of a sojourn time, and lead to better utilization.

As I am outnumbered and outgunned, do it at target.
---
 include/net/codel.h |   30 ++++++++++--------------------
 1 file changed, 10 insertions(+), 20 deletions(-)

diff --git a/include/net/codel.h b/include/net/codel.h
index 550debf..f06d99c 100644
--- a/include/net/codel.h
+++ b/include/net/codel.h
@@ -204,7 +204,7 @@ static codel_time_t codel_control_law(codel_time_t t,
 }
 
 
-static bool codel_should_drop(const struct sk_buff *skb,
+static bool codel_should_drop(struct sk_buff *skb,
 			      struct Qdisc *sch,
 			      struct codel_vars *vars,
 			      struct codel_params *params,
@@ -231,6 +231,9 @@ static bool codel_should_drop(const struct sk_buff *skb,
 		return false;
 	}
 	ok_to_drop = false;
+	/* Above target, start marking */
+	if (params->ecn && INET_ECN_set_ce(skb))
+		stats->ecn_mark++; 
 	if (vars->first_above_time == 0) {
 		/* just went above from below. If we stay above
 		 * for at least interval we'll say it's ok to drop
@@ -238,6 +241,7 @@ static bool codel_should_drop(const struct sk_buff *skb,
 		vars->first_above_time = now + params->interval;
 	} else if (codel_time_after(now, vars->first_above_time)) {
 		ok_to_drop = true;
+	/* dtaht: I think we should start marking here, instead */
 	}
 	return ok_to_drop;
 }
@@ -280,14 +284,6 @@ static struct sk_buff *codel_dequeue(struct Qdisc *sch,
 						* since there is no more divide
 						*/
 				codel_Newton_step(vars);
-				if (params->ecn && INET_ECN_set_ce(skb)) {
-					stats->ecn_mark++;
-					vars->drop_next =
-						codel_control_law(vars->drop_next,
-								  params->interval,
-								  vars->rec_inv_sqrt);
-					goto end;
-				}
 				qdisc_drop(skb, sch);
 				stats->drop_count++;
 				skb = dequeue_func(vars, sch);
@@ -305,16 +301,11 @@ static struct sk_buff *codel_dequeue(struct Qdisc *sch,
 			}
 		}
 	} else if (drop) {
-		if (params->ecn && INET_ECN_set_ce(skb)) {
-			stats->ecn_mark++;
-		} else {
-			qdisc_drop(skb, sch);
-			stats->drop_count++;
-
-			skb = dequeue_func(vars, sch);
-			drop = codel_should_drop(skb, sch, vars, params,
-						 stats, now);
-		}
+		qdisc_drop(skb, sch);
+		stats->drop_count++;
+		skb = dequeue_func(vars, sch);
+		drop = codel_should_drop(skb, sch, vars, params,
+					 stats, now);
 		vars->dropping = true;
 		/* if min went above target close to when we last went below it
 		 * assume that the drop rate that controlled the queue on the
@@ -336,7 +327,6 @@ static struct sk_buff *codel_dequeue(struct Qdisc *sch,
 		vars->drop_next = codel_control_law(now, params->interval,
 						    vars->rec_inv_sqrt);
 	}
-end:
 	return skb;
 }
 #endif
-- 
1.7.9.5


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

end of thread, other threads:[~2012-08-10 17:48 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-04  2:44 [Codel] [RFC PATCH] codel: ecn mark at target Dave Täht
2012-08-04  6:45 ` Eric Dumazet
2012-08-04 21:53   ` Kathleen Nichols
2012-08-05  3:06     ` Andrew McGregor
2012-08-05  5:30       ` Eric Dumazet
2012-08-05 16:53         ` Andrew McGregor
2012-08-05 16:58           ` Kathleen Nichols
2012-08-05 17:14             ` Andrew McGregor
2012-08-05 17:15           ` Eric Dumazet
2012-08-05 16:54         ` Richard Scheffenegger
2012-08-05 17:25           ` Eric Dumazet
2012-08-05 17:35             ` Eric Dumazet
2012-08-05 18:14               ` Yuchung Cheng
2012-08-05 18:40                 ` Eric Dumazet
2012-08-05 19:49                   ` Eric Dumazet
2012-08-06 16:22                   ` Richard Scheffenegger
2012-08-06 16:46                     ` Eric Dumazet
2012-08-06 17:50                       ` Dave Taht
2012-08-06 19:09                         ` Andrew McGregor
2012-08-06 20:01                           ` Eric Dumazet
2012-08-10 17:48                             ` Dave Taht
2012-08-04  7:00 ` Roger Jørgensen
2012-08-04 13:38   ` Richard Scheffenegger
2012-08-04 17:21     ` Eric Dumazet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox