๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #16530

Re: [PATCH v1 net-next 8/8] selftest: packetdrill: Add test for tcp_collapse().

#16530
From: netdev-bot+sashiko
Date: Sun, 15 Nov 2026 04:10
75 lines
10472 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 does not accurately describe the test in
  tools/testing/selftests/net/packetdrill/tcp_collapse.pkt.

--

selftest: packetdrill: Add test for tcp_collapse().

This adds a packetdrill test, tcp_collapse.pkt. It checks that
tcp_collapse() only collapses runs of low-density skbs, and leaves
high-density skbs and an isolated low-density skb alone. It also makes
ksft_runner.sh skip any script whose PAGE_SIZE define does not match
getconf PAGESIZE.

> tcp_collapse() now does not collapse high-density skbs and a
> low-density skb sandwitched by hihg-density skbs.
>
> tcp_collapse.pkt verifies the behaviour by
>
> 1. set a large SO_RCVBUF
> 2. send one high-density skb with 100 bytes read()
> 3. send one high-density skb
> 4. send one low-density skb
> 5. send one high-density skb
> 6. send 30 low-density skbs
> 7. set a small SO_RCVBUF
> 8. send a small data to trigger tcp_collapse()
> 9. check TcpExtTCPRcvCollapsed via nstat
>
> Without the series, the first high-density skb is collapsed.
> In addition, the first low-density skb drags the following
> high-density skb into collapsing, consuming more memory.
>
> If we remove sk_forced_mem_schedule() without this series,
> sk->sk_forwad_alloc becomes negative at the end of tcp_collapse().

[Severity: Low]
Is a step missing from this list? Between steps 6 and 7,
tcp_collapse.pkt queues one more 62,000 B high-density segment:

// 5. Queue a trailing high-density 62,000 B segment.
   +0 < P. 217001:279001(62000) ack 1 win 65535
    * > .  1:1(0) ack 279001

The file header says the test checks that tcp_collapse() "skips leading
and trailing high-density skbs". The SO_RCVBUF shrink comment gives
sk_rmem_alloc as 334,592, and that figure seems to count four
high-density skbs, not three.

The last paragraph says sk_forward_alloc goes negative if
sk_forced_mem_schedule() is removed without the series. Does this test
catch that case?

The test only passes or fails on three checks:

- TcpExtTCPRcvCollapsed equals 30
- TcpExtTCPRcvQDrop does not appear
- the final read() returns 279900:

   +0 read(4, ..., 300000) = 279900

None of these checks sk_forward_alloc. Could the message say that the
test does not cover this case?

The message also has a few typos: sandwitched (sandwiched), hihg-density
(high-density), and sk_forwad_alloc (sk_forward_alloc).

-- 
Sashiko AI review ยท https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261114040101.1043546-1-kuniyu%40google.com
Technical Details
Message-ID: <179471585361.2199510.8278791801489281054@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-363559-linux-kernel-netdev=dewy.ru
References: <20261114040101.1043546-9-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-363559-linux-kernel-netdev=dewy.ru
From: netdev-bot+sashiko@kernel.org
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH v1 net-next 8/8] selftest: packetdrill: Add test for
 tcp_collapse().
Date: Sun, 15 Nov 2026 04:10:53 +0000
Organization: Usenet Network
Message-ID: <179471585361.2199510.8278791801489281054@kernel.org>
References: <20261114040101.1043546-9-kuniyu@google.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="1726531"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:T+pYG1PsrQa9/O8wD3uZbtnyjkI= sha256:plfw7rrdHwussj69yIwXk4UXmx5wWDalKmmJmDSDhww=
	sha1:KV9IBMAXGwdwkLFYNnprdNxcre0= sha256:f6OcFtFnNPlKRelQuTm5ZOHjTH66YtiersDdzM83oac=
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 A3259125D3C; Sun, 15 Nov 2026 07:11:17 +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 PkOTdYCJnE_R;
	Sun, 15 Nov 2026 07:11:14 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-363559-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 C4194125D3F; Sun, 15 Nov 2026 07:11:05 +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 62B7F383A7; Sun, 15 Nov 2026 04:10:59 +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=1794715855;
	b=rsCKTjuZ5iqfcbiumYNrgfQp2JtKkJT9l8vw0WXaL0gi+MMki3X0bDBuLJ/6WtGc6gie
	 7fbFPkFJ4HeIQaplRj6CD9OzMcDSEbaZNJ3zfv7wK5IwU11HQDR3qT8rfY4fI1foXgpgA
	 uRa3GGyQq3PtPj5tpSOczUg6yDadR+XmyxGfr9fmVaoCWbEtE6N+ow9l9EtLMbcKK04vt
	 Eu2LHzfbhVqa8CgEpMhDN9MINIj06k3iLDzqKOk6gAbxfeljY9kIPVEB+JLZx+M9ssczB
	 8dpsHGE6PCGNNJF9L5UQ3a51xxnEDsN+0Z3Mkhl1S2svGdS9PqlJaY2CeZ0ucYHiutg==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794715855;
	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=T2PCQ24rcTY2zFQSzsrl4wzyPOBFrVHAmJUkjy6sF60=;
	b=X03PyMyTBuWWZ5XK/hh7xqaVMPNfzh8iXEilHyRjv/8XG70GaORJ3iTSmKP0vFVRXi6B
	 Ov6/b6F5kjHcAdaQ7eXjRVIf+DYTHHEns1xm4diRM759vRQLCZszIHL92s6MMj0QJirRO
	 NaLu6KTxH+LtDTMEMx8yN0k/zA1h23pavaBLOeqlWj8n8sxdAktw2h1Dej+HEIKqs0qSi
	 Rbo1Ex9VVBcUlPRCP2JTw1nZo3J9Mv1GHFIn7ENJ6UhPIZ2OwqBWwIOX8gRG5VQf5EBEl
	 C+DmFH7bc9YGftS8Zwc+IWQfpHr3NxoLIZzcw/RdJ0mwcoKeChmJnWlZotrPUHe9KRA==
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=SljNCKbo;
	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 B5D4E606A335;
	Sun, 15 Nov 2026 04:10:55 +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=SljNCKbo
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=1794715854;
	b=lxCSzyjkgbhJmHJ6CfVVu4StElQChH49v00hfBxZHnlM89vZLxqJAQb4jk6M9EZ6FTpk
	 4r8nhJP2O/nyltxfRmXkWK5yrUBkiWJdzS0+QVyUKwa54OBeAqLY85omHS+0fVbck6HWV
	 jYJU991jRSXFcd2u37wu2tZ/W0AE+0K4zNJbp9PjMHjzP87ImKyH/CsQBsSJ76m1Idu+2
	 /LgWae8YS3fpIKd+9xhWou1S+5qlhQinw5oOGJgbgedrirE7rZ/NXp4XEb6msvji0l8ms
	 beK8ToFmc5OWE1MifG0yzXo6fVF7lCzlTFYSh6ziiAGl8eNkgPFPonbOXb0oSWFOxHA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794715854;
	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=T2PCQ24rcTY2zFQSzsrl4wzyPOBFrVHAmJUkjy6sF60=;
	b=jes9jUrmDuqJz/FeEVqmoQAycn2bflY51krrlkoX6ZwuA3B0RzdWtJj0cTiLe7CiDwmg
	 v93cx1Dgby/Tb6Iw7HvQABztn+wfjhbUEX39NIYKKnyMBslfkkYhhITlcZEFdHrMzqw8Z
	 QZ/nPUUCFgpaCBsqGsuiwMUOFsOLRHFRIYKx24pCxm5KzQl9CDwM0tE67u9WqF2b79n48
	 bzPXaPTiEoZkuJtu/VXE5aMsIE55X8aR0+A3Yqj3Q356tuLork6553Oz2VmQPSd4qTdNs
	 frde3ga8R/aB9DRVcz2bVsj2XrqC9x7TyQg6PiLuOXpYpgr+RAOCO29enzJBBSaOTmQ==
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=SljNCKbo;
	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 D740D606A885
	for <netdev@vger.kernel.org>; Sun, 15 Nov 2026 04:10:54 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1192E1F000C7;
	Sun, 15 Nov 2026 04:10:54 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1794715854;
	bh=T2PCQ24rcTY2zFQSzsrl4wzyPOBFrVHAmJUkjy6sF60=;
	h=Subject:From:To:Cc:Date:In-Reply-To:References;
	b=SljNCKboEt6NEeUQnE/wHtVdh+R1gE+DQ7ESSSlnejD/fVvuUdnTi3sGRhDJdfG8j
	 SE5P53o2DBpqJp5zxdgGeTu324+ZENsQovq2Iw1fGRPAWxX8+qzn4x4jbaARrg2Bgk
	 EmIINkmHAYLhypm1LpU840v1Kuv2hVW2BQsvhNIumud8t7SEnHp95pzmiE6AFor1T9
	 P+/8HFZX+KXEiFgesf/miN1kaEaQhvPQGHn951kMg19XacyrdEUuDs+b0pEMZXqAPb
	 MDoo5nWMxdxyXySLBRR7AE0ogljgJ5+mbKRlySWDWNA2h5jbpoSLCB9w5WFv1Y/ZkN
	 94nZoh/mqSkjw==
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-9-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