From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nm17-vm3.bullet.mail.ne1.yahoo.com (nm17-vm3.bullet.mail.ne1.yahoo.com [98.138.91.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.bufferbloat.net (Postfix) with ESMTPS id E45FB3B29E for ; Wed, 12 Apr 2017 09:45:19 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1492004719; bh=2gIqeOOmmpi4obq6IT5y/WIq5/WX/sqdC1WlxboaRpA=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From:Subject; b=JrljIAqLykwLsMQXwOZxiY2vBgXEiVeW9gqVhNdwBlZ3TCGw4Mhjc0m1CKt/XHsE958/L3+OoCilStKgfJdMiFuNCUalndpR3i1E4gSeaPGBgsEhn3N5QNJx/EUfMr1PEQSxZNf8f8IDOTFDZ3uOljZsuwqBAjXYvbRR2/tk2d+SArKODUOvLmg6PcVJgXTDCQmK9TWZVVYtF8HFpLlrelsW0afjHyBxNf5bLM6mAfRHqGPXpghym7pJPv7WA+NEuS/0SWlvHOEwlsOPXkT8ygO8UOOlspkTsXdWfzbThb9ulSpMjV7GwCfnIJz2I9W7nHJffZNTBKuDGjk0TX3ytQ== Received: from [98.138.100.118] by nm17.bullet.mail.ne1.yahoo.com with NNFMP; 12 Apr 2017 13:45:19 -0000 Received: from [98.138.88.239] by tm109.bullet.mail.ne1.yahoo.com with NNFMP; 12 Apr 2017 13:45:19 -0000 Received: from [127.0.0.1] by omp1039.mail.ne1.yahoo.com with NNFMP; 12 Apr 2017 13:45:19 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 20396.21203.bm@omp1039.mail.ne1.yahoo.com X-YMail-OSG: Tso382AVM1kQbb65H8.wAuoZtc0w7rb.55bdtnf3rnjmQG41u9w0KWFn_sZUx6E xQ9Y8YyDogonr4XULD1grYdppTEECJ6fVcbL5IthhllAtHQhGaXf0wyL_P6qAlPGcB99SErZ4V0F R1JFwBchz8I_9nsGobvIcpqAJj.3rnWD4weJMl.DiUkIOk77Mr8bXXlioQtKKG1pAmOQTZBJBSwC gwoKji2WCB5BglMZT9kmj2cV6lEJuLLSrQvhsXjqEvHXI0QeLmU0H4aeTpEiwrSHx.FeYfKVLZf_ b7M262r2Rn_sqqS.MyVyz17j4ookCQUvw0ZXrD7UgUrrrPJeOZjHg_BXG3Qq8XlCka5Ky1baXH93 ckTZZ9ualfpnHi.xf3Pqc4HemjjYD6YLwpFCerJ3KNXBuKgycWTjl9bP2EEf0XuBLgWgkreC1cE5 QAZWtJq8oMkcWhi4jNJCOqL3XpH0nQOqlz64.IRw15bVmWplTyk3rzRYmG5kROEqGCz0xCqGVk_Z XDw4Lz7irpblNFt6kiTBECgFZXX8- Received: from jws200170.mail.ne1.yahoo.com by sendmailws141.mail.ne1.yahoo.com; Wed, 12 Apr 2017 13:45:18 +0000; 1492004718.582 Date: Wed, 12 Apr 2017 13:45:14 +0000 (UTC) From: George Amanakis To: xnor , Kevin Darbyshire-Bryant Cc: Message-ID: <1012846747.423736.1492004714038@mail.yahoo.com> In-Reply-To: References: <1698783902.612018.1491919195146.ref@mail.yahoo.com> <1698783902.612018.1491919195146@mail.yahoo.com> <322beef3-fd84-144c-6718-795eff0e4435@darbyshire-bryant.me.uk> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_423735_587588832.1492004714037" X-Mailer: WebService/1.1.9386 YMailNorrin Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.98 Safari/537.36 Subject: Re: [Cake] Choosing a tin to work on X-BeenThere: cake@lists.bufferbloat.net X-Mailman-Version: 2.1.20 Precedence: list List-Id: Cake - FQ_codel the next generation List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Apr 2017 13:45:20 -0000 ------=_Part_423735_587588832.1492004714037 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable >The last value less than or equal to zero will always win as best_tin. >If all tdiff values are positive then best_time will end up as the lowest = value however. I agree with xnoreq. The algorithm as it is will not always return the leas= t overdue tin.=C2=A0It returns either the lowest positive tdiff (if all tdi= ff values are positive), or the lowest negative one (if not all tdiff value= s are positive). This could be accomplished just with "if (tdiff<=3Dbest_ti= me)" as xnoreq pointed out. George ------=_Part_423735_587588832.1492004714037 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

>The last value less than or equal to zero will always win as best_tin.
>If all tdiff values are positive then best_time will end up as the lowest value however.

I agree with xnoreq. The algorithm as it is will not always return the least overdue tin. 
It returns either the lowest positive tdiff (if all tdiff values are positive), or the lowest negative one (if not all tdiff values are positive). This could be accomplished just with "if (tdiff<=best_time)" as xnoreq pointed out.

George
------=_Part_423735_587588832.1492004714037--