Page MenuHomeFreeBSD

Support RTT measurement even if switching from the rack stack to the base stack
ClosedPublic

Authored by tuexen on Nov 18 2018, 11:36 AM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 20 2023, 2:52 AM
Unknown Object (File)
Dec 12 2023, 7:12 AM
Unknown Object (File)
Nov 15 2023, 2:59 PM
Unknown Object (File)
Nov 10 2023, 8:05 AM
Unknown Object (File)
Nov 8 2023, 8:10 AM
Unknown Object (File)
Nov 7 2023, 12:09 AM
Unknown Object (File)
Oct 29 2023, 4:50 AM
Unknown Object (File)
Oct 18 2023, 1:19 PM
Subscribers

Details

Summary

If a client is using the rack stack to initiate a TCP connection to a server not supporting the TCP SACK extension, the client side switches on reception of the SYN-ACK the stack to the base stack. The base stack should be able to use the SYN/SYN-ACK for an initial RTT measurement, as if the base stack was used right from the beginning.

This patch allows the base stack to perform this measurement after switchback.

Test Plan

Get the tests from rcv-syn-closing passing after setting sysctl net.inet.tcp.functions_default=rack.
They use FIN retransmissions and they occur at the wrong time if not RTT measurement is performed.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

rack.c
8521 ↗(On Diff #50555)

Why are you adding this code here? Rack times its RTT's based
on the send_map i.e. each segment sent. Is there some reason you
would want to use t_rtttime too?

tuexen added inline comments.
rack.c
8521 ↗(On Diff #50555)

The reason (as indicated in the last sentence of the comment) is that in case you switch back to the base stack, the base stack will use these variables.

Assume a client initiating a TCP connection to a server not supporting the SACK extension.
If the client uses the base stack, the SYN/SYN-ACK exchange is used for an initial RTT measurement and a later retransmission will be based on that RTT measurement.
If the client uses the RACK stack without this change, the bases stack, which processes the SYN-ACK will not do an RTT measurement since these variables are not set and a later retransmission will be based on RTO.Initial.
Using this patch avoids this difference.

rrs added inline comments.
rack.c
8521 ↗(On Diff #50555)

Ahh thanks for the explanation.. I knew it had to be something I had not realized :)

This revision is now accepted and ready to land.Nov 20 2018, 9:36 PM
This revision was automatically updated to reflect the committed changes.