[Codel] [RFC PATCH] Codel: Enable packet drop with ECN-marked packets on a threshold

Dave Taht dave.taht at gmail.com
Sun Jun 17 23:01:48 EDT 2012


On Sun, Jun 17, 2012 at 10:58 PM, Eric Dumazet <eric.dumazet at gmail.com> wrote:
> On Sun, 2012-06-17 at 22:40 -0400, Dave Taht wrote:
>> On Sun, Jun 17, 2012 at 10:17 PM, Eric Dumazet <eric.dumazet at gmail.com> wrote:
>
>> > if (A && B && C)
>> >
>> > Even if (C) is false, but A is true, B is evaluated.
>>
>> A is always true (or always false)
>> B in this case is usually false except on the kinds of ECN-heavy
>> workloads that exposed this issue
>> and C is probably higher overhead than A or B
>>
>> So a better conditional is possible...
>
> Not only better, but _correct_ ;)
>
> To have a chance to be correct, your patch should have been :
>
>
> if (params->ecn &&
>    vars->ldelay <= 2 * params->target &&
>    INET_ECN_set_ce(skb))
>
> Because INET_ECN_set_ce(skb) is _doing_ ecn marking, and returns true is
> ECN was successfully applied to the packet.

heh. OK, point taken, patch corrected here. I am averaging one bug per
two lines of code...



-- 
Dave Täht
SKYPE: davetaht
http://ronsravings.blogspot.com/



More information about the Codel mailing list