[Cake] cake infinite loop(?) with hfsc on one-armed router

Toke Høiland-Jørgensen toke at toke.dk
Sat Jan 5 08:35:32 EST 2019


Pete Heist <pete at heistp.net> writes:

>> On Jan 5, 2019, at 2:10 PM, Toke Høiland-Jørgensen <toke at toke.dk> wrote:
>> 
>> Hmm, that's odd. Could you try adding this debugging line in
>> adjust_parent_qlen(), right before the sch->q.qlen += n line:
>> 
>> 		net_info_ratelimited("Adjusting parent qdisc %d with pkt += %d, len += %d",
>> 				     parentid, n, len);
>> 
>> And see if you actually get any of those lines in your dmesg?
>
>
> I do see the messages twice, then not after that in the rest of the
> output...

Right. Looking at the HFSC code some more, I think the bug is actually
caused by another, but related, interaction between HFSC and CAKE.

Specifically, this line:

https://elixir.bootlin.com/linux/v3.16.7/source/net/sched/sch_hfsc.c#L1605

where HFSC checks whether the child queue len is 1, which it interprets
as the event that activates that queue. However, because CAKE splits the
packet, this check will fail, and the HFSC class will not be activated.
This also explains why you only see the bug with HFSC, and not with HTB
(although I do think that we still need to update the hierarchy).

The good news it that it is a fairly simple to fix in HFSC. The bad news
is that it's something that's hard to work around from the out-of-tree
CAKE...

-Toke


More information about the Cake mailing list