[PATCH net v3 0/3] tcp: preserve RACK tracking across partial undo
From: nramaswamy
Date: Fri Oct 09 2026 - 01:03:46 EST
From: Neil Ramaswamy <nramaswamy@xxxxxxxxxx>
Partial undo can clear the TCPCB_LOST flag on segments already removed
from RACK's list, which prevents subsequent RACK loss detection, leading
to segments only being retransmitted after the RTO.
My investigation started from seeing repeated TCP stalls in prod and the
mitigation that seemed to prevent these stalls was limiting SO_SNDBUF to
96 KiB. It also seems like others have seen similar symptoms before [1].
These changes use the implementation provided by Neal Cardwell to restore
elements to the RACK list that were lost but not yet retransmitted.
Segments that are lost but already retransmitted are explicitly left to be
handled by the RTO. Since I've used your implementation Neal, I'd love a
Co-developed-by and Signed-off-by if it still looks good.
Patch 2 tests that these changes allow RACK to (re-)track a segment marked
as TCPCB_LOST but not TCPCB_EVER_RETRANS. Patch 3 tests that a segment
marked as TCPCB_LOST and TCPCB_EVER_RETRANS is transmitted by an RTO.
Changes in v3:
- Replaced sorting with Neal's implementation [2]
- Clarified the relink helper's complexity comment
- Clarified the original packetdrill test's comments
- Added a new packetdrill test for the intended RTO fallback
v2:
https://lore.kernel.org/netdev/cover.1791248202.git.nramaswamy@xxxxxxxxxx/
v1:
https://lore.kernel.org/netdev/20260926002520.42955-4-nramaswamy@xxxxxxxxxx/
[1]
https://lore.kernel.org/netdev/35A4DDAA-7E8D-43CB-A1F5-D1E46A4ED42E@xxxxxxxxx/
[2]
https://lore.kernel.org/netdev/20261006141300.1722466-1-ncardwell.sw@xxxxxxxxx/
Neil Ramaswamy (3):
tcp: restore RACK list membership when undoing loss
selftests: net: packetdrill: test RACK after partial undo
selftests: net: packetdrill: test RTO fallback after partial undo
net/ipv4/tcp_input.c | 50 +++++++++++++-
...tcp_partial_undo-restores-to-rack-list.pkt | 54 +++++++++++++++
.../tcp_partial_undo-rto-fallback.pkt | 65 +++++++++++++++++++
3 files changed, 168 insertions(+), 1 deletion(-)
create mode 100644 tools/testing/selftests/net/packetdrill/tcp_partial_undo-restores-to-rack-list.pkt
create mode 100644 tools/testing/selftests/net/packetdrill/tcp_partial_undo-rto-fallback.pkt
base-commit: 11536ee3d3e0b1bd35b6f3f8df55a6053eb0c71d
--
2.55.0