netdev
[Top] [All Lists]

Re: [PATCH] (2/4) packet scheduler bad TDIFF_SAFE in csz

To: Stephen Hemminger <shemminger@xxxxxxxx>
Subject: Re: [PATCH] (2/4) packet scheduler bad TDIFF_SAFE in csz
From: "David S. Miller" <davem@xxxxxxxxxx>
Date: Tue, 29 Jun 2004 14:45:06 -0700
Cc: netdev@xxxxxxxxxxx
In-reply-to: <20040629140016.4afeb36b@xxxxxxxxxxxxxxxxxxxxx>
References: <20040629140016.4afeb36b@xxxxxxxxxxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
On Tue, 29 Jun 2004 14:00:16 -0700
Stephen Hemminger <shemminger@xxxxxxxx> wrote:

> This code in the csz scheduler, is just plain broken.  The TDIFF_SAFE 
> effectively expands to:
>       unsigned long delay = now - q->t_c;
>       if (delay > 0) {
>               delay = 0;
>               goto do_reset;
>       }
>       if (delay >> q->delta_log)
> 
> So delay is always 0!  I assume that what was originally intended
> is the to keep delay bounded to 1<<q->delta_log. 

This bug has been there since day one, wow.

Good spotting, applied.

<Prev in Thread] Current Thread [Next in Thread>