From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f175.google.com (mail-wi0-f175.google.com [209.85.212.175]) (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 6D07E208AD0 for ; Sun, 17 Jun 2012 20:01:51 -0700 (PDT) Received: by wibhn6 with SMTP id hn6so1116519wib.10 for ; Sun, 17 Jun 2012 20:01:49 -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=zEZZrkaNYd6SqPBRuJqlAkK2602j5O2nA9+9RKjipPQ=; b=pm0e5MzTgcDIywzIsl9MCW4A9IDeRBbQE9yYdiwIr6HwROzGXdNCX7tx7TDYf1h75f Nk0aLc5n+TlDKeDzMRo+7yUJ5Xe8sEMKTwgcOv7Rp7E6TQ9F0QcKWB6IsZffrTx0wtB8 5BJDYP2VEGeWdhCIn5PrY0gsJwIDh2h59OQkNtr9fp7Fza0Uxlh/28e9Y1UK0cz1OLnV 1RIAgS3TV94SMOjl7nL4lNznAAU5HbWQJJTjlVRaXDy38qXiWFZD3DCyQeDu5UYvcyu/ Raxkw+FDAeG5jfDIBFIE3KhjgzfFP/4Qiv58OifoOQfdTIxyvUJSqYrMY25u9H94WEjj 5/1w== MIME-Version: 1.0 Received: by 10.180.88.194 with SMTP id bi2mr20480933wib.20.1339988509108; Sun, 17 Jun 2012 20:01:49 -0700 (PDT) Received: by 10.223.103.199 with HTTP; Sun, 17 Jun 2012 20:01:48 -0700 (PDT) In-Reply-To: <1339988306.7491.306.camel@edumazet-glaptop> References: <1339972217-19159-1-git-send-email-dave.taht@bufferbloat.net> <1339985869.7491.262.camel@edumazet-glaptop> <1339988306.7491.306.camel@edumazet-glaptop> Date: Sun, 17 Jun 2012 23:01:48 -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 03:01:51 -0000 On Sun, Jun 17, 2012 at 10:58 PM, Eric Dumazet wro= te: > On Sun, 2012-06-17 at 22:40 -0400, Dave Taht wrote: >> On Sun, Jun 17, 2012 at 10:17 PM, Eric Dumazet = wrote: > >> > 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... > > Not only better, but _correct_ ;) > > To have a chance to be correct, your patch should have been : > > > if (params->ecn && > =A0 =A0vars->ldelay <=3D 2 * params->target && > =A0 =A0INET_ECN_set_ce(skb)) > > Because INET_ECN_set_ce(skb) is _doing_ ecn marking, and returns true is > ECN was successfully applied to the packet. heh. OK, point taken, patch corrected here. I am averaging one bug per two lines of code... --=20 Dave T=E4ht SKYPE: davetaht http://ronsravings.blogspot.com/