From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com [209.85.212.181]) (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 021BA208AD0 for ; Sun, 17 Jun 2012 19:40:20 -0700 (PDT) Received: by wibhn14 with SMTP id hn14so1109378wib.10 for ; Sun, 17 Jun 2012 19:40:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=88va7kFQjJH57sPjAJv/P9MQImQDQePkTekfellSLfs=; b=ks82NFZfGEBw68HBTXq4UBEra5U1karRiP+kpzzzOyPPqQgAU++eiS4PsD+Nujl097 mWNC15K8A4gyx5LOqJsNRESpEIbU33EPZNGISfdnesBh/7ayDo9hTEa/unbfQZGxfoeJ Acc1NPVyETGTkEYhYO7CfntLO72lPy2DQLTXbUl6b/A37Lco8hN0l1mOAdRHLIu2FyAE VbGykSYnJbWRvwv4dbFIqP2uXOB7FUHtXj+2YyZjDBw4xkcQ8OHeufIxmS/oGvClkOuV CgRqQF1qo3k8gOYMQYJ8QV1fZLiaBtcGUaV/yeYHLBmY8v9bwf0169inYUa9N18qEQtL uBJg== MIME-Version: 1.0 Received: by 10.180.82.198 with SMTP id k6mr20369470wiy.20.1339987218762; Sun, 17 Jun 2012 19:40:18 -0700 (PDT) Received: by 10.223.103.199 with HTTP; Sun, 17 Jun 2012 19:40:18 -0700 (PDT) In-Reply-To: <1339985869.7491.262.camel@edumazet-glaptop> References: <1339972217-19159-1-git-send-email-dave.taht@bufferbloat.net> <1339985869.7491.262.camel@edumazet-glaptop> Date: Sun, 17 Jun 2012 22:40:18 -0400 Message-ID: From: Dave Taht To: Eric Dumazet Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: codel@lists.bufferbloat.net, =?ISO-8859-1?Q?Dave_T=E4ht?= 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:40:21 -0000 On Sun, Jun 17, 2012 at 10:17 PM, Eric Dumazet wro= te: > On Sun, 2012-06-17 at 15:30 -0700, Dave T=E4ht 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. I LIKE ecn. I like it enabled by default on fq_codel. I wouldn't mind if it was enabled by default on everything... if we knew how to handle it. >> My choice of "2 * target" as a threshold for dropping ECN >> marked packets is entirely arbitrary. >> --- >> =A0include/net/codel.h | =A0 =A06 ++++-- >> =A01 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 *s= ch, >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 * since there is no more divide >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 */ >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 codel_Newton= _step(vars); >> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (params->ec= n && INET_ECN_set_ce(skb)) { >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (params->ec= n && INET_ECN_set_ce(skb) && >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 vars->ldelay <=3D 2 * params->target) { >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 stats->ecn_mark++; >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 vars->drop_next =3D >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 codel_control_law(vars->drop_next, >> @@ -305,7 +306,8 @@ static struct sk_buff *codel_dequeue(struct Qdisc *s= ch, >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 } >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 } >> =A0 =A0 =A0 } else if (drop) { >> - =A0 =A0 =A0 =A0 =A0 =A0 if (params->ecn && INET_ECN_set_ce(skb)) { >> + =A0 =A0 =A0 =A0 =A0 =A0 if (params->ecn && INET_ECN_set_ce(skb) && >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 vars->ldelay <=3D 2 * params->= target) { >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 stats->ecn_mark++; >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 } else { >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 qdisc_drop(skb, sch); > > Hmm, while I understand the idea, patch is wrong. so we are in agreement tho that ECN packets should be dropped in some circumstances? > if (A && B && C) > > Even if (C) is false, but A is true, B is evaluated. A is always true (or always false) B in this case is usually false except on the kinds of ECN-heavy workloads that exposed this issue and C is probably higher overhead than A or B So a better conditional is possible... > Also, a 2 * target value is arbitrary, why not instead provide a real > attribute, that user can set with tc command ? In part, that's why this is an RFC. I didn't want to introduce a tc change at this late date (tho it can be done) with all the binary packages (openwrt, fedora, ubuntu) that just landed. I did want to open up a discussion of what would be sane - is 2 * target sane? 8 * target sane? or thinking about sojourn time a little harder sane? Or for example, like SFB, identifying unresponsive flows, instead, sane. I'm allergic to knobs, too. So... my next patch was going to be to the ns3 sim unless andrew beat me to it. (side note, I noticed fq_codel defaulted to 10k packets which is rather excessive for tiny routers - I just trimmed that down significantly for cerowrt and the upcoming 3.3.8-4 release has the rfc patch in it) And apologies for not seeing this long ago, I'm only just now catching up on things somewhat, I hope we can do some benchmarks at various bandwidths and be able to see what works well under a variety of conditions. > > > _______________________________________________ > Codel mailing list > Codel@lists.bufferbloat.net > https://lists.bufferbloat.net/listinfo/codel --=20 Dave T=E4ht SKYPE: davetaht http://ronsravings.blogspot.com/