From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) (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 6B14F3B2A4 for ; Tue, 22 Jan 2019 04:04:53 -0500 (EST) Received: by mail-lf1-x131.google.com with SMTP id i26so17513784lfc.0 for ; Tue, 22 Jan 2019 01:04:53 -0800 (PST) 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=VL/aUvMfBJFE7rk+t6BdbuyfMMzZXUgaWZ5YqqCbAXk=; b=WZdhqxSWVM6MYYIRcXL+JGgTD8ArRtNBN+LUrgPjeg73bZpuE39yAeVnwmKu+3Fg0i DIwRA7O9YH4PhuQX+2jA1GVx7ok1+CftPtuFmI1Tpv3TbHDbdX/Oo2rKumqUMI4YcSkf jjzszg6QyS7sTR9yDhwN+bNxrk7LX55mw5aH0Y0WqwjTloIGbb2SH0MIvKl46tKTW86E o91WTR2qnrZ5DAFEtipQQcL9NQCQ59WPLP2WUSgZPLFz3hGBpdZ9fkbSCUpwBlTKc2xN ots8eUKNPwbePxOJKuu1pdMa294xTC1o6m+5gdvtPzcLJeAKUGinOg5OVH1BAIdD0b+s D8Tg== 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=VL/aUvMfBJFE7rk+t6BdbuyfMMzZXUgaWZ5YqqCbAXk=; b=gdcDiRcGpdEoXkHJ54uRnRkjVzlzj8NFNmw65vZyHoXAJhcBU2SIk4gr6tuCnSwmMm SEw4XtvdzH3x0k4v6EbPgtzOO99IOSte//YDGUAYT7/3cs1KK7ENBYFs0BSD1EfvAy6g MmtvU25m/fMREDzmhh1sO6SQcQNbAhrn8VqffnUt+HO141AEboyOCNrZg2PTgCwGKbjG egG4fCtoqXOseyIR/QJHUkd5x2dVimYWX/xGZcN0e9kxHaQ2aBhomvzOvfJ11uStykck YHkrj0ThIXpnAu52Ts0PSJT7Pra6ezK5XIlhMRjeoi5EahMBKk889dEJGi0WDx7/7KCG bJPA== X-Gm-Message-State: AJcUuke0t9a3+ijQ0xA8VM0Ai+pRtz67126riblKum/pqaAP8I8yFZBp mXRQ8h7A/554dYmeOCi4sCk= X-Google-Smtp-Source: ALg8bN6zTtsHfAkv3bWqnW1tcdNyosfGrJZbfg4uQjN0gXkccA2rtoJYavQYox34k+A4zbTR3Gu17w== X-Received: by 2002:a19:c115:: with SMTP id r21mr20197439lff.144.1548147892181; Tue, 22 Jan 2019 01:04:52 -0800 (PST) Received: from jonathartonsmbp.lan (83-245-233-163-nat-p.elisa-mobile.fi. [83.245.233.163]) by smtp.gmail.com with ESMTPSA id d15-v6sm2728132lja.38.2019.01.22.01.04.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Jan 2019 01:04:51 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) From: Jonathan Morton In-Reply-To: Date: Tue, 22 Jan 2019 11:04:50 +0200 Cc: Cake List Content-Transfer-Encoding: quoted-printable Message-Id: <67EAA65F-C379-490F-80EF-05051E19A780@gmail.com> References: To: Shefali Gupta X-Mailer: Apple Mail (2.3445.9.1) Subject: Re: [Cake] Query regarding COBALT implementation in CAKE 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: Tue, 22 Jan 2019 09:04:53 -0000 > On 22 Jan, 2019, at 10:29 am, Shefali Gupta = wrote: >=20 > We are unable to understand how over_target variable is being used to = change the dropping state, on the line number 535 of CAKE code. A little earlier in the code, you can see how over_target is calculated. = It's simply a boolean decision: over_target =3D sojourn > p->target && sojourn > p->mtu_time * bulk_flows * 2 && sojourn > p->mtu_time * 4; There are three decision terms, all of which compare the sojourn time of = the current packet to some threshold, and all of which must be true for = over_target to be true, and thus for the Codel logic to enter dropping = state. In principle, it could be replaced by "sojourn > min(p->target, = p_mtu_time * min(4, bulk_flows * 2))", but that would be harder to lay = out readably in the Linux kernel's 80-column style. The middle term is not relevant for your implementation, because you = have a single-queue version of COBALT; you could consider bulk_flows as = being fixed at 1, so that term is always true when the last term is = true. The last term depends on p->mtu_time which is initialised whenever = Cake's shaper is reconfigured. It refers to the time required to stuff = an MTU-sized packet down the pipe. Since your implementation is not = closely integrated with a shaper and therefore you don't have an easy = way to calculate mtu_time, you may eliminate this term, and instead = manually configure the target to satisfy the same criterion. You can therefore simplify if(over_target) to if(sojourn > p->target) = for your purposes. - Jonathan Morton