From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf0-x244.google.com (mail-lf0-x244.google.com [IPv6:2a00:1450:4010:c07::244]) (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 034FA3B2A4 for ; Fri, 6 Jul 2018 08:45:37 -0400 (EDT) Received: by mail-lf0-x244.google.com with SMTP id a4-v6so9706763lff.5 for ; Fri, 06 Jul 2018 05:45:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=phogCFRfoWLSstQCSu38JgjL+5QOvuesO470/09bPMk=; b=rSczAJ5rJQa/IeUVGXE7HeYuD2qH8VR6XDpvyWS0GmT6pSDOetLGVZuBW5K49Hkk99 xDFxv1sQDqvdowwYCYbZeycWnFn6DcmxbuWnI2ZFcRO2BBDz2Y0z1lXAzNNuohIZzM9t jgvSJIhavLVh+1zy8GdjL4r6+F1Rc+hmlkHWnX3XDRTtaeyRPqyS798Wc1pOeRc0zsu1 E+79YHSl0N/pr2fKQRdTXbefesuWmbHbeO0x1jTh2p8cC7UrdKN8JxW1kJg1INSrYbvS yetUOHSqM9CsYjSiuTn5zbVfv2tBoEprYdjKIHlg+jz0BfP8AZUCvxBptRzotAE/w0xV Av2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=phogCFRfoWLSstQCSu38JgjL+5QOvuesO470/09bPMk=; b=XSmQXVxzgoWPe8WOCCfxmkIjHojFXu+4cfBlmla0iPTVhglShgQGiiMUgYr9Gce/ky lpHX6lJNmo/jYFdiI4LMUW8MlI65BoB1F/ftCGV8VxJI9vb4nXDPpDZ0bSIdz4q6qnN5 triH3iRib3fi4U4gxM011cLbDpz//5pYQjeBr8EXADpvEkktMSgNGtg1/VCdW1tCdbhE xpzxHPzwW0RBieOWaU7nIfYcD8e8rsyzzQPEb8/anQdDrHqIJ5kaXlM8lb/r/RZhLl7t 3aCrmrE1emrh/H1w4ncR2IFk4fljXoAVUwwQfBRLNQLvrs3Pc1qONXeROoMsZuhGndDM vwow== X-Gm-Message-State: APt69E30FFOkxcbhAQoEQBbpnKYDM28rAq86GHzWsIbb73gykwS6hTNX IqJGhY+DB+tbDJs8X3WcF/U= X-Google-Smtp-Source: AAOMgpdPXSvFhX1Es65TRdPJ4Ax3FXCam2X2hPdSAtpoun+8HZCX1HUSduIcyOSBKadhore1ja6Rmg== X-Received: by 2002:a19:ef13:: with SMTP id n19-v6mr7728158lfh.48.1530881136950; Fri, 06 Jul 2018 05:45:36 -0700 (PDT) Received: from [192.168.239.216] (83-245-233-230-nat-p.elisa-mobile.fi. [83.245.233.230]) by smtp.gmail.com with ESMTPSA id s2-v6sm1266631ljd.16.2018.07.06.05.45.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Jul 2018 05:45:36 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 11.4 \(3445.8.2\)) From: Jonathan Morton In-Reply-To: <87a7r4bmlk.fsf@toke.dk> Date: Fri, 6 Jul 2018 15:45:34 +0300 Cc: cake@lists.bufferbloat.net Content-Transfer-Encoding: quoted-printable Message-Id: References: <20180706115745.2791-1-toke@toke.dk> <87a7r4bmlk.fsf@toke.dk> To: =?utf-8?Q?Toke_H=C3=B8iland-J=C3=B8rgensen?= X-Mailer: Apple Mail (2.3445.8.2) Subject: Re: [Cake] [PATCH] Keep an internal counter for total queue length 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: Fri, 06 Jul 2018 12:45:38 -0000 > On 6 Jul, 2018, at 3:00 pm, Toke H=C3=B8iland-J=C3=B8rgensen = wrote: >=20 > Toke H=C3=B8iland-J=C3=B8rgensen writes: >=20 >> Since sch->q.qlen can be changed from outside cake, we can't rely on = it for >> break loops etc. So keep an internal counter that mirrors it and use = that >> for all checks. >=20 > Sent this as a patch to avoid stepping on your toes if you are working > on the code now :) I'm handling it without using any extra permanent state, just making use = of what's already there. Take a look at latest commit. - Jonathan Morton