[Codel] Fwd: Re: "Controlling Queue Delay" article...

Jim Gettys jg at freedesktop.org
Tue May 8 10:47:07 EDT 2012


On 05/08/2012 10:38 AM, Eric Dumazet wrote:
Let's try to keep things on list...
                - Jim

> On Mon, 2012-05-07 at 20:06 -0700, Kathleen Nichols wrote:
>> Okay, some more tweaks or fixes. I'm finally going through code slowly
>> and also
>> traces from sims. This fix makes it act more like the code I used to do
>> all those
>> sims. mea culpa, but hey, you guys pushed us, so caveat emptor.
>>
>> in dodqueue:
>>
>> dodeque_result codel_queue_t::dodeque(time_t now)
>> {
>>       dodeque_result r = { 0, queue::deque() };
>>       if (r.p == NULL) {
>>             first_above_time = 0;
>>       } else {
>>             time_t sojourn_time = now - r.p->tstamp;
>>             if (sojourn_time < target) {
>>                   // went below so we'll stay below for at least interval
>>                   first_above_time = 0;
>>             } else {
>>                   if (first_above_time == 0) {
>>                         // just went above from below. if we stay above
>>                         // for at least interval we'll say it's ok to drop
>>                         first_above_time = now + interval;
>>                   } else if (now >= first_above_time && bytes() >=
>> maxpacket) {
>>                         r.ok_to_drop = 1;
>>                   }
>>             }
>>       }
>>       return r;
>> }
>
> Ack, I will change our code to match this.
>
> Thanks
>
>




More information about the Codel mailing list