CoDel AQM discussions
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Dave Taht <dave.taht@gmail.com>
Cc: codel@lists.bufferbloat.net, "Dave Täht" <dave.taht@bufferbloat.net>
Subject: Re: [Codel] [RFCv2 PATCH] codel: add ecn_target for when to drop rather than mark ecn packets
Date: Mon, 25 Jun 2012 17:20:17 +0200	[thread overview]
Message-ID: <1340637617.10893.56.camel@edumazet-glaptop> (raw)
In-Reply-To: <CAA93jw711o_2jr_5f6zN2qpKVkD_fa5V2NUuOZA5KYHZSqpm1Q@mail.gmail.com>

On Mon, 2012-06-25 at 07:50 -0700, Dave Taht wrote:
> On Sun, Jun 24, 2012 at 10:22 PM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> > On Sun, 2012-06-24 at 22:00 -0700, Dave Täht wrote:
> >> From: Dave Taht <dave.taht@bufferbloat.net>

> >>                               codel_Newton_step(vars);
> >> -                             if (params->ecn && INET_ECN_set_ce(skb)) {
> >> +                             if (params->ecn &&
> >> +                                 params->ecn_target > vars->ldelay &&
> >
> > Wrong test ?
> >
> > We want ECN if delay < ecn_target, not if delay > ecn_target
> >
> > (unresponsive flows will make delay being above ecn_target, while
> > responsive ones should make delay more like target ( < en_target)
> >
> > if (params->ecn &&
> >    vars->ldelay <= params->ecn_target &&
> >    INET_ECN_set_ce(skb)) {
> 
> The orig is the same test, as params->ecn_target > vars->ldelay
> is equivalent to vars->ldelay <= params->ecn_target

Yes, I must say I dont like the testing of a variable against a LIMIT
using

  if (LIMIT > variable)

I prefer for readability 

  if (variable < LIMIT)

If you take a look at linux code, your form is very seldom used.

> My own mental debate was whether to switch ecn from a bool to being a
> codel_time_t,
> and use a value of 0 for noecn and whatever for the ecn target value.

Well, why not.



  reply	other threads:[~2012-06-25 15:20 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-25  5:00 [Codel] [RFCv2 PATCH] iproute2: Add ecn_target option to codel and fq_codel Dave Täht
2012-06-25  5:00 ` [Codel] [RFCv2 PATCH] codel: add ecn_target for when to drop rather than mark ecn packets Dave Täht
2012-06-25  5:22   ` Eric Dumazet
2012-06-25 14:50     ` Dave Taht
2012-06-25 15:20       ` Eric Dumazet [this message]
2012-06-25 15:30         ` Dave Taht
2012-06-25 15:45           ` Eric Dumazet
2012-06-25 17:48             ` Jonathan Morton
2012-06-25 18:25               ` Dave Taht
2012-06-25 18:51                 ` Eric Dumazet
2012-06-25  5:24 ` [Codel] [RFCv2 PATCH] iproute2: Add ecn_target option to codel and fq_codel Eric Dumazet
2012-06-25  5:29 ` Eric Dumazet
2012-06-25 14:54   ` Dave Taht

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/codel.lists.bufferbloat.net/

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

  git send-email \
    --in-reply-to=1340637617.10893.56.camel@edumazet-glaptop \
    --to=eric.dumazet@gmail.com \
    --cc=codel@lists.bufferbloat.net \
    --cc=dave.taht@bufferbloat.net \
    --cc=dave.taht@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