[Cake] [PATCH net-next v7 3/7] sch_cake: Add optional ACK filter

Toke Høiland-Jørgensen toke at toke.dk
Thu May 3 08:40:47 EDT 2018

kbuild test robot <lkp at intel.com> writes:

> Hi Toke,
> Thank you for the patch! Perhaps something to improve:
> [auto build test WARNING on net-next/master]
> url:    https://github.com/0day-ci/linux/commits/Toke-H-iland-J-rgensen/sched-Add-Common-Applications-Kept-Enhanced-cake-qdisc/20180503-073002
> coccinelle warnings: (new ones prefixed by >>)
>>> net/sched/sch_cake.c:1047:6-13: ERROR: PTR_ERR applied after
>>>initialization to constant on line 822

While attempting to fix this I realised that I didn't fully understand
the complex state keeping logic in the ACK filter. And rather than try
to do that, I thought I'd see what the simplest possible filter looks

So lo and behold:

This has the advantage of removing about a hundred lines of code, and
being way easier to follow (and thus review). And I think it still does
the right thing. The drawback is that it will loop from the head of the
queue every time it is invoked rather than try to "keep its place" as
the old version did.

I'm honestly not sure whether the efficiency gains are worth the complex
logic; we only gain something if there are both ACKs and non-ACKs in the
same queue.

Of course, if we *are* going to keep the old version, someone else is
going to step up to fix the warning above :)

What do you guys think?


More information about the Cake mailing list