CoDel AQM discussions
 help / color / mirror / Atom feed
From: Dave Taht <dave.taht@gmail.com>
To: "Dave Täht" <dave.taht@bufferbloat.net>
Cc: codel@lists.bufferbloat.net
Subject: Re: [Codel] [PATCH 2/2] Clamp interval to 32 bits
Date: Sat, 5 May 2012 04:40:13 -0700	[thread overview]
Message-ID: <CAA93jw4dXsn+ZCQH+LtZLqBqKXE+q3RUS97Avjy2dHHaCZ+_NA@mail.gmail.com> (raw)
In-Reply-To: <1336217671-20384-1-git-send-email-dave.taht@bufferbloat.net>

On Sat, May 5, 2012 at 4:34 AM, Dave Täht <dave.taht@bufferbloat.net> wrote:
> ---
>  net/sched/sch_codel.c |    6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/net/sched/sch_codel.c b/net/sched/sch_codel.c
> index 636f505..d26db8c 100644
> --- a/net/sched/sch_codel.c
> +++ b/net/sched/sch_codel.c
> @@ -88,10 +88,10 @@ static unsigned int states;
>  * return interval/sqrt(x) with good precision
>  */
>
> -static u32 calc(u64 interval, unsigned long x)
> +static u32 calc(u32 _interval, unsigned long x)
>  {
> -       /* scale for 16 bits precision */
> -       while (x < (1UL << 30)) {
> +       u64 interval = _interval;
> +       while (x < (1UL << (BITS_PER_LONG - 2))) {
>                x <<= 2;
>                interval <<= 1;
>        }
> --
> 1.7.9.5
>

eric correctly pointed out that I'm crazy.

If I run either version of this with htb, it crashes after a brief load.

qdisc del dev eth0 root
qdisc add dev eth0 root handle 1: est 1sec 8sec htb default 1
class add dev eth0 parent 1: classid 1:1 est 1sec 8sec htb rate
2000kibit mtu 1500 quantum 1514
qdisc add dev eth0 parent 1:1 handle 10: est 1sec 4sec codel target
5ms interval 100ms limit 1000

I figure that's due to my still-botched netlink interface to the change routine.

I read some relevant code and the netlink doc and it's becoming more
clear but I'm going to bed.
handing off now.


-- 
Dave Täht
SKYPE: davetaht
US Tel: 1-239-829-5608
http://www.bufferbloat.net

  reply	other threads:[~2012-05-05 11:40 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-05 11:34 Dave Täht
2012-05-05 11:40 ` Dave Taht [this message]
2012-05-05 11:53   ` Eric Dumazet
2012-05-05 14:49     ` [Codel] [PATCH v5] pkt_sched: codel: Controlled Delay AQM Eric Dumazet
2012-05-05 16:11       ` Dave Taht
2012-05-05 17:07         ` Eric Dumazet
2012-05-05 17:22           ` Dave Taht
2012-05-05 18:54             ` [Codel] [PATCH iproute2] " Eric Dumazet
2012-05-05 19:08               ` Eric Dumazet
2012-05-05 21:30               ` Eric Dumazet
2012-05-06 18:56                 ` [Codel] [PATCH v8 " Eric Dumazet
2012-05-05 20:20       ` [Codel] [PATCH v5] pkt_sched: " Eric Dumazet
2012-05-05 20:36         ` Eric Dumazet
2012-05-05 21:11           ` Eric Dumazet
2012-05-05 21:12             ` dave taht
2012-05-05 21:20               ` Eric Dumazet
2012-05-05 21:28                 ` [Codel] [PATCH v6] " Eric Dumazet
2012-05-05 21:40                   ` Eric Dumazet
2012-05-05 21:58                   ` Eric Dumazet
2012-05-06 18:52                   ` [Codel] [PATCH v8] " Eric Dumazet
2012-05-06 19:51                     ` Eric Dumazet
2012-05-05 22:03                 ` [Codel] [PATCH v5] " dave taht
2012-05-05 22:09                   ` Eric Dumazet
2012-05-05 22:12                     ` Eric Dumazet
2012-05-05 22:16                       ` dave taht
2012-05-05 22:15                     ` dave taht
2012-05-05 22:34                     ` dave taht
2012-05-05 22:39                       ` Eric Dumazet
2012-05-05 22:48                         ` dave taht
2012-05-05 23:07                           ` Eric Dumazet
2012-05-05 23:19                             ` dave taht
2012-05-06  5:18                               ` Eric Dumazet
2012-05-05 23:09                           ` dave taht
2012-05-05 23:15                             ` 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=CAA93jw4dXsn+ZCQH+LtZLqBqKXE+q3RUS97Avjy2dHHaCZ+_NA@mail.gmail.com \
    --to=dave.taht@gmail.com \
    --cc=codel@lists.bufferbloat.net \
    --cc=dave.taht@bufferbloat.net \
    /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