From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795867729; b=Tbi1dlkOEtgvQi5gCzYjb662H4RmtT6OeuG61nOusgiWRIIc0+ocJ+/cT0qplU6vn5yV JU60/mQkoud3Hm/qvurgXdHP060cjHypf8vxfu2vd/TPEfJn9I2f0aBB6OdrTzNL8pb4M 9RIwvTKYE/gnbnO7mP1ZNjDias6gW8khmMKvehEATgFu5U9sQTnG46JrhBBncTB3sCMpW 5H6Z22MrynRY9+zjsi5nhtZqmLMHk1KsfY2fqB+DWtpuBDW4mEYlPJrq7mfqa2mkCeLvI vcC+UMPHZh3jA5meqvWr/2hOiswL5xcPZ1O9+cyw/GfiumRNXBqSlUPBkLhHcfOlQrA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795867729; h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID: In-Reply-To:References:X-sashiko-severity:Content-Type: Content-Transfer-Encoding:MIME-Version; bh=X/lxz0ydkcA9N33IeiEx3NeLFg/SvTNdWuUSkKTVRgk=; b=NFD/081FvYGSqAJNq/pZlA9VyLgJqpZY5iMVsAzKqsv0jBZskcOhU82kFT+DOYK3cgS/ SWEz3GXa70e6NRxayaLFz17f5aV4iUTQE/Wwp8uAaaRKuGCVrpVUBqnNg8uircNdup9xG C1PArwQMJx5TbqhHI+BFttbyxiO9TV8/0aKIjFH9P7b7X+a53JMTshy1nRCVBnu/4fXDY ClJAIi/HN8NgeigPtxob+gET2p2e3qQQ4kPpGTjTZ4VkhhMRjXPIvwWEzWY3nY+XYlV+x U+ekTEdk2RzR4hK60XMbbpR6OohoQ2kEN8wQw4j+Lkwpkz24WXd++YdU1jSzL36Z5dA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=QdWYyGba; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 81A77606A326 for ; Sat, 28 Nov 2026 12:08:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=QdWYyGba Received: by smtp.kernel.org (Postfix) with ESMTPSA id 777EE1F00926; Sat, 28 Nov 2026 12:08:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795867729; bh=X/lxz0ydkcA9N33IeiEx3NeLFg/SvTNdWuUSkKTVRgk=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=QdWYyGba4nXTAnKbuhovu5SMyDPOf9RdxEhiYPzBmHngaQfMmUkJsfd6U8OpU1Vhg FwRBlt3MuIQrJR9eRbfq64JNmxRbnl7ERnTl+eAZZNJGLu4fbaWbWhLCu2YPa/UcnX sQqDbjQlsRCMDSdGGI1VwYrgC0Xrpxbrh1dN4Kh0vyw+oIZBfLrNI6379R9YF+vMWi lTaBYkvLAxSSN1SPkyoH0bavCbaGZBHMq/zeP1O7d389HnkdWpQvQ3zXhfXQFp+dPd nst8nqPtUjp0mVxTMx/rzZ7GmdcAU1d1tEQ6ncjTGJ8lxdyEMH4X1qRt5XOpGHVqNS NOEruS2Mzc/mw== Subject: Re: [PATCH net-next v13 4/4] net/sched: cake: hash before segmenting and reject an overlong split 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 Date: Sat, 28 Nov 2026 12:08:48 +0000 Message-ID: <179586772803.3135.8375156947766643480@kernel.org> In-Reply-To: References: X-sashiko-severity: Low Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Mailing-List: netdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 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