Cake - FQ_codel the next generation
 help / color / mirror / Atom feed
From: Jonathan Morton <chromatix99@gmail.com>
To: Shefali Gupta <shefaligups11@gmail.com>
Cc: Cake List <cake@lists.bufferbloat.net>
Subject: Re: [Cake] Query regarding COBALT implementation in CAKE
Date: Tue, 22 Jan 2019 11:04:50 +0200	[thread overview]
Message-ID: <67EAA65F-C379-490F-80EF-05051E19A780@gmail.com> (raw)
In-Reply-To: <CAFp5xQ700EDRa59LUL9g=FywPHndjNYttpP_0GMLCXM1MVbUQA@mail.gmail.com>

> On 22 Jan, 2019, at 10:29 am, Shefali Gupta <shefaligups11@gmail.com> wrote:
> 
> 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 = 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


  reply	other threads:[~2019-01-22  9:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-22  8:29 Shefali Gupta
2019-01-22  9:04 ` Jonathan Morton [this message]
2019-01-22  9:12   ` Jonathan Morton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.bufferbloat.net/postorius/lists/cake.lists.bufferbloat.net/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=67EAA65F-C379-490F-80EF-05051E19A780@gmail.com \
    --to=chromatix99@gmail.com \
    --cc=cake@lists.bufferbloat.net \
    --cc=shefaligups11@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox