From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f41.google.com (mail-wg0-f41.google.com [74.125.82.41]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (verified OK)) by huchra.bufferbloat.net (Postfix) with ESMTPS id 9D28C208AD0 for ; Sun, 17 Jun 2012 19:17:56 -0700 (PDT) Received: by wgbds1 with SMTP id ds1so1153221wgb.4 for ; Sun, 17 Jun 2012 19:17:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:from:to:cc:in-reply-to:references:content-type:date :message-id:mime-version:x-mailer:content-transfer-encoding; bh=6cgRFaWR8qaBoS3UhZi+jBtK39EqNYsBM1Os41YmOvM=; b=rgt3rB3EMLhssCGg+Q3ydEPLCYoJ3/eR4EFibf9hgFK4mC03sv/nKqLGEFdqGL7xDX 2chIP9oyUOruBo8pfzUexqAIlEywARYAnYLVoKqXM4rE9kwdSouSwsSn/4mT6NauCa04 1i9GDDh67FpoReqhuAb1697fu1tKcXK/4fYACvg0KS9piIJcmEt53mYQYjHzHVdkl7P7 pfLcg3YwDY9x/Du8wXAbTeI9ZtZzdvsfBr5sDAtLbzkBvaDbv8b+VVTuL/k2QIpqR8hv /uwAXa7/JCjBGQUNh91oSqQY6oXF7VUP+dQqDVO/i4cUAWNoa1RIVPVZtViij8REnMWH ihMA== Received: by 10.216.70.10 with SMTP id o10mr7835976wed.51.1339985870727; Sun, 17 Jun 2012 19:17:50 -0700 (PDT) Received: from [192.168.1.37] (122.237.66.86.rev.sfr.net. [86.66.237.122]) by mx.google.com with ESMTPS id gb9sm22762823wib.8.2012.06.17.19.17.48 (version=SSLv3 cipher=OTHER); Sun, 17 Jun 2012 19:17:49 -0700 (PDT) From: Eric Dumazet To: Dave =?ISO-8859-1?Q?T=E4ht?= In-Reply-To: <1339972217-19159-1-git-send-email-dave.taht@bufferbloat.net> References: <1339972217-19159-1-git-send-email-dave.taht@bufferbloat.net> Content-Type: text/plain; charset="UTF-8" Date: Mon, 18 Jun 2012 04:17:49 +0200 Message-ID: <1339985869.7491.262.camel@edumazet-glaptop> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Content-Transfer-Encoding: 8bit Cc: codel@lists.bufferbloat.net Subject: Re: [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: Mon, 18 Jun 2012 02:17:57 -0000 On Sun, 2012-06-17 at 15:30 -0700, Dave Täht wrote: > 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... > Just disable ecn then ? By the way ECN is disabled by default on CoDel. > 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); Hmm, while I understand the idea, patch is wrong. if (A && B && C) Even if (C) is false, but A is true, B is evaluated. Also, a 2 * target value is arbitrary, why not instead provide a real attribute, that user can set with tc command ?