Article View: linux.kernel.netdev
Article #16529Re: [PATCH v1 net-next 3/8] tcp: Stop collapsing if not bloated.
From: netdev-bot+sashiko
Date: Sun, 15 Nov 2026 04:10
Date: Sun, 15 Nov 2026 04:10
73 lines
10451 bytes
10451 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 header comment on tcp_collapse() in net/ipv4/tcp_input.c
(line 5841-5842) was edited by this patch to read "Collapse contiguous…
--
tcp: Stop collapsing if not bloated.
This commit changes tcp_collapse() so it only collapses ranges of bloated
skbs. It no longer starts collapsing because the next skb overlaps, and it
no longer runs on until the tail. The end parameter is dropped. A local
sub_end is computed for each bloated range, and the function restarts the
search after each range.
> diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
> index e07f433474093..5bd42a74c6f58 100644
> --- a/net/ipv4/tcp_input.c
> +++ b/net/ipv4/tcp_input.c
> @@ -5839,7 +5839,7 @@ static struct sk_buff *tcp_collapse_one(struct sock *sk, struct sk_buff *skb,
> }
>
> /* Collapse contiguous sequence of skbs head..tail with
> - * sequence numbers start..end.
> + * sequence numbers start..sub_end.
[Severity: Low]
This isn't a bug, but should this header comment for tcp_collapse() be
reworded rather than just renamed?
sub_end is a local variable, not a parameter. The second loop recomputes
it for each bloated sub-range, and it changes after every goto restart.
Someone reading the function's contract won't know what sub_end refers to.
The comment also still says head..tail is collapsed as one contiguous run.
With this patch, non-bloated skbs are skipped, each sub-range stops at the
first non-bloated, non-overlapping skb, and only the bloated sub-ranges
inside head..tail are collapsed.
The comment above the caller, tcp_collapse_ofo_queue(), has the same
mismatch:
/* Collapse ofo queue. Algorithm: select contiguous sequence of skbs
* and tcp_collapse() them until all the queue is collapsed.
*/
The last patch in the series still leaves the header comment as
start..sub_end.
> *
> * If tail is NULL, this means until the end of the queue.
> *
> @@ -5848,15 +5848,18 @@ static struct sk_buff *tcp_collapse_one(struct sock *sk, struct sk_buff *skb,
> */
> static void
> tcp_collapse(struct sock *sk, struct sk_buff_head *list, struct rb_root *root,
> - struct sk_buff *head, struct sk_buff *tail, u32 start, u32 end)
> + struct sk_buff *head, struct sk_buff *tail, u32 start)
> {
> struct sk_buff *skb = head, *n;
> struct sk_buff_head tmp;
> u8 scaling_ratio;
> + u32 sub_end;
[ ... ]
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261114040101.1043546-1-kuniyu%40google.com
Technical Details
Message-ID:
<179471585136.2199510.5242413969655893867@kernel.org>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-363557-linux-kernel-netdev=dewy.ruReferences:
<20261114040101.1043546-4-kuniyu@google.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-363557-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH v1 net-next 3/8] tcp: Stop collapsing if not bloated. Date: Sun, 15 Nov 2026 04:10:51 +0000 Organization: Usenet Network Message-ID: <179471585136.2199510.5242413969655893867@kernel.org> References: <20261114040101.1043546-4-kuniyu@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="1726478"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:I9MUdGuj7ocuUIq0xwqlBNf7h4I= sha256:K+QdRsSVjhcAeOEzyYwYjBwQs/S/ZMTIPfKiK6A11ag= sha1:oLBZNbrrOqk42YP2xAHep8j8ew0= sha256:b6Q1JGxaTQ54kDP4FrphYUG6joS/kw7VgVBaQekhMTI= 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 C66D1125D3C; Sun, 15 Nov 2026 07:11:11 +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 1bE0MZVwUQ-x; Sun, 15 Nov 2026 07:11:08 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-363557-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 0A4F6125D3A; Sun, 15 Nov 2026 07:10:59 +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 9AF8938DCC; Sun, 15 Nov 2026 04:10:55 +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=1794715853; b=AsQMRfJuAeHu3x23fs+kdOVVoGWwwIpM5kabREPS0ZaOvvYBbYmp9gto/rgZQWMdtswz PezKSA/dVMtvA+Q7LUIMDxmtlkFwJM7E399Sdwn4y47Mul7Rn5mxBxM0Smp9C1S/yi7gi 2U22N8+tBdBM1d4n31zRIlMxsE3xmyQyb1wZKhYHnqBxWBM5EAM7FPeznwy3arruD9tL/ LaOFlO3t0qu67ZkMLRR3tOlTTyKR9CXruKsf6fJIgNVdWHPh2Hcr8YgH4R5b8EVA3cl1o 93x1V3cRSh21dfnViWuugBPF0SV+dJ6hUbAh1dQJfkU80zwZ2LXGt6IRW/7M2aLB4ow== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794715853; 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=U/hbHlod/r8hdzYS9HIa6oyqSeN/dIcMx6Puc22TzW8=; b=Ui3fuBQ+L7T33WY36GpyFRAANft/+B/I23FmJOSEV9y1Em9Xh4U5vxAgMWHdX0Z06k1N ztWcjddYLoIljRfnqJi/9jEYDbVxVal0wiUJF3GqcCbXjqYtzUwed5+eQaS+Ca2TPNEKY S9Tv5ExXarQt/HJr7W8aQ5ZSRCw8M7oB8GW5DbyqVBQ55oCJBPndWpdSWK755D4gbfMD4 zJrZqpdzLVvlgQGLFPjTdvPj26U2F/ykzCRBWaSulQaOnHvG6zzhLqetGXjm5QWnA79cE yU9enO1vajA2JSrCQ6ofS/xVwDPjqjKzVbV/U0VaAEjaU++oQDlUhyvcx24wUPdSE+A== 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=SPzRw8c8; 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 4E0E4606A327; Sun, 15 Nov 2026 04:10:53 +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=SPzRw8c8 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=1794715852; b=s9iSk8bBUFRPpapaadLofsNUw6BzH4n3tLNE91uPnYRjCNsVdMbGY4JQOGMKJHckcDur WvYHraF+pYNv4eXitpGtmWlExvc0MpFNdzFXMOA/kEpc9m5XoNYq7FkQFNV/vfo36PavK 3ZP9X6vTCBSe1N2wK5PF0unZDlkMR7zRlJMfIIVTcjyDUZROrvdCdajme4QfL0/agbNMQ J2csA0I56rDFyx/FmO33YplYdj0ZC7WFmFC/NnxHOYeaFTNdQtxJ3OG17VvquD/SN//6L zHnCq0GM20ahkIowxYECgz6eUhXCRvCMaomQmUr1XzzIU+vC8RWflzY/YG/hK3AP4pA== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794715852; 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=U/hbHlod/r8hdzYS9HIa6oyqSeN/dIcMx6Puc22TzW8=; b=B1TwwPzoKlPJOsVg7moZE+sgaHQ0qtamYF58nWp86R0RdubwQgc8lO5w+ui+SRKO+wnT aTJ0v2YSu7joWfx97uPiVdy+poKPSffSKXlSaoTELHftoj4ulJg01CXdEgY3fK6AbVKja zIbtibCZn5Gp6pVqYlHy2+bO/ZZtFpBEc6jdjlbmbLelNecGem+6rnmj/nDfwIQncAaS1 VytO9rx7hWuNYC6qRgNjCUpkf4nXiC4YSI/opG9Oa19dfF9EuBJvrEgSCYQ8p1SfzQ25m D/fYUZDOVsJ5ciDM9WNwuJqVG+MhwewC0has94Wr3hiRmAGOYPyXYQ6eOLhj9M8w5ww== 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=SPzRw8c8; 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 6DD6A606A334 for <netdev@vger.kernel.org>; Sun, 15 Nov 2026 04:10:52 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id C5F0E1F000C4; Sun, 15 Nov 2026 04:10:51 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1794715852; bh=U/hbHlod/r8hdzYS9HIa6oyqSeN/dIcMx6Puc22TzW8=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=SPzRw8c8aTYDTIjW11cPk8Y1ej6jiQ56DZEvY+DRkJ6ZqBbnEzsWOMlbfUAG9v5f/ 7VGpbaMMxkaGthkw4YzB4cZDSK0lRMky7/oUGRbdl8z32kppEqIhHet1SdAlTRkSJD /MfXFU1fd0S6JNwpRBi/seYsO5r+pEWkb4Y/dUW/TEzpItyNWqJ+WGKoqyAVOVBhA1 aKcqocbWBpw6zbgTCt7rtmFgDEy6JXg3+Bl29hXKSPeWnXEjCoW6YvGmdWP1anr3La 8r+ffZr1aFcqY0Os+0y/gGtO6la9pMJRqS10cguAEm/QFUnsby+m9nxYEuQPrceWh9 cF9XXd+rG/8kg== X-Cc: edumazet@kernel.org, ncardwell@google.com, davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com, horms@kernel.org, kuni1840@gmail.com, netdev@vger.kernel.org X-In-Reply-To: <20261114040101.1043546-4-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