🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #18255

[PATCH net v2 0/2] tcp: roccet: fix idle restart on RTO

#18255
From: Zhiqi Zhang
Date: Wed, 18 Nov 2026 02:28
54 lines
12984 bytes
Patch 1/2 skips the idle restart when packets are outstanding, so an
RTO retransmission no longer overwrites the snd_ssthresh preserved by
roccet_state(TCP_CA_Loss).  Patch 2/2 adds a packetdrill test.

v1:
https://lore.kernel.org/all/20261114141315.19007-1-zhiqizhangg@gmail.com/

Eric's review:
https://lore.kernel.org/all/CAL4WiiohBWs_BteL4o__osD6cPTXrBBPa-P7faV=acTaF_4g3w@mail.gmail.com/

Changes since v1:
- Make the changelog precise about when the idle restart is reached:
  with TLP the first RTO is affected; without TLP the first RTO can
  escape and the second RTO is always affected.
- Limit the claimed effect to tp->snd_ssthresh.  roccet_state() calls
  roccet_reset(), so ca->state is already LAUNCH and last_max_cwnd is
  already 0 when roccet_cwnd_event_tx_start() runs; the idle restart
  only overwrites snd_ssthresh.
- Shorten the comment to the style used in the file.
- Add the packetdrill test from Eric as 2/2, and enable
  CONFIG_TCP_CONG_ADVANCED plus CONFIG_TCP_CONG_ROCCET in the
  packetdrill config (ROCCET is only visible with advanced congestion
  control enabled).

Patch 2/2 is based on a test written by Eric Dumazet.  A variant with
tcp_early_retrans=0 (no TLP) fails at the second RTO only.

Testing: Eric ran the packetdrill test in 2/2 (it fails at the first RTO
without 1/2 and passes with it).  The netem reproducer from v1 still
shows snd_ssthresh being preserved during the RTO with this series.

AI assistance:

- DeepSeek (deepseek-flash) generated the code change in 1/2.
- I wrote the netem reproducer and the documentation, and reviewed the
  code.  The packetdrill test in 2/2 was written by Eric Dumazet.
- DeepSeek was used to polish the wording.

Thanks Eric for the review and the packetdrill test.


Zhiqi Zhang (2):
  tcp: roccet: do not restart from idle on RTO retransmission
  selftests: net: packetdrill: add ROCCET RTO test

 net/ipv4/tcp_roccet.c                         |  8 ++-
 .../testing/selftests/net/packetdrill/config  |  2 +
 .../net/packetdrill/tcp_roccet_rto.pkt        | 63 +++++++++++++++++++
 3 files changed, 71 insertions(+), 2 deletions(-)
 create mode 100644 tools/testing/selftests/net/packetdrill/tcp_roccet_rto.pkt

-- 
2.54.0 (Apple Git-157)
Technical Details
Message-ID: <20261118022813.9778-1-zhiqizhangg@gmail.com>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-365811-linux-kernel-netdev=dewy.ru

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-365811-linux-kernel-netdev=dewy.ru
From: zhiqizhangg@gmail.com (Zhiqi Zhang)
Newsgroups: linux.kernel.netdev
Subject: [PATCH net v2 0/2] tcp: roccet: fix idle restart on RTO
Date: Wed, 18 Nov 2026 10:28:11 +0800
Organization: Usenet Network
Message-ID: <20261118022813.9778-1-zhiqizhangg@gmail.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="2483410"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:CO4qX/yJXzJx5jSmTVlo93aHutw= sha256:YJ+jwSNA5foRR2ijPXAmWaS2yV5VqGIp0Z0YGlWoRiI=
	sha1:961ZIuHG7CWwp7bQSyRMcRxm2IU= sha256:y9LdJwkK8bFTPyz35zub6JZM7ZUVJnMevMcSuZpKz1c=
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 238DB115156; Wed, 18 Nov 2026 05:28:43 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.049
X-Spam-Status: No, score=-3.049 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001,
	FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249,
	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=gmail.com
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 Bf3_BjZXhBbi;
	Wed, 18 Nov 2026 05:28:35 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-365811-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=gmail.com
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
	by mail.dewy.ru (Postfix) with ESMTPS id C32CF1150A3; Wed, 18 Nov 2026 05:28:24 +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 43E0846E01; Wed, 18 Nov 2026 02:28:22 +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=1794968901;
	b=O8iihsl3mI3i8WBv2ziYhEPWHovD5q736oTAgPkBzAxLiOiuWhFZQDT0rGHn2CN1B75P
	 FRuvd72byfmXOrEJhjQg1hdiaArczdaf+JaDmYg6LJvyKep9aDVV16XiVt17SFKyDBcHb
	 ncEWRUNNS/AXFmt0MDcdh+/snrnfHhWpCzXN3ggbwxqUAfT82HbWGXSalCU0oAQ6tZvPv
	 nng4ZqDO3vUS9ykwiKmJBTr5hWxTVlsU+vbcztT4DJ6IVnUQ4ke72wXm4TC9HFlVdLkho
	 TNXT5eGjhAz5F4E0XUHANm1ug6Hxt3UbHz6i7o5ho3VEIcafxCN1vPM/LUsd5/M4gxw==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794968901;
	h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
	 X-Google-DKIM-Signature:X-Forwarded-Encrypted:X-Gm-Message-State:
	 X-Gm-Gg:X-Received:Received:From:To:Cc:Subject:Date:Message-ID:
	 X-Mailer:X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
	 List-Unsubscribe:List-Owner:Precedence:MIME-Version:
	 Content-Transfer-Encoding;
	bh=bBM1tckyz85/mFdKRLmUacT5H4u3cjM1OdFw/h4C7tI=;
	b=1w/rmEAZEnXTDDZDt9QNEtrD90Xi7Ri6VCreMT8XMdNW9jf7bfftxnN0v3O2ngtID1qR
	 dCIEb50SfFlTrZ8qgDYFGQ7I21L2PJ6X/eNvJgUvOMMNjMRT0u0frx1ItcYZpffxOG6g/
	 kFa1P+bkJOUP1JVRhVzPmj18zIIsj5Z/U8gqEQc4kf0rV3RZWaPFbs/0Xvhotbb1Qolqi
	 hIuAinbPHazrLZ8V9YaiIXKLK2TypLo115tZnPsayd73JGSmrfj0uOJVFk0VhYrTYnZem
	 tLv1TURLs+T6swJEDnLc0dVxYCGdZIlrh/Ue6YqVo4FIZN1IFIun8H2tLelFfYE7ehw==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=IfnD6CrD;
	dmarc=pass header.from=gmail.com;
	spf=pass smtp.mailfrom=gmail.com;
	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 B4697606A337;
	Wed, 18 Nov 2026 02:28:21 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=IfnD6CrD
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.214.171
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1794968900;
	b=BLMJTzsh4Ocaple0c4QgkfpouSgG3t/S0TKP3PrkURqSSfBZzyUJlXT53v8FI3l342Wd
	 24CbP/kbFMsji51ijGcwpA2ZsN6KovlaV4oXVFe3h59moV5KasQbNSl3aptnxy8EUOzE2
	 0jlCTf+L2CrhL27ggPnA54ENfbvMw5zn+BvxqE/58H4AYWTsfg6uwwxF/9vQsJ/IE8E8o
	 +qNwDu0IhVFMAvMx3vIKzfz2mII4P4KbSd09bXV3WOiKCaqUIfhr8/IpkZRs1pBg9v1HL
	 oNyhF5XGSzKI0IPv0P0xgWYtifs+x88EGMPxN9BkD330L5cKhaIkVvnD3N29K3q3heg==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794968900;
	h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
	 X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received:
	 From:To:Cc:Subject:Date:Message-ID:X-Mailer:MIME-Version:
	 Content-Transfer-Encoding;
	bh=bBM1tckyz85/mFdKRLmUacT5H4u3cjM1OdFw/h4C7tI=;
	b=uWgnGwnYPW11PboTulpja/h9Hw9/o7U76rZ7EyLlVl9frEffshjXTQG9RitMKFeM04y1
	 fTYzvSK4EoH4MFhMWswqkmDDSR8nq0CqBxqJrJtkZOW+OPozUnFA/zHByRH9MUmaxnIEu
	 oHh14Kf3W4tHuBYlQSuD2xsYeAFsPBkzzDnSRsbncgh0ATtRK9G9bVZtMr8bUwvLWHxzu
	 1URRQEVO8E5lJBdA7mIVLBDABrp+5cwybcJHlcmfiG+ucD4ZTqQodxx/4ctzd00CETfmA
	 f1QZxjKaTyYYRFd6okN+AYEgMTWNEK/rBeVprQb4s87Y9Iqkx+GQoxkJPz9TYx9WcgQ==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=gmail.com;
	spf=pass smtp.mailfrom=gmail.com;
	dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=IfnD6CrD;
	arc=none smtp.remote-ip=209.85.214.171
X-Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171])
	(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 787A7606A31C
	for <netdev@vger.kernel.org>; Wed, 18 Nov 2026 02:28:20 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 787A7606A31C
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
X-Received: by mail-pl1-f171.google.com with SMTP id d9443c01a7336-2e99b1e5b4cso3282565ad.0
        for <netdev@vger.kernel.org>; Tue, 17 Nov 2026 18:28:20 -0800 (PST)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20260707; t=1794968900; x=1795573700; darn=vger.kernel.org;
        h=content-transfer-encoding:mime-version:message-id:date:subject:cc
         :to:from:from:to:cc:subject:date:message-id:reply-to:content-type;
        bh=bBM1tckyz85/mFdKRLmUacT5H4u3cjM1OdFw/h4C7tI=;
        b=IfnD6CrDsAMUkk3Wmlw79A10NLxrndNMXRede91i+PMYlQ6UxlCc/wEKS86x2VRcBs
         ELbpQgwL4eS3jvxLIlVe03/VbCpjs85zTmBawmM7kkJqUY6TsT0ABq1gnL0Jo3V3TKUf
         f274JqEjdeGqoFuZfDkrM2+WIMXd2L/rMxga5asPktqPWuegCJVV/3soYR/vFI7MgsvR
         6oRAJWiIMzODUrRZeYyfyrwX4yMwDGS8kz82Kp+ovKFydYPachZjICuqDlK5dZly0H1D
         R/TRCRA3Lms2UKmFtyXhpQVzWPLPoNg3nONno6ebKgXoeXy9ySWd6MNYSJWotAomKgr9
         4uOg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20260707; t=1794968900; x=1795573700;
        h=content-transfer-encoding:mime-version:message-id:date:subject:cc
         :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date
         :message-id:reply-to:content-type;
        bh=bBM1tckyz85/mFdKRLmUacT5H4u3cjM1OdFw/h4C7tI=;
        b=cWZlMiwvSuipd6E7PIkfHiC5K+BddSw9UELRsVDvCLl6U2KX8o3Dv6SVah9jC7sHoM
         ExeaOpHPWZ79lJrAbKKebeDHg+AR3MFQl+rEYSPt9GkTwVXCQL6m2THANN9lQ0p1FGhF
         +o70T1PkTkEjHBCW7ItJOuOunzoil3qTPuZ9UsNKUN3stu8sRS91SSWxcjlgARDk7txW
         O96oMpusJH4VF9m6UqAHri1z10x5PhceH9PZr5Jo1pGHQlig7Kl+2lEkWG7OOZJJoaAK
         Umk4YAlar2JbSfDDQk9Xy2AP89LhOThyZhQGQIQTNi/g2yP9m1slMgBycTl4roPptaSI
         ldOw==
X-Forwarded-Encrypted: i=1; AL+hErGu4s6JtTd8yBGzivgBxZV+m6q3ExLEmdCQHngpygIZu2iYO539cf3Qv3bFTNcpJJ0bKn18g2Y=@vger.kernel.org
X-Gm-Message-State: APuU4Z+un2yV9oQc+4tAM2Mt2f+ul6pSLVWzb8Vdp/yU0KDNk1qUgFlN
	VEQFdKxCzmHQv883nqC2C07Z63QSdHZf2Ec7cbUf/afphCOqYAhd5C8N
X-Gm-Gg: AZFdTZcKY16MOxtxIZxL74rprKDVpvM34SfWOWOcMvJmex3lJkzTS8L/ENxBnzHcyXD
	6I5m4FbExDEljj13vlBjwQykBImlmhU9/KFgjYlTwdMtbYAZrW3QBXz+9Rj34Fn5UAeDx2Xvg1Z
	Pcd7hmuQjYmD7s/KiGdMjaGaHHobfTuIQm9zFkhtfeT354r42XLKATiTD463vIb1Y6BcyHC35wE
	8yirO496Ruu0IyWve/9kZsQfY39jtQKxTgS6rWkWYfg0ElXR9LI8hTfh7V0oyTeL4GiF6AFWRhY
	3SzXU6oPMzosgrka0H4wMeZzS1Je9Ai1ooVOivfKWLbnnnubX0EUvfBkF6+MTdsyBpTFsS3xft5
	CJKBRJDoXZWgtJ5ZAebth4AfdNnyTfpHVF8QFXS9RpMTsnhAy0dEQhYEuVS+KMmqMUf/KyMJO59
	odL+vkmfAVXqwyGuffC9QUtPVz0dzYgXEK533HfiSVPYUu/pcS6xhFE830SLGdKEXWX5P1t48n7
	aPHtpWbYnZrH+aRe22NtrosxHBXhEHDQ1WKY0cbPCmytL7vkxQwALn4dcgUrl9kAo4a5+bwCf4V
	yGSaiux0huFq9A7qMfkcyGHRMrtU5MXjNQ8itcyv5bJWhVz2eDk0HqSfMw0tLodcCYafinFZ7y7
	z/IqT3vYv67JU2gcSfuegZHA=
X-Received: by 2002:a17:903:32d1:b0:2e8:18ca:5f46 with SMTP id d9443c01a7336-2eff72e6095mr11400325ad.14.1794968899679;
        Tue, 17 Nov 2026 18:28:19 -0800 (PST)
X-Received: from message.eml ([2a09:bac1:76e0:450::21f:e8])
        by smtp.gmail.com with ESMTPSA id d9443c01a7336-2eff617f8cesm4756605ad.27.2026.11.17.18.28.15
        (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256);
        Tue, 17 Nov 2026 18:28:19 -0800 (PST)
X-Cc: Kuniyuki Iwashima <kuniyu@google.com>,
	Simon Horman <horms@kernel.org>,
	Shuah Khan <shuah@kernel.org>,
	Tim Fuechsel <t.fuechsel@gmx.de>,
	Lukas Prause <lukas.prause@ikt.uni-hannover.de>,
	netdev@vger.kernel.org,
	linux-kselftest@vger.kernel.org,
	linux-kernel@vger.kernel.org
X-Mailer: git-send-email 2.54.0
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