🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #5409

Re: [PATCH net-next v7 1/4] net/sched: cake, fq_codel: return the classifier result to the caller

#5409
From: Jamal Hadi Salim
Date: Tue, 20 Oct 2026 10:06
53 lines
13936 bytes
On Tue, Oct 20, 2026 at 4:58 AM Toke Høiland-Jørgensen <toke@toke.dk> wrote:
>
> 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 :)

Ok, i will drop it ;->

cheers,
jamal
> -Toke
Technical Details
Message-ID: <CAM0EoMmd9ojgk9ePsW2=FxZq3Koh-ZS+OhUSAU0YuSCS-szEXw@mail.gmail.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-349183-linux-kernel-netdev=dewy.ru
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> <875wywvjct.fsf@toke.dk>

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-349183-linux-kernel-netdev=dewy.ru
From: jhs@mojatatu.com (Jamal Hadi Salim)
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 06:06:51 -0400
Organization: Usenet Network
Message-ID: <CAM0EoMmd9ojgk9ePsW2=FxZq3Koh-ZS+OhUSAU0YuSCS-szEXw@mail.gmail.com>
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>
 <875wywvjct.fsf@toke.dk>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Injection-Info: usenet.network;
	logging-data="3827069"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:EtvcEMViTSwhbYvwv44P47F9T7s= sha256:TD6UO8mpYePVeTqQFGEOgwbC9oGtXO9kMEQBZj/Dvqo=
	sha1:4hvZsEnyfuB83WlyMaU76AF5hKc= sha256:4eo+Q6TMsunbXO+gktGodi97wKwSgmmkxlfmsh7O2KI=
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 62678110C84; Tue, 20 Oct 2026 13:07:27 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.049
X-Spam-Status: No, score=-3.049 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.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, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (1024-bit key)
	header.d=mojatatu.com
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 ZeLuWw6kMvoo;
	Tue, 20 Oct 2026 13:07:20 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-349183-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=mojatatu.com
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
	by mail.dewy.ru (Postfix) with ESMTPS id 440D6110C22; Tue, 20 Oct 2026 13:07:11 +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 1247425054; Tue, 20 Oct 2026 10:07:07 +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=3; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1792490825;
	b=FOID6dE0ayjsWjMLw5FbqE5Bjkl5bNkSrQplG3ZfaHlKpR3WiaLWn6XXqGIfr3PWhb3P
	 /omiKO2dOR34HidkEgne6EtYs6/z0Q+fUvHcQXvrxiogxZQZ3ztBk0dOc/XTTr1nm46BU
	 okQanWNOs47dh863KSzzb0sOBAD6zynZDGRfZdw4FFms9bJ9qD1pFnG8viaOUutIbGc5m
	 swt9UGC1AAqn6USwiS2/n/TCUrcX0Y7uN2lgiCkZSD39yCIegbcOnWw2G+YN+HC7VAzEJ
	 kVUGsg2j31li9/f2Yi5AR9JWzgsXQ6ityFThuDPCqli8slFWhUV7x23VWoCbuXNzAjQ==
X-ARC-Message-Signature: i=3; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792490825;
	h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
	 X-Google-DKIM-Signature:X-Gm-Message-State:X-Gm-Gg:X-Received:
	 X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
	 List-Unsubscribe:List-Owner:Precedence:MIME-Version:References:
	 In-Reply-To:From:Date:X-Gm-Features:Message-ID:Subject:To:Cc:
	 Content-Type:Content-Transfer-Encoding;
	bh=gqk4kcmRoMaSTvrG4XMjC0bfnvl+ByKIzfnkUV+Ycig=;
	b=MRH1cUqIk9ORr+XyVOdryQUcZV5XeBbwSFNsp6rhqCDzU57DO5KKvcZCCzlsFg1rjZD2
	 COT/5hIegwqH6ukzXYoMdfabqwxylL5PQD4EFCWrZe087equsQQGQo8gh9Pl+B9WJG+qK
	 9g9JdPFP+NUeFlZbewSjXthwsN/80s9A0wHo69tX6OSRGsuNtxwTXd8AXmpB6sXsrnBZ7
	 MmEBmKlDc/DdRN7Vju0QXkVvc8+9hbwyXS3nv2oKJHimnz0xQlaP6EGeeTC39yFl1dbXq
	 tIn9CfU5ZOLSP3lmXNptjPUr+rgPq6+4hbCPIO7k33I9Fg+HLwOOY7vWl021wODd5/A==
X-ARC-Authentication-Results: i=3; smtp.subspace.kernel.org; 
	dkim=pass header.d=mojatatu.com header.i=@mojatatu.com header.a=rsa-sha256 header.s=google header.b="O/E3ln4Z";
	dmarc=none header.from=mojatatu.com;
	spf=none smtp.mailfrom=mojatatu.com;
	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 2BCB0606A323;
	Tue, 20 Oct 2026 10:07:05 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (1024-bit key, unprotected) header.d=mojatatu.com header.i=@mojatatu.com header.a=rsa-sha256 header.s=google header.b=O/E3ln4Z
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=209.85.210.182
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1792490824;
	b=S26UCBUKIPHEpb4Ida6spdy3ksepAhDLjZIvPd6wcat7idWNs7L/0V6QoWuMQXaMjVxu
	 v/CrUNmnxG7dzy/K7sSgkySum7Sgoki04oADErLHZi9tK3nadN3+xIgMZ7Z0XR6EXXUIu
	 JybbC2FYinDigbKJpIuJK3bLurygSu9Ph9Kokx54l3Go7FMWgmOR/fntEbzbQZI3cyTLQ
	 rP39CSjk6UQDO4H4YrfL2ObrAN86eT5/heoJYu8dPTrZisJt2dbm/r41ETuKSvjk9kK65
	 rGrgLXNn/0V8znKCAvdxsNc6Bxe2UTHRWaikv83QTCiq3RWuDYElCbb0/mVFfn8etRw==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792490824;
	h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
	 X-Gm-Message-State:X-Gm-Gg:X-Received:MIME-Version:References:
	 In-Reply-To:From:Date:X-Gm-Features:Message-ID:Subject:To:Cc:
	 Content-Type:Content-Transfer-Encoding;
	bh=gqk4kcmRoMaSTvrG4XMjC0bfnvl+ByKIzfnkUV+Ycig=;
	b=uqWqFB+i294UrHqiSVTYMVKu2XFPd49hzyQmBBpLqOau8pvIkLxMo8gza4IlueuTeSQg
	 jahJ+b3Aan84bSf5sYQJsLPuK4xLF+K0K3o0UjS/rpVtqDF/PsZ6cDgK3QEFKLbEY8uxr
	 RFTP5D0AwySDhjy1fNxCoo4pmF9UzJZtSeud4o2bmJpYBvjlUXCPmBbUYfsa9TLh9HgBU
	 1U7cuII32sYv1EbfsaRCGfgGvFXJOtzB6w2AAqVR/rZ60Qnr3zCmsapqMZ2dXT/5BaVhE
	 CwdM8tdkNA+9wr8tu2HOa3JUFCL7k20SHQZLhZqunapmo1Wu10/yyCz0QZyvIUt1mmw==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dmarc=none header.from=mojatatu.com;
	spf=none smtp.mailfrom=mojatatu.com;
	dkim=pass header.d=mojatatu.com header.i=@mojatatu.com header.a=rsa-sha256 header.s=google header.b="O/E3ln4Z";
	arc=pass header.oldest-pass=0 smtp.remote-ip=209.85.210.182
X-Received: from mail-pf1-f182.google.com (mail-pf1-f182.google.com [209.85.210.182])
	(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9BBED606A31A
	for <netdev@vger.kernel.org>; Tue, 20 Oct 2026 10:07:03 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 9BBED606A31A
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=mojatatu.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=mojatatu.com
X-Received: by mail-pf1-f182.google.com with SMTP id d2e1a72fcca58-8a070781f63so754352b3a.1
        for <netdev@vger.kernel.org>; Tue, 20 Oct 2026 03:07:03 -0700 (PDT)
X-ARC-Seal: i=1; a=rsa-sha256; t=1792490823; cv=none;
        d=google.com; s=arc-20260327;
        b=VuvL+zALw4gnYfHQtVXmgd8yazlVGDrJ0B9kcfmL803n/1CNEFOejCCnh8MwmD2rGJ
         8KGYHSHWOgpkohcDd5ixSWmpA05PFqO3aqCZnqwsj88dNLxgdxBwP3zAke7zbzgFCTPs
         JDwy3NNvhh2RRflkRlQpl9Pt+5OAx7wNig9fePCc6eoUqJC2CU1hI3hdd+rYKWpfXw6x
         yZ9cOVwWzIn7Uysn8M+LzQwxvtc3FhB4eeq6EsA959cyi+U8H3YLMgnvP18i24snx1gN
         nm10PmRkNTIIT3yRqQzPYZ1NvHyfB6JT4i+JrNjgMBLYteRRb/1uC0MlMPdFBOlFgNgj
         PJXw==
X-ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327;
        h=content-transfer-encoding:cc:to:subject:message-id:date:from
         :in-reply-to:references:mime-version:dkim-signature;
        bh=gqk4kcmRoMaSTvrG4XMjC0bfnvl+ByKIzfnkUV+Ycig=;
        fh=xmp1vX2ksVRtN/ju6J6bqhuSKfOgjk3q1XA6KuGu+8E=;
        b=srh/rH9NeC7t9o5k5WxUkGWGFt0KE12v+Lry3yn4LoGZLm7Pq+Ta/eEXW/vLYVkUeG
         f1bT68EZ68aRtF9IrvoX/EwbOrDAeQlaJEpUm/I6E6drKBRtUpIoVYR/GNYbmW5i4lF9
         Q+78HOEc1IZU7XZNtxWLQtfPQY+NcExxizzaddSsX/QBUR6Qqhxk0hLd+FOmX2frRbNw
         U6Yv8338eMmJ4m46THx3DBTJkWCV144MB+rjZzFpS/egffvq3WC19jutTFzzROrWl7Jt
         C69haWhCME1wnNSXGWkaWA0RgUUU1V4socdJPL22dYkLRUMhu9+DDI1Wh/O9iahkDE1E
         HVqw==;
        darn=vger.kernel.org
X-ARC-Authentication-Results: i=1; mx.google.com; arc=none
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=mojatatu.com; s=google; t=1792490823; x=1793095623; darn=vger.kernel.org;
        h=content-transfer-encoding:content-type:cc:to:subject:message-id
         :date:from:in-reply-to:references:mime-version:from:to:cc:subject
         :date:message-id:reply-to:content-type;
        bh=gqk4kcmRoMaSTvrG4XMjC0bfnvl+ByKIzfnkUV+Ycig=;
        b=O/E3ln4ZT1QrN8datpby5kBaHVYt1svAKGkJ8Ebe4n83jlGoaZukaTtlldeWViC7QF
         Si2Nxa9hKCxQq02xQFxZ1YIiNIVbLELP2pQb5RAOcZw53Sel87yu2qZ3lR601azbnOA9
         pk+PxlLczu5OO6RkacD5aVueVNKt+6hanQGfE=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20260707; t=1792490823; x=1793095623;
        h=content-transfer-encoding:content-type:cc:to:subject:message-id
         :date:from:in-reply-to:references:mime-version:x-gm-gg
         :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to
         :content-type;
        bh=gqk4kcmRoMaSTvrG4XMjC0bfnvl+ByKIzfnkUV+Ycig=;
        b=vy4d+y0NAzKNBk4jit7Zsa4ZJfK9EfWTyuY/pbKObUBYOQHBxv9HnqsAzpg/YPvDH7
         nxL6y3ygKD85b3sI8FnMR63qjF229bzHKaLyEOhjU/U0KZxQH0WfnFk5258fINr5CDEn
         5L76uH1SRxz1rxstPemez/Zq8xF73oAwG+gC8Vhl4K2MVZsjYugpBZ3IWmA6g9xcQlce
         zaL1WM5PWoxA7n5VHqF+P48Fo8hTS70oCWDEXGxNxCB0FK/AJ3vSE+3Euqwfxd77DNmf
         Xko2y/goIitJzDEZDTqnvq3Bsm6sfSfNMD07IDckf0q/uUi8pDnb2BetjHDUNx1wPz8n
         /I7A==
X-Gm-Message-State: AFq9FYKZQ9iCeCdAnDECbM6+uwrIrTg+QzuZBnGVnkp8Eqgwfhi7ELHZ
	hD010WySXv0DX5/x+j5L4rNIBUTd59Exh7RXvWUgmRhtIaFgRJG+jOKXpsK7hhSskcfqt/6mSM4
	04L6MNY2a+cwM6/MACN9QPfo3gAvQ+zExp7PxUETj
X-Gm-Gg: AYBFou2OGbeaUmMreptXY6rFewGa5SnVSNzZfy+leEMzkcgezRC/UoaW+zKy4JxLnZd
	dKJeAVVaUK20tGXp617ngLMSL64Ur+Z4SWujLKEa7Mb5396beKv3uEMcuq29TrBtpCTCSwW3R9r
	lJRX6KasZFg8hvgBtUFdiWw7yfv3EgtddIZAuXWWSWCJdNOizjvKKc9j0Rh6FYkUqiTwWt9ZTng
	coqJzy0IhCQ2aWmtlxDf5JhKeaUgIlUv//4oPFaMQAFBqHnUjcpI43zMh3uQGpbN5WsSxeEJyKO
	+0I56Av/VTtfXPE/683Yej89RXNZc8kYdThVrwQH8Y2GXusphSJCjYlzyhirOtDUCGANAl/qIjo
	UQZYO6w0djTBCI+7XvP1/1sQ+iSLvhqm6vw==
X-Received: by 2002:a05:6a00:10c7:b0:881:fffd:26ab with SMTP id
 d2e1a72fcca58-8a04be37532mr8001944b3a.24.1792490822862; Tue, 20 Oct 2026
 03:07:02 -0700 (PDT)
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
X-In-Reply-To: <875wywvjct.fsf@toke.dk>
X-Gm-Features: AclHuK8PGEkccFOWafkEkHCeXxJeERy7lXG0VwKRnOb1QP0RMA5crHAy1snL_Kk
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>