[Cake] allocate_src allocate_dst

George Amanakis gamanakis at gmail.com
Sat Nov 25 15:03:08 EST 2017


I think we missed an "allocate_host" in cake_hash(), line ~810:

if (allocate_host) {
             srchost_idx = srchost_hash % CAKE_QUEUES;
             inner_hash = srchost_idx % CAKE_SET_WAYS;
             outer_hash = srchost_idx - inner_hash;
             for (i = 0, k = inner_hash; i < CAKE_SET_WAYS;
                 i++, k = (k + 1) % CAKE_SET_WAYS) {
                 if (q->hosts[outer_hash + k].srchost_tag ==
                     srchost_hash)
                     goto found_src;
}


On 11/25/2017 2:04 PM, Jonathan Morton wrote:
>
> Gotos are fairly common in kernel code, chiefly for exception 
> handling.  Obviously structured code is still preferred where it makes 
> sense, but there are cases where it would actually confuse matters.
>
> I hope to be able to spend most of tomorrow going over the code as it 
> currently stands.  I even have an up-to-date net-next tree on one of 
> my machines to build against.
>
> - Jonathan Morton
>
>
>
> _______________________________________________
> Cake mailing list
> Cake at lists.bufferbloat.net
> https://lists.bufferbloat.net/listinfo/cake

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.bufferbloat.net/pipermail/cake/attachments/20171125/320e97f8/attachment.html>


More information about the Cake mailing list