From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.toke.dk (mail.toke.dk [52.28.52.200]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.bufferbloat.net (Postfix) with ESMTPS id 99D5B3BA8E for ; Sun, 12 Aug 2018 15:42:45 -0400 (EDT) From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=toke.dk; s=20161023; t=1534102964; bh=MTn96QQMh+BG6IxQCJEKmDLMAuL6e/Tl/H5zLplTXTI=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=ToOwGqn5VSg5b8jKOuILJoUbrbvRpQgzu3rGtOSUoyPAqtT54PDE/7k3xEnt/2Xlz ahNQ8QVYGgsPgVS8IM5JeRHJVvq171yyE/zSQNE+emyxpEK1djAfWUg/jyud9U2GGX 1jd/0di1rPh9nn55U+QXm+27OAVqZuhCKpFLaPVD/mnDcHYtGeRYmB2jcx7/HXc8fs F8ZJZkR9PaEtmmr6sGhsUF+qjtRDuiRNVepU36ye5SD8lUGGVNxZgO2/2cy2h4Qf5o oExOOzfyifMb934JvTMZ7TZTIZ2Q4gGnjJyS/TgksgscAfhNElNNgQHlgIss9Xpdfa GZS+ooJ4qeNNg== To: Jonathan Morton , Pete Heist Cc: Cake List In-Reply-To: References: Date: Sun, 12 Aug 2018 21:42:47 +0200 X-Clacks-Overhead: GNU Terry Pratchett Message-ID: <87h8jze5hk.fsf@toke.dk> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Cake] issue with Cake and bpf filter 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: Sun, 12 Aug 2018 19:42:45 -0000 Jonathan Morton writes: >> On 12 Aug, 2018, at 1:23 pm, Pete Heist wrote: >> >> One more thing to add to this, when working with another bpf filter which is relatively similar to this simple one (although has some more innocuous looking code like map lookups and read-only operations on the skb) sometimes the attached is suddenly and repeatedly sent to both syslog and kern.log until the disk fills up... > >> Aug 12 09:57:25 ubuntu kernel: [ 2408.152975] WARNING: CPU: 3 PID: 2304 at /home/a/src/sch_cake/sch_cake.c:2094 cake_dequeue+0x791/0xc70 [sch_cake] > >> WARN_ON(host_load > CAKE_QUEUES); > > Yeah, something is going seriously wrong here. It shouldn't be > possible for that warning to trigger; if it is, then Cake's internal > data structures are being corrupted somehow. > > But Cake doesn't directly read tc_classid from an skb. So what could > it be influencing? Yes it does; setting tc_classid is one way to set the flow class that is read by the call to tcf_classify(). I guess the problem is that cake_hash() is bypassed, so the *host_refcnt variables are not incremented. There's been another report of the same issue on github; haven't had time to look into it yet, but I guess this is the reason... I guess there are two options here; either always run the hashing algorithm to select the host hashes, or make sure the srchost/dsthost fields are set to 0 when tc classification is used. I think the latter is the better approach; but I'm not sure if it's enough to just set the fields to 0? There seem to be unconditional decrements of the refcnts in multiple places? -Toke