Page MenuHomeFreeBSD

Use exponential backoff also for SYN segments
ClosedPublic

Authored by tuexen on Jan 25 2019, 9:04 PM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 26 2024, 1:10 PM
Unknown Object (File)
Jan 26 2024, 1:10 PM
Unknown Object (File)
Jan 26 2024, 1:10 PM
Unknown Object (File)
Jan 26 2024, 12:57 PM
Unknown Object (File)
Dec 20 2023, 4:49 AM
Unknown Object (File)
Dec 10 2023, 6:14 PM
Unknown Object (File)
Oct 10 2023, 6:03 PM
Unknown Object (File)
Sep 18 2023, 7:45 AM
Subscribers

Details

Summary

Retransmissions of SYN segments should also use exponential backoff right from the beginning as described in the TCP RFCs.

Test Plan

Use an updated version of snd-syn.

Diff Detail

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

Event Timeline

sys/netinet/tcp_timer.c
236

I thought the separate table would be retained, just filled with similar values as below.

For example, while trying ECN fallback, not backing off exponentially but retrying linear (for the non ECN handshake) would potentially allow slightly faster session setup.

As an example, linux is over-restrictive on RFC3168 - ECN++ (SYN with ECT set) would get dropped for a significant population of servers, if introduced. At that point, a separate (linear beginning) backoff table may need to be re-introduced.

Suggest to keep the special backoff table for syn, only adjusting the values contained within, ideally for ECN backoff (default of tcp_ecn_maxtries) with a linear first step.

sys/netinet/tcp_timer.c
236

I think have two tables with the same values does not make sense.

We have right now multiple ways of modifying a SYN on retransmissions:

  • For ECN we try a number of times before turning off ECN. This number is controlled by the sysctl variable net.inet.tcp.ecn.maxretries, which defaults to 1.
  • For SACK, timestamp and window scaling we turn it off after a number of retransmissions which is hardcoded in the kernel as 2.
  • For TCP fastopen we turn is off for all retransmissions.

So I think if we want for a particular reason to avoid exponential backoff or reset the number of retransmissions, this has to be coded and (possibly) adjusted to the characteristics of the reason.

Since you are specifically referring to ECN: Right now we would retransmit the first time after 3 seconds and the second time (without ECN) after another 3 seconds. Assuming that ECN is the problem, it would take 6 seconds until the first SYN would make it through. With this change (and the reduction of RTO.Initial), the first retransmission would be after 1 second and the second would be after another 2 seconds. In total this would be 3 seconds instead of 6 seconds.

Ok, I've could not remember that there are already hardcoded exceptions for TCP options alreads. Since there is precedent that this is an accepted path to deal with special cases (such as ECN++ against a legacy Linux box, should the stack start doing ECN++, of course), i remove my objection.

Speaking of which: Who would be interest in ECN+ and ECN++?

ECN+: Have SYN/ACK with ECT - https://tools.ietf.org/html/rfc5562
ECN++: Have ECT on virtually all TCP segements- https://tools.ietf.org/html/draft-ietf-tcpm-generalized-ecn-03

I suspect we will be looking into this once getting operational expirience with DCTCP.

rrs added inline comments.
sys/netinet/tcp_timer.c
236

I agree lets not have two tables with the same value.. too confusing :-)

This revision is now accepted and ready to land.Feb 20 2019, 12:08 PM
This revision was automatically updated to reflect the committed changes.