From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mail.toke.dk; dkim=none; arc=none (Message is not ARC signed); dmarc=fail (Used From Domain Record) header.from=toke.dk policy.dmarc=none From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= To: Jamal Hadi Salim Cc: netdev@vger.kernel.org, Jiri Pirko , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Victor Nogueira , =?utf-8?B?Qmo=?= =?utf-8?B?w7ZybiBUw7ZwZWw=?= , cake@lists.bufferbloat.net, Sashiko In-Reply-To: References: <87wlrdwof7.fsf@toke.dk> Date: Tue, 20 Oct 2026 10:58:42 +0200 X-Clacks-Overhead: GNU Terry Pratchett Message-ID: <875wywvjct.fsf@toke.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-MailFrom: toke@toke.dk X-Mailman-Rule-Hits: implicit-dest X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header Message-ID-Hash: 7LUR2C2L2LVYCETRP3QD7FIP4J4Z2ZP5 X-Message-ID-Hash: 7LUR2C2L2LVYCETRP3QD7FIP4J4Z2ZP5 X-Mailman-Approved-At: Tue, 20 Oct 2026 10:59:01 +0200 X-Mailman-Version: 3.3.10 Precedence: list Subject: [Cake] Re: [PATCH net-next v7 1/4] net/sched: cake, fq_codel: return the classifier result to the caller List-Id: Cake - FQ_codel the next generation Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Jamal Hadi Salim writes: > On Mon, Oct 19, 2026 at 2:11=E2=80=AFPM Toke H=C3=B8iland-J=C3=B8rgensen = wrote: >> >> Jamal Hadi Salim writes: >> >> > The Fix: >> > cake and fq_codel run an optional external classifier from their enque= ue >> > 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 requ= est >> > 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