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)
Sep 7 2024, 2:33 PM
Unknown Object (File)
Sep 7 2024, 1:58 PM
Unknown Object (File)
Sep 7 2024, 12:30 PM
Unknown Object (File)
Sep 2 2024, 7:03 PM
Unknown Object (File)
Aug 29 2024, 3:25 AM
Unknown Object (File)
Aug 16 2024, 11:58 PM
Unknown Object (File)
Aug 15 2024, 4:50 AM
Unknown Object (File)
Aug 3 2024, 10:55 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.