Article View: linux.kernel.netdev
Article #5368Re: [PATCH net-next v7 1/4] net/sched: cake, fq_codel: return the classifier result to the caller
From: Toke Høiland-Jørgensen
Date: Tue, 20 Oct 2026 08:58
Date: Tue, 20 Oct 2026 08:58
43 lines
9108 bytes
9108 bytes
Jamal Hadi Salim <jhs@mojatatu.com> writes: > On Mon, Oct 19, 2026 at 2:11 PM Toke Høiland-Jørgensen <toke@toke.dk> wrote: >> >> Jamal Hadi Salim <jhs@mojatatu.com> writes: >> >> > The Fix: >> > cake and fq_codel run an optional external classifier from their enqueue >> > path and then compute the flow hash inside the helper. Have the helper >> > return the filter's overrides (cake) or a 1-based flow index or a request >> > to hash (fq_codel) instead, so the caller owns the flow selection. >> > >> > This is preparation for the accounting changes that follow. Packet >> > classification and flow selection are unchanged. >> >> It's not clear to me why this change is needed at all for fq_codel? >> fq_codel_hash just does a reciprocal_scale() of the skb hash, it doesn't >> mutate any qdisc state. So why can't fq_codel_classify not just stay as >> it is? > > It is not functionaly needed for fq_codel, it is more because these > two are cousins and simplifies subsequent patches. > Note in patch 4 we force the same semantics on cake as in fq_codel > (classifier decides the drop, the caller owns flow selection). Keeping > fq_codel's classify the same makes patch 3 hunks in the two files > similar. There is another reason: the old helper encoded "drop" as a > magic return and carried the 1-based +1 arithmetic on every return > path. But you're not making the same change to fq_pie, although its classify function is line-for-line the same as fq_codel. I think it's better to keep those two the same; you can add the new check to fq_codel between the 'idx--' and 'codel_set_enqueue_time()' lines just fine. > In any case, unless you feel strongly i would rather keep it. Well, see above :) -Toke
Technical Details
Message-ID:
<875wywvjct.fsf@toke.dk>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-349124-linux-kernel-netdev=dewy.ruReferences:
<QDISC-BA27.v7.r0.20261019115505@mojatatu.com> <QDISC-BA27.v7.r0.20261019115505-1@mojatatu.com> <87wlrdwof7.fsf@toke.dk> <CAM0EoM=6joWtYQdkw0KheH0sEx0r1P7_+6aEt3235OQZSxD9Mg@mail.gmail.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-349124-linux-kernel-netdev=dewy.ru From: toke@toke.dk (Toke Høiland-Jørgensen) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next v7 1/4] net/sched: cake, fq_codel: return the classifier result to the caller Date: Tue, 20 Oct 2026 10:58:42 +0200 Organization: Usenet Network Message-ID: <875wywvjct.fsf@toke.dk> References: <QDISC-BA27.v7.r0.20261019115505@mojatatu.com> <QDISC-BA27.v7.r0.20261019115505-1@mojatatu.com> <87wlrdwof7.fsf@toke.dk> <CAM0EoM=6joWtYQdkw0KheH0sEx0r1P7_+6aEt3235OQZSxD9Mg@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: usenet.network; logging-data="3817198"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:elADfak47BMWEhnZYmruFA+rJ64= sha256:y3LVKgMbN4SYTyaeABagS+UErXfp7QAE37Me9km5yR4= sha1:o7ngL1ZOHizpQkp1tlaTjhjz7Zc= sha256:SJSsXXsSbscF6FcrBaSHxKZ8MA8p7bk1qfEMMiqoy48= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 45845110C4F; Tue, 20 Oct 2026 12:03:34 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -1.85 X-Spam-Status: No, score=-1.85 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIM_ADSP_ALL=1.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id W53NLT80uHFp; Tue, 20 Oct 2026 12:03:27 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-349124-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=toke.dk X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mail.dewy.ru (Postfix) with ESMTPS id 42DFB110C40; Tue, 20 Oct 2026 12:03:24 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by tor.lore.kernel.org (Postfix) with ESMTP id D4F1A28CF2; Tue, 20 Oct 2026 08:58:48 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1792486728; b=Xxb2wEa9+u5IqFeKxEdEtOCnvfRwZGTeAJabCizY5T6Z+O/xg5QxbyGC+xlTb+D4h5WN jjK/pwMSYC+hCePx7lKDg6kRmzMrOfW0hll/JbARIp0UJaG82RDPPId1uLXzuN0Ua7c5N xkW0TMUtJRF36IMPDfyFKLQqsHY0LbVUGUhXgZn4/OC2IgkLyQVgHJnh4k651Dpwn/ceQ nKdOFlIxAiX6sbGDQ8Du4an0YP4SIDAv52r+E5AaZ+sREd4DJDC6iGWHKyAbp/T6U5FZa jCbjbx/fXuNJJMJZ5vIwJIcQfoDU+WuPqYgijfMk2DhsVpwCWnHHA0/8admSbqsQpow== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792486728; h=X-Original-To:Received:DMARC-Filter:From:To:Cc:Subject:In-Reply-To: References:Date:X-Clacks-Overhead:Message-ID:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version:Content-Type:Content-Transfer-Encoding; bh=3x+CrrG+dFZ8FFxmxaWMhT1Ugs0r6n9Y3T1yru5EyC4=; b=JZaVhujNNvzHEiKWN1zZZcNWbFdwH/bSW3bPYo3Q6wFQ3chmY88bWllOy7rWOdq01sTr AZQ7UFaoALIyg+bET3upg1x4qm6W7zTGBkVWGzrDnh17FuBJc0i+R+hVY1d04It6ls5Ye K3cEn9o2LAw8IGGOdD62eoEXre6QHmzZMgmZH9aecRCNB91OLwuZWKCBW8fQt4f/RjROa fg7MU69eg3D4YH7l9GUpcVixmF6nVTYjT8NK4eIpX+KQwqW2mI8Vs/cUHL1C7k4b6Zxzw fhCfZ3VoynigFh3k0eL6UZkm7GUvgq0yfeXxIzaBo7mBxV52/TB2dfzFjkTqAWDbKXg== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass header.from=toke.dk; spf=pass smtp.mailfrom=toke.dk; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2CD80606A324; Tue, 20 Oct 2026 08:58:48 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=45.145.95.4 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1792486727; b=jcE6u0eRh1Jv7EYeOOYw59aLANUFgbhZfVSLzzQBkLmszDlyOD3Fu7EvSTohCIbDBNov jou3k38CmU/IueaUfMA9YQNKad7C94EmDyJMMCNQEPYi2eCBjSCkRBBajLnmNqWM9u0Ay wdqPAVMH+LDR4I7py/OSQZFFqCH5hT+59hkKVqSBLxjcgwg7qHiRbQLT6GfWQNrAy+iQf Cjpyox/2xhpO+mK9GEK6gAH7kB0zvjWTw94uwaCO0uB4QN3SkAsUAFMrYm4kkIu6q8NB+ LlPc11AI4jvKky5B3+iZM2sQV9un4Kz5Y3VL/lbbLX+O8btKMllcnhlW2fqy1mydOnw== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792486727; h=DMARC-Filter:From:To:Cc:Subject:In-Reply-To:References:Date: X-Clacks-Overhead:Message-ID:MIME-Version:Content-Type: Content-Transfer-Encoding; bh=3x+CrrG+dFZ8FFxmxaWMhT1Ugs0r6n9Y3T1yru5EyC4=; b=oQMyWWjoAs3etV7eUFwXeLgU+9niY5GTo2ERCF6vOezW0w3k+xJss8SyBNM23c3uH3da us35YOpZUgz79FUw2v7ZVQGrHjj0KnYDm7VygN3isWFkmeXRd4BkHrLmrnlTxvXVeoxZl cXR8gS2Tk1uAaDg90ilLj86r55f/N/ApuZG/SmVRk37haoSDTR/JYDispRB1xOVflM5/u V5+NmbqourDXgst7Fn5/SQMyvNAAVOBHlixQIdZYDatws+OBHEEqroCMja427yUB5uYDN dNg4akmwrswru9UCJwx6uSkZo6Lwkt8PMHkUIdnQjvHQ/1IRCuZpooqISSFuWlA9WyQ== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=toke.dk; spf=pass smtp.mailfrom=toke.dk; arc=none smtp.remote-ip=45.145.95.4 X-Received: from mail.toke.dk (mail.toke.dk [45.145.95.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3DB10606A31A for <netdev@vger.kernel.org>; Tue, 20 Oct 2026 08:58:45 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 3DB10606A31A X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=toke.dk X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=toke.dk X-Authentication-Results: mail.toke.dk; dkim=none X-Cc: netdev@vger.kernel.org, Jiri Pirko <jiri@resnulli.us>, "David S . Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@kernel.org>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>, Victor Nogueira <victor@mojatatu.com>, Björn Töpel <bjorn@kernel.org>, cake@lists.bufferbloat.net, Sashiko <sashiko-bot@kernel.org> X-In-Reply-To: <CAM0EoM=6joWtYQdkw0KheH0sEx0r1P7_+6aEt3235OQZSxD9Mg@mail.gmail.com> X-Clacks-Overhead: GNU Terry Pratchett X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list