From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk0-x22a.google.com (mail-qk0-x22a.google.com [IPv6:2607:f8b0:400d:c09::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.bufferbloat.net (Postfix) with ESMTPS id 3D7223B29E for ; Sat, 25 Nov 2017 15:03:10 -0500 (EST) Received: by mail-qk0-x22a.google.com with SMTP id 136so28077531qkd.4 for ; Sat, 25 Nov 2017 12:03:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language; bh=s3OgQ3j1S4PEZYEL+Hbk6hXbpStAMlORU2O/CjWi8xc=; b=RGrNObNNHFl0aG0Rzr+G7rldy+tF36xeHocYXOsbZNp+jt9k4b1Zw6j1ds+uapup4q +Q+mbp0KmqIjFdOLhRA3pGLvwt302ux3Lj8zPEkLZTRny83AC2Rt5cxjLRp9teMnh5Bc bWMCLsm5JqCENi6F4HiGIDScxBA/ECInduJCixS7Jp4xe+Qh2Lsi7uKaaRPssETsQxoq R4S58PDurLtMaQs9eHFiFDwJUCytJxK4561Gi9DSZwvVIsZpkIMufzklkJArXK6i5PdR IMTIxwO2Lj8pxyRrcf/RK6aFZbQsLXPQXTY7G87J11eB837DHv0FwLHac50wbdR1Hg/B GvTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=s3OgQ3j1S4PEZYEL+Hbk6hXbpStAMlORU2O/CjWi8xc=; b=Z09nxoqppYbbKe0WwzA/0NMndgICIlworZCTSaI4fNTE3+H+V28bLW+P4D84HZJhWc cxr3SHgGhkDOI4WWFng8kea5ef7oI6pAzqmOdmYBdtsviRhZwT2oY3qk0xjNffWLTiN5 jr4aw1C/a7BFxTu0sjo2z2xOSMXVLrN90QDkQPXUUbl53lGggkp+ExY//XRefNuBPc6b iyAS4EpmxPsUksLkbXR7uH8vS0CcodJexAguTXNg9ppCnAV9IxJ960j2DMUWYA+iCbps Uh80+AYPXzeLP/fVln9IL/M1hxa7km1yy5IEL1qISZQyfdWo5tn4BBYbZZ0LYXOT6FbL 6ZnA== X-Gm-Message-State: AJaThX4SteccHaXe23nFFHrgRhPJ+SVVNiNfa+rD3TrnMn64yty7Vcbi 4rW+r0ZNnfaO40aC3NrUZm13eOvw1sY= X-Google-Smtp-Source: AGs4zMaseEoPzPpT++ObWh2Qo6wVFJ3UZ9UvWxVtrXmhpGugQyZ7unnUuQ9JILIHcjDK6w8F+xE+yA== X-Received: by 10.55.12.199 with SMTP id 190mr51763059qkm.315.1511640189498; Sat, 25 Nov 2017 12:03:09 -0800 (PST) Received: from ?IPv6:2601:152:4300:cf35:40e0:f39e:973d:c56e? ([2601:152:4300:cf35:40e0:f39e:973d:c56e]) by smtp.gmail.com with ESMTPSA id y45sm14396148qtc.20.2017.11.25.12.03.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 25 Nov 2017 12:03:09 -0800 (PST) To: Jonathan Morton , Pete Heist Cc: Cake List References: <840D255A-5723-4D95-BEF3-50B411A7D0E8@darbyshire-bryant.me.uk> <0D923D70-F9A2-4CB9-A516-B6B80FF4967B@gmail.com> From: George Amanakis Message-ID: <07221ab0-2e71-aeff-17e7-54684f686a35@gmail.com> Date: Sat, 25 Nov 2017 15:03:08 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------382A21DA8B7C368412E9898A" Content-Language: en-US Subject: Re: [Cake] allocate_src allocate_dst X-BeenThere: cake@lists.bufferbloat.net X-Mailman-Version: 2.1.20 Precedence: list List-Id: Cake - FQ_codel the next generation List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Nov 2017 20:03:10 -0000 This is a multi-part message in MIME format. --------------382A21DA8B7C368412E9898A Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit 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@lists.bufferbloat.net > https://lists.bufferbloat.net/listinfo/cake --------------382A21DA8B7C368412E9898A Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit

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@lists.bufferbloat.net
https://lists.bufferbloat.net/listinfo/cake

--------------382A21DA8B7C368412E9898A--