[Cake] [PATCH] Keep an internal counter for total queue length

Toke Høiland-Jørgensen toke at toke.dk
Fri Jul 6 09:21:10 EDT 2018


Jonathan Morton <chromatix99 at gmail.com> writes:

>> On 6 Jul, 2018, at 3:00 pm, Toke Høiland-Jørgensen <toke at toke.dk> wrote:
>> 
>> Toke Høiland-Jørgensen <toke at toke.dk> writes:
>> 
>>> Since sch->q.qlen can be changed from outside cake, we can't rely on it for
>>> break loops etc. So keep an internal counter that mirrors it and use that
>>> for all checks.
>> 
>> Sent this as a patch to avoid stepping on your toes if you are working
>> on the code now :)
>
> I'm handling it without using any extra permanent state, just making
> use of what's already there. Take a look at latest commit.

Yup, that also fixes the infinite loop issue. I'm fine with doing it
this way; however, it doesn't handle the other places where we check
whether sch->q.qlen is nonzero. Are you sure that is not going to give
us more problems down the road? :)

-Toke


More information about the Cake mailing list