Netdev List
 help / color / mirror / Atom feed
From: netdev-bot+sashiko@kernel.org
To: jhs@mojatatu.com
Cc: netdev@vger.kernel.org, davem@davemloft.net, edumazet@kernel.org,
	kuba@kernel.org, pabeni@redhat.com, horms@kernel.org,
	jiri@resnulli.us, stephen@networkplumber.org,
	vinicius.gomes@intel.com, toke@toke.dk, victor@mojatatu.com,
	bjorn@kernel.org, sashiko-bot@kernel.org
Subject: Re: [PATCH net-next v13 4/4] net/sched: cake: hash before segmenting and reject an overlong split
Date: Sat, 28 Nov 2026 12:08:48 +0000	[thread overview]
Message-ID: <179586772803.3135.8375156947766643480@kernel.org> (raw)
In-Reply-To: <QDISC-BA27.v13.r0.20261127065026-4@mojatatu.com>

Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.

Low priority / nit picks for your consideration:

- [Low] The subject "hash before segmenting" and the "The Fix:" paragraph
  ("Key extraction must run on the unsegmented skb -- skb_gso_segment()…

--

net/sched: cake: hash before segmenting and reject an overlong split

This patch splits cake_hash() into a side-effect-free cake_hash_keys()
and a cake_hash_resolve() that runs only after admission. It moves the
split-GSO segmentation ahead of the resolution and refuses a split whose
segment sum would push the backlog past U32_MAX, or which an ancestor
cannot absorb, tagging every dropped segment with QDISC_DROP_OVERLIMIT.
The flow mode is now read once with READ_ONCE().

Link: https://lore.kernel.org/netdev/179231933068.3135.80340792633077986@kernel.org/
Link: https://lore.kernel.org/netdev/179269577270.3135.16072065138845192450@kernel.org/

> net/sched: cake: hash before segmenting and reject an overlong split
>
> The Fix: with CAKE_FLAG_SPLIT_GSO, cake computes the flow keys and then
> splits a GSO skb into segments it accounts individually. Key extraction
> must run on the unsegmented skb -- skb_gso_segment() can rewrite
> encapsulated headers to the inner ones -- and resolution must wait until
> admission, since it commits set-associative state a later rejection would
> leave mutated.

[Severity: Low]
Is "hash before segmenting" accurate as a description of what this
patch changes? Before this patch, cake_enqueue() already hashed the
unsegmented skb, ahead of the split block:

    b = cake_select_tin(sch, skb);
    idx = cake_hash(b, skb, q->config->flow_mode, flow_override,
                    host_override) + 1;
    ...
    if (qdisc_pkt_segs(skb) > 1 && q->config->rate_flags & CAKE_FLAG_SPLIT_GSO) {
            ...
            segs = skb_gso_segment(skb, features & ~NETIF_F_GSO_MASK);

The earlier patches in the series ("return the classifier result to the
caller" and "use a dedicated split-GSO list iterator") keep this order.
So keys were always taken from the unsegmented skb.

The change to hashing goes the other way. The stateful set-associative
part (q->tags[], host tags, bulk counters, now cake_hash_resolve()) moves
after skb_gso_segment() and after the overlimit / ancestor refusal that
this same patch adds.

In the old code, the only rejection that came after the state-committing
cake_hash() was a skb_gso_segment() failure. The message doesn't mention
that case.

The body sentence "move the split-GSO path ahead of the resolution" is
accurate. The subject and the "The Fix:" paragraph, though, could make a
reader such as a stable backporter think cake used to hash segmented
skbs with rewritten inner headers.

Would a subject such as "resolve the flow only after the split is
admitted" describe the change more precisely?

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/QDISC-BA27.v13.r0.20261127065026%40mojatatu.com

      reply	other threads:[~2026-11-28 12:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-27 11:57 [PATCH net-next v13 0/4] net/sched: cap the accounted backlog before it can wrap Jamal Hadi Salim
2026-11-27 11:57 ` [PATCH net-next v13 1/4] net/sched: cake: return the classifier result to the caller Jamal Hadi Salim
2026-11-27 11:57 ` [PATCH net-next v13 2/4] net/sched: cake: use a dedicated split-GSO list iterator Jamal Hadi Salim
2026-11-27 11:57 ` [PATCH net-next v13 3/4] net/sched: cap the accounted backlog before it can wrap Jamal Hadi Salim
2026-11-28 12:08   ` netdev-bot+sashiko
2026-11-28 16:26     ` Jamal Hadi Salim
2026-11-27 11:57 ` [PATCH net-next v13 4/4] net/sched: cake: hash before segmenting and reject an overlong split Jamal Hadi Salim
2026-11-28 12:08   ` netdev-bot+sashiko [this message]

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=179586772803.3135.8375156947766643480@kernel.org \
    --to=netdev-bot+sashiko@kernel.org \
    --cc=bjorn@kernel.org \
    --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=stephen@networkplumber.org \
    --cc=toke@toke.dk \
    --cc=victor@mojatatu.com \
    --cc=vinicius.gomes@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox