Article View: linux.kernel.netdev
Article #18169Re: [PATCH v2 net-next 2/7] tcp: Don't collapse high density skb.
From: netdev-bot+sashiko
Date: Tue, 17 Nov 2026 23:13
Date: Tue, 17 Nov 2026 23:13
66 lines
10122 bytes
10122 bytes
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 commit message describes a real regression, but the patch has
no Fixes: tag.
--
tcp: Don't collapse high density skb.
This patch caps the scaling_ratio that tcp_collapse() uses at the highest
ratio a collapsed skb can reach (222 with 4K pages). It also changes the
bloat check so it only looks at the bytes left unread after start. With
this, tcp_collapse() no longer collapses an skb it just produced, and it
no longer collapses a dense GRO skb just because a few bytes of it were
read.
> If 4K-MSS GRO skb updates tp->scaling_ratio, it can be larger
> than 222.
>
> Then, even the newly collapsed skb could be detected as bloated
> by the next tcp_collapse().
[Severity: Low]
This describes a regression in tcp_collapse(). Should the patch carry a
Fixes: tag?
The re-collapse seems to have become possible with commit dfa2f0483360
("tcp: get rid of sysctl_tcp_adv_win_scale"). That commit made
tcp_win_from_space() use the per-socket scaling_ratio. For dense skbs,
tcp_measure_rcv_mss() can raise that ratio as high as 255:
net/ipv4/tcp_input.c:tcp_measure_rcv_mss() {
...
u64 val = (u64)skb->len << TCP_RMEM_TO_WIN_SCALE;
...
do_div(val, skb->truesize);
tcp_sk(sk)->scaling_ratio = val ? val : 1;
...
}
Take a full collapsed skb (len 3776, truesize 4352) and a ratio of 230.
The old check in tcp_collapse() gives 4352 * 230 >> 8 = 3910, which is
greater than 3776. So the skb counts as bloated and is copied again on
every prune.
Before dfa2f0483360, the default adv_win_scale=1 reduced the check to
truesize / 2 > len. That gives 2176 > 3776, which is false, so collapsed
skbs never matched.
Documentation/process/maintainer-netdev.rst says the Fixes: tag is
required for fixes, regardless of the tree. Would adding the following
help with tracking?
Fixes: dfa2f0483360 ("tcp: get rid of sysctl_tcp_adv_win_scale")
If the patch is meant only as a heuristic improvement for net-next, could
the commit message say that?
--
Sashiko AI review ยท https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261116230555.2305867-1-kuniyu%40google.com
Technical Details
Message-ID:
<179495721836.3136.13013697525497561871@kernel.org>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-365690-linux-kernel-netdev=dewy.ruReferences:
<20261116230555.2305867-3-kuniyu@google.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-365690-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH v2 net-next 2/7] tcp: Don't collapse high density skb. Date: Tue, 17 Nov 2026 23:13:38 +0000 Organization: Usenet Network Message-ID: <179495721836.3136.13013697525497561871@kernel.org> References: <20261116230555.2305867-3-kuniyu@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="2451765"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:hcrduHDTPcsIFFZbMyvl7XlYLlg= sha256:ZhTtXO3hkVtLKfssb0m2AxTWUPZZ+MKEzoNyUcb8JQg= sha1:LiMWK4MuZrDp+0B/iJJPc3esg5I= sha256:5WaCox4cQNVyhsw7tYh/GkqfAXDHlNSdKdpVTeKAISs= 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 E1D171150E6; Wed, 18 Nov 2026 02:13:59 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.401 X-Spam-Status: No, score=-3.401 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org 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 RMJDnbI5mwqk; Wed, 18 Nov 2026 02:13:55 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-365690-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mail.dewy.ru (Postfix) with ESMTPS id 88B281150C1; Wed, 18 Nov 2026 02:13:45 +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 C3D6832ABF; Tue, 17 Nov 2026 23:13:43 +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=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1794957221; b=HnDGdklv2HR4wyG78jjVdX+i3qb4gcfpbNBlDtJuniMHvoAxT3GLdQvkOdp4XI4Pil8Q Y/iqUdpDn5whg6UwgjoMycJoGco0XZVyzDV9nm4B58SxHqBCbOGLl05sDVarkiclSwx+o /v5kejYiRaUIkPouz39tjyGPRcTEKKsoov8dRS8lKEa7RfUW4VWSyHhpkHqXa7DL86WbV Tb48JxrEL2VKdHIUorszm5FXU4NQ0Q5sE96hchnoenMFHZ2VRzuE5btONkyAdr2zk/Ofv 5HM4j3ui5Al6gPUEVfIXXFFlgR9gslYWuvdZLUE/n1Pw4bnVthtazxAWRG2OVVkY3LQ== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794957221; h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc: Date:Message-ID:In-Reply-To:References:X-sashiko-severity: Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version; bh=pBjRRd4rZRfs86HYcxJrhsM6qV0fJXwEq+1E1vlj4w8=; b=ZMw5XDZG2tY5q4I8mL2RM3bhAxBVhWlcV97/oJJbeIwgqI89Qd+dN6lWfYdvtBIxf+eN 48J6dXHIVWvefYwxZOeqHgmMb0oSmBf/cfTGWcJUU+Oa1azVvaglOPWvFN8HpxZH5orS5 Jn4bGe/cUP7FI5PypB1UbwO1//3xSYgmIX91ubk3Pw/Ay5S8HVJUf2m1dzY/YhPZeCMDB pk5GJfQA/5tx9xLLSw4Cyil/8x0O4tSmQvTdjeMo/tztkuS1rXgjSB8r6dB2W0Ky51hzM CLlKiGwuHWKZKMBnbhzQEMAUu+5ASpVeSm/Qdge86Ct+fQKZ0aJ1YII44bmzE+JKoog== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=BvtTxcID; 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 DC53A606A333; Tue, 17 Nov 2026 23:13:40 +0000 (UTC) X-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=BvtTxcID X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794957220; b=mwAiZMIx23tEZzPshhsJq6d47M56xAnepu/6fw9ezcJWdfNkoL4E/qTw55b6JSWC16V1 61m5LWSXv+Xj+96jxYqC9AMl8MVMwBd9Z//n+26Rw5mGMLsvR4r/jY40L9SUTsXiL/j2b su0ex2GHqmqprLQiTYuiozbpC0GmmImCiwidYDOrkdG5+uOK4m3d1ED+p7fAw+qjyho51 OoemwxeI1Wpa9jWMY1K+lycBideLzlZ2tfoMZXzc+z2ftstjsMhvNJOrE0nyNr+XclOfV V7YPplTKIrdS3lnqfLwAq6aUjxMQIZ9PX7ZvJCAMvsDnHoNrXnFXn7oEUo4bh0VVD5w== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794957220; 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=pBjRRd4rZRfs86HYcxJrhsM6qV0fJXwEq+1E1vlj4w8=; b=QyFskRt16SQayRwWKX6u0ta6JakiZ5TcHGL/iI2G2ybG/78GV00fDO5J0SAAEkCE+/TZ kzGkCspgOcCCT+CtlIHaFiMbA5o2XfYnhHayoHG/gn+Mg+M0kmfhTTvZNqHBVSKmuWoLR j97KSfza8p9WtpJx4OMYAiJRfTTokjOi4vdyq70xiPkKDdpOMxLTAaJFs9M8aZCc7YWaa Me4MnH4auSHPc2BE8VMVJhXEyt4ajP3VkxrLnlpwGjikXL9sC1t4P/o9bTn1+gfh/KdEJ n0x0O8hmokkqx4TsbdjtogAsEs9SquphVJXjqKuk+utPEpeUqYqz3IYVncfO5oht+Sg== X-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=BvtTxcID; arc=none smtp.remote-ip=100.103.45.18 X-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 0391A606A31C; Tue, 17 Nov 2026 23:13:39 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id D3D4A1F000C4; Tue, 17 Nov 2026 23:13:38 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1794957219; bh=pBjRRd4rZRfs86HYcxJrhsM6qV0fJXwEq+1E1vlj4w8=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=BvtTxcIDgqbM+e+wTLbqmfx/0br6280fGM7+aBqHdsh2jjqvufgGMT2/gXulaInNz 7K5TlHa9bhth/pKRsz17PAT/gvvydzuUGRqDMT5NXDuSK6BjlfZnqrEpoqrjXa8RJg JsQbqtYBDMrwqnmmtsp72LCTQjamujlrZfwcqAOSxk7nv7Xn14DMwimSAAxhRGbNU+ Sf6IxTKrfq5QwjzlQUGBpc+R2hPsKFUYaytPl8K608KpW3lygMB4WurMabntn5wUpE rRXejQEdKLx5l/WA3oGnhqN7SuDOxLXLTCz9jkH+I4fy4Kh8KSCJoq3NPRNKdjJrsW d0KKi4rVuSsIg== X-Cc: edumazet@kernel.org, ncardwell@google.com, davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com, matttbe@kernel.org, martineau@kernel.org, horms@kernel.org, kuni1840@gmail.com, netdev@vger.kernel.org, mptcp@lists.linux.dev X-In-Reply-To: <20261116230555.2305867-3-kuniyu@google.com> X-sashiko-severity: Low 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