From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.toke.dk (mail.toke.dk [45.145.95.4]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.bufferbloat.net (Postfix) with ESMTPS id B56043CB38 for ; Wed, 4 Aug 2021 15:29:19 -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=1628105358; bh=ss851UZ09rGyCKXq1cs4p/HhsDTz60pt6jH7j9f10bo=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=EGtfUO0OKmvrx9iFoafNwwzBO/LvMMkk/g7iTl5ttHzbvKzVSBxdPGQ4ykwGrBNRn PaastyN39nDog5ghRtr4UZR5KAgiSiQQd/1yJxEw22zxMkXQp0xlAlUnnqzsVRoxM7 asZWSEb7mG+yC5E1NegR3LcmZxfLsKjvkpJGzjVGTyN9Jl43lN4F9dJyIrQKFVcDTl 84GwP0ySPJxmwb4aRwc79r2GnmErbsHc6YWuCaQa4SBwHJSe8b7vC2LC1trZQr4kkZ aWfsd+htIhhqxUhw7gITFax7yps0aw6TdZon99dxcwQ8hp8FweqtQiGPX2Rjhrd43G 3zMOyXwKKDGNg== To: Jonathan Morton Cc: Pete Heist , Cake List In-Reply-To: References: <3ebc0a3ccdcfa67a48c5ad764ce3389782633fef.camel@heistp.net> <87r1f95und.fsf@toke.dk> Date: Wed, 04 Aug 2021 21:29:16 +0200 X-Clacks-Overhead: GNU Terry Pratchett Message-ID: <87o8ad57qr.fsf@toke.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Cake] cake srchost/dsthost stopped working? 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: Wed, 04 Aug 2021 19:29:19 -0000 Jonathan Morton writes: > On Wed, 4 Aug 2021 at 14:14, Toke H=C3=B8iland-J=C3=B8rgensen via Cake > wrote: >> >> Pete Heist writes: >> >> > One more tip, reverting this commit seems to fix it: >> > >> > https://github.com/torvalds/linux/commit/b0c19ed6088ab41dd2a727b60594b= 7297c15d6ce >> >> Ah, I think I see what the problem is; could you please try the patch >> below? >> >> -Toke >> >> diff --git a/net/sched/sch_cake.c b/net/sched/sch_cake.c >> index 951542843cab..a83c4d4326da 100644 >> --- a/net/sched/sch_cake.c >> +++ b/net/sched/sch_cake.c >> @@ -720,7 +720,7 @@ static u32 cake_hash(struct cake_tin_data *q, const = struct sk_buff *skb, >> skip_hash: >> if (flow_override) >> flow_hash =3D flow_override - 1; >> - else if (use_skbhash) >> + else if (use_skbhash && flow_mode & CAKE_FLOW_FLOWS) >> flow_hash =3D skb->hash; >> if (host_override) { >> dsthost_hash =3D host_override - 1; > > Good catch - I was going to have to wade in and remind myself how this > lump of code worked. But shouldn't the masking operation be in > brackets, to make the precedence explicit? Well, seeing as I introduced the bug, I think it's only fair that I fix it as well ;) I don't mind adding parenthesis; can do so when submitting a patch, after Pete confirms that this fixes the issue... -Toke