From: "Toke Høiland-Jørgensen" <toke@toke.dk>
To: Jamal Hadi Salim <jhs@mojatatu.com>
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>
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 [thread overview]
Message-ID: <875wywvjct.fsf@toke.dk> (raw)
In-Reply-To: <CAM0EoM=6joWtYQdkw0KheH0sEx0r1P7_+6aEt3235OQZSxD9Mg@mail.gmail.com>
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
next prev parent reply other threads:[~2026-10-20 8:58 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-19 16:00 [PATCH net-next v7 0/4] net/sched: cap the accounted backlog before it can wrap Jamal Hadi Salim
2026-10-19 16:00 ` [PATCH net-next v7 1/4] net/sched: cake, fq_codel: return the classifier result to the caller Jamal Hadi Salim
2026-10-19 18:11 ` Toke Høiland-Jørgensen
2026-10-19 21:05 ` Jamal Hadi Salim
2026-10-20 8:58 ` Toke Høiland-Jørgensen [this message]
2026-10-20 10:06 ` Jamal Hadi Salim
2026-10-19 16:00 ` [PATCH net-next v7 2/4] net/sched: cake: use a dedicated split-GSO list iterator Jamal Hadi Salim
2026-10-19 18:11 ` Toke Høiland-Jørgensen
2026-10-19 16:00 ` [PATCH net-next v7 3/4] net/sched: cap the accounted backlog before it can wrap Jamal Hadi Salim
2026-10-19 18:20 ` Toke Høiland-Jørgensen
2026-10-19 21:08 ` Jamal Hadi Salim
2026-10-19 16:00 ` [PATCH net-next v7 4/4] net/sched: cake: hash before segmenting and reject an overlong split Jamal Hadi Salim
2026-10-19 18:32 ` Toke Høiland-Jørgensen
2026-10-19 21:35 ` Jamal Hadi Salim
2026-10-20 8:47 ` Toke Høiland-Jørgensen
2026-10-20 10:08 ` Jamal Hadi Salim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=875wywvjct.fsf@toke.dk \
--to=toke@toke.dk \
--cc=bjorn@kernel.org \
--cc=cake@lists.bufferbloat.net \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=horms@kernel.org \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sashiko-bot@kernel.org \
--cc=victor@mojatatu.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.