From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by huchra.bufferbloat.net (Postfix, from userid 1000) id 142DC200AEE; Sun, 17 Jun 2012 15:30:37 -0700 (PDT) From: =?UTF-8?q?Dave=20T=C3=A4ht?= To: codel@lists.bufferbloat.net Date: Sun, 17 Jun 2012 15:30:17 -0700 Message-Id: <1339972217-19159-1-git-send-email-dave.taht@bufferbloat.net> X-Mailer: git-send-email 1.7.1 Cc: =?UTF-8?q?Dave=20T=C3=A4ht?= Subject: [Codel] [RFC PATCH] Codel: Enable packet drop with ECN-marked packets on a threshold X-BeenThere: codel@lists.bufferbloat.net X-Mailman-Version: 2.1.13 Precedence: list List-Id: CoDel AQM discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jun 2012 22:30:37 -0000 Lossless IP networks are not possible. Dropping packets is the fastest way to get back to a target delay, and if that involves dropping ECN marked packets, so be it. When a network is in a more steady state, ECN is fine... My choice of "2 * target" as a threshold for dropping ECN marked packets is entirely arbitrary. --- include/net/codel.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/net/codel.h b/include/net/codel.h index 550debf..26944a0 100644 --- a/include/net/codel.h +++ b/include/net/codel.h @@ -280,7 +280,8 @@ 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)) { + if (params->ecn && INET_ECN_set_ce(skb) && + vars->ldelay <= 2 * params->target) { stats->ecn_mark++; vars->drop_next = codel_control_law(vars->drop_next, @@ -305,7 +306,8 @@ static struct sk_buff *codel_dequeue(struct Qdisc *sch, } } } else if (drop) { - if (params->ecn && INET_ECN_set_ce(skb)) { + if (params->ecn && INET_ECN_set_ce(skb) && + vars->ldelay <= 2 * params->target) { stats->ecn_mark++; } else { qdisc_drop(skb, sch); -- 1.7.9.5