Article View: linux.kernel.netdev
Article #18170Re: [PATCH v2 net-next 3/7] tcp: Stop collapsing if not bloated.
From: netdev-bot+sashiko
Date: Tue, 17 Nov 2026 23:13
Date: Tue, 17 Nov 2026 23:13
76 lines
10118 bytes
10118 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 of tcp_collapse() in net/ipv4/tcp_input.c now
reads "Collapse contiguous sequence of skbs head..tail with sequence…
--
tcp: Stop collapsing if not bloated.
With this change, tcp_collapse() starts collapsing only at a bloated skb.
It extends the range over consecutive collapsible skbs that are bloated
or overlapping, copies that sub-range, and then restarts to look for the
next one. The end parameter is dropped from tcp_collapse(), and both
callers are updated.
> diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
> index 598d4ff3e1f4b..d2d4796984f39 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 could the header comment of tcp_collapse() be
reworded?
sub_end is not a parameter. It is a local variable that the second loop
recomputes for each sub-range, so callers never see it.
The comment also still describes collapsing a single contiguous range.
After this patch, one call can collapse several separate sub-ranges
between head and tail, with uncollapsed skbs left between them:
/* Second, find consecutive collapsible skb. */
sub_end = TCP_SKB_CB(skb)->end_seq;
...
goto restart;
The comment stays the same through the rest of the series, up to
"selftest: packetdrill: Add test for tcp_collapse()."
> *
> * If tail is NULL, this means until the end of the queue.
> *
[ ... ]
> + /* Second, find consecutive collapsible skb. */
> + sub_end = TCP_SKB_CB(skb)->end_seq;
> +
> + for (n = tcp_skb_next(skb, list); n && n != tail; n = tcp_skb_next(n, list)) {
[ ... ]
> + sub_end = TCP_SKB_CB(n)->end_seq;
> + }
[ ... ]
> +
> + goto restart;
> end:
> skb_queue_walk_safe(&tmp, skb, n)
> tcp_rbtree_insert(root, skb);
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261116230555.2305867-1-kuniyu%40google.com
Technical Details
Message-ID:
<179495721972.3136.4014039511718024400@kernel.org>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!2.eu.feeder.erje.net!feeder.erje.net!feeder1.feed.ams11.usenet.farm!feed.usenet.farm!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-365691-linux-kernel-netdev=dewy.ruReferences:
<20261116230555.2305867-4-kuniyu@google.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!2.eu.feeder.erje.net!feeder.erje.net!feeder1.feed.ams11.usenet.farm!feed.usenet.farm!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-365691-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH v2 net-next 3/7] tcp: Stop collapsing if not bloated. Date: Tue, 17 Nov 2026 23:13:39 +0000 Organization: Usenet Network Message-ID: <179495721972.3136.4014039511718024400@kernel.org> References: <20261116230555.2305867-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="2451816"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:0nCjkHs/huR5Em5OrUBNbvE8RrU= sha256:VZOoKVoNUxntjHsalZd91URkc40icDVRc6WwmnzYEoY= sha1:xwMBW/+ce5o9VjF5N3RQcpeFV70= sha256:fAWgtU+1gRthrAODAssAcun+wjlwWlPRWdQWDk8d1Og= 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 000821150E6; Wed, 18 Nov 2026 02:14:00 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.4 X-Spam-Status: No, score=-3.4 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, URIBL_BLOCKED=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 QXQztxLhw_ym; Wed, 18 Nov 2026 02:13:57 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-365691-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 B63731150E2; Wed, 18 Nov 2026 02:13:48 +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 969E83406D; Tue, 17 Nov 2026 23:13:45 +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=XX9V4h1Fh70pggO11hw+QaJdOH1r022yeFwkPFqbSjMntVQ+WnDjqNNf3hufWWeOlgjO tqAylufabCYZprkGaOeGHuzf+DBWu38GmiYYI0qt3OmRV7TFcXS5Opg6/C/J1RG5XTEw7 XZVnyGZoOy4IoH9P8sfFCMBEhRakBkSVF+I5hR9UccYbQLv8q0CE4OR7VA5iws2jGNaj2 AlqchqoxH1ApMYGrEC8Cjbzm/whG6HeFYxRrRTX8AkxCI3MZb2VzDDlPOgnOE+t5NfSVJ 5hZOciN7o4MJXPI+oEVjAhgaOUtS4b5aidncddzzx3jgm3k5uRfVVa8KFGjARPU6j9A== 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=AWIMa0ygDuVqH17MMOqdCGLShtW1ekZiV8aTkIfR0Gk=; b=TMFj5r5+IrHWfeYF0fYoESArJtVoOONzSh84wJRJR6FJVUqwE0ckVfpbch5Y1CuPNMFz X3+nbK0cPBbh6NhCPfUtaIBJRZxkD+hBr+rAJXedVCdnbonR9sZa5zLF4Jf8vLrVi6qk6 zT1uPkJkl5mQUysz4fFUgZgRbmyx9Fac9LwiX4lJbqOKwpfvedzAQa+lCfUfHf4duiTZH /edbHUSnuZT2XmWZ6SonuVigg3gulr4HU2F4+cYzEw5ksloJiScocIwGjUG/Rs9qUrKud k2jqZoul4of/xg8kx16jUwxoEjqR6opOceagIWgq3e0k+q2evngId/Xlcgx5PRYDZQQ== 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=FynJ+w4g; 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 CD88C606A31C; Tue, 17 Nov 2026 23:13:41 +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=FynJ+w4g 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=1794957221; b=pMo+VpYqKRNwZSuO7Ih4KTolfojJFXPIHkVzzcxJkqwR2Mx7PeqLeShljVvaTUdX8vJD v+4Zxs7ndZybhNSUbamUNzZWhNFWZ67kebgowbpoqT+BQ8x9vxzzQVcJQvEHqCzo/8MFP ZLFTTNOhEpEVZWE8enjrgfl17zkJhal6Ru3opmTD7jXSL2RUlwdIsxiTGTDOWt6wvDUM3 gzStqrNP/LFQfaOiC9+Dw0GJNntQDX0dbWhh8NEKpAGA9cRu6dVJR9KZGYDuENKAAbNrx 7ly09GXEgbRPRZdK/ILyd6QqNWodRV5SfqBPkKKzW3w5GbRrpPCGQYTkf8E1hW4r1Eg== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794957221; 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=AWIMa0ygDuVqH17MMOqdCGLShtW1ekZiV8aTkIfR0Gk=; b=Kn+RgMOZ4Be7lMqMpqmgDnPBJ1oH60DiMgzhTd7wDq0JsdWc9K7lIpoOccxYIM64W8dO JXkqsDzmxsqkW5KxhTM41xvGDWn0HDNcrWlef1CKSktXA5F+aa7eaJGqMw05nAggGchmR KX9JH93SHdqXwhsot3T/qGjQegEGiwYDbWm0tYZlkrnR9N2vmtOzd3/eDnO4dX56bIPZW Zw/0YHFP0y2KikEuzV0ZkNLzsW5HYw+jlvLuNd9o+lhag17cC5Bb1FdqyX1iPjTGfSPYA 3Vy5vbkJ06geASdJLq8PS7gWvtPX+lNFr89AZb7l3ScRaMIwaeTLevPBpo+CL1lUmSA== 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=FynJ+w4g; 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 E9341606A334; Tue, 17 Nov 2026 23:13:40 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 242551F000C5; Tue, 17 Nov 2026 23:13:40 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1794957220; bh=AWIMa0ygDuVqH17MMOqdCGLShtW1ekZiV8aTkIfR0Gk=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=FynJ+w4gGMX4VQ0jDP6XaEA6DNb5QnmjjVA4982A9Ur9seV+Pkk79fVOccSKHcsn7 R6u2ARdAHimxvN9e0OMq0sIOiY9k3SrgQTgfGsv3/hbfE9mUFWh/TFOrdVa/Sr78Jx kwJe/3K0Q+PYKucVVT/lI6oQaPZ440twj5aYLSGGhWTiTd8AgI1DRIpDAA6PAUiL19 AymhaD+DppgZNL6SFWYhLzaz08yvve3Y3GEQy2eoivQhQ7noKYFS24CWmkIUCJbK7G 8EqT/ycH6By1bw37Jg5U9IzlnzthO+NtYwAQMD9JKg+idcIEoiHNeEupmshjLn6xpw cxFuD2Zs0S24g== 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-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