[PATCH net v2 0/2] tcp: roccet: fix idle restart on RTO
From: Zhiqi Zhang
Date: Tue Nov 17 2026 - 21:28:25 EST
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@xxxxxxxxx/
Eric's review:
https://lore.kernel.org/all/CAL4WiiohBWs_BteL4o__osD6cPTXrBBPa-P7faV=acTaF_4g3w@xxxxxxxxxxxxxx/
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)