Page MenuHomeFreeBSD

Don't zero out srtt after excess retransmits

Authored by rstone on Feb 9 2017, 6:18 PM.



If the TCP stack has retransmitted more than 1/4 of the total
number of retransmits before a connection drop, it decides that
its current RTT estimate is hopelessly out of date and decides
to recalculate it from scratch starting with the next ACK.

Unfortunately, it implements this by zeroing out the current RTT
estimate. Drop this hack entirely, as it makes it significantly more
difficult to debug connection issues. Instead check for excessive
retransmits at the point where srtt is updated from an ACK being
received. If we've exceeded 1/4 of the maximum retransmits,
discard the previous srtt estimate and replace it with the latest
rtt measurement.

Diff Detail

rS FreeBSD src repository - subversion
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

rstone retitled this revision from to Don't zero out srtt after excess retransmits.
rstone edited the test plan for this revision. (Show Details)
rstone updated this object.
gnn added inline comments.
3497 ↗(On Diff #24943)

nit pick. I'd like another set of parens here to group the sub-expressions.

122 ↗(On Diff #24943)


rstone edited edge metadata.
  • fixup! Don't zero out srtt after excess retransmits
gnn added a reviewer: gnn.
This revision is now accepted and ready to land.Feb 11 2017, 4:54 PM
This revision was automatically updated to reflect the committed changes.
lstewart added inline comments.

I realise you're just shuffling around the original logic, but I'm curious if, based on the investigation that led you to this nit, you have any data around why updating the smoothed estimate is appropriate when rxtshift <= 3 but not >3?


No, I have no data that justifies this particular value. It's just what we've always done.