Page MenuHomeFreeBSD

Fix spurious retransmit recovery on low latency networks
ClosedPublic

Authored by kmacy on Nov 17 2016, 11:40 PM.
Referenced Files
Unknown Object (File)
Wed, Dec 18, 3:40 PM
Unknown Object (File)
Mon, Nov 25, 12:59 PM
Unknown Object (File)
Nov 15 2024, 2:16 PM
Unknown Object (File)
Nov 9 2024, 2:27 AM
Unknown Object (File)
Nov 9 2024, 2:22 AM
Unknown Object (File)
Nov 9 2024, 2:12 AM
Unknown Object (File)
Nov 8 2024, 10:17 PM
Unknown Object (File)
Nov 5 2024, 3:31 PM

Details

Summary

TCP's smoothed RTT (SRTT) can be much larger than an actual observed RTT. This can be either because of hz restricting the calculable RTT to 10ms in VMs or 1ms using the default 1000hz or simply because SRTT recently incorporated a larger value.

If an ACK arrives before the calculated badrxtwin (now + SRTT):
tp->t_badrxtwin = ticks + (tp->t_srtt >> (TCP_RTT_SHIFT + 1));

We'll erroneously reset snd_una to snd_max. If multiple segments were dropped and this happens repeatedly the transmit rate will be limited to 1MSS per RTO until we've retransmitted all drops.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 6053

Event Timeline

kmacy retitled this revision from to Fix spurious retransmit recovery on low latency networks.
kmacy updated this object.
kmacy edited the test plan for this revision. (Show Details)
kmacy added reviewers: hiren, rstone.
kmacy set the repository for this revision to rS FreeBSD src repository - subversion.
kmacy added a project: network.
kmacy added a subscriber: transport.
kmacy edited edge metadata.

simplify badrxtwin assignment

kmacy edited edge metadata.

Add comment to tcp_timer.c as requested by hiren@

hiren edited edge metadata.

Thanks for this fix. Nice catch.

Please also mention in the commit log that now we are tracking this functionality separately for timestamps and non-timestamps case.

sys/netinet/tcp_timer.c
717

Please add a comment here that this is handling non-ts case and ts case is handled in tcp_output.c
It may seem obvious but comments would help. :-)

This revision is now accepted and ready to land.Nov 18 2016, 4:32 AM
kmacy edited edge metadata.

add missed check

This revision now requires review to proceed.Nov 23 2016, 9:56 PM
This revision is now accepted and ready to land.May 26 2017, 7:57 AM

@rstone have you committed an equivalent fix already?

@kmacy I have not. We probably have an equivalent fix committed locally @ $WORK but it might be tied too closely to the high-precision timestamp work to easily extract.

This revision was automatically updated to reflect the committed changes.