Page MenuHomeFreeBSD

Missing pieces to make rack properly respond to 3 dup-acks
ClosedPublic

Authored by rrs on Jun 16 2020, 11:48 AM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 26 2024, 9:28 PM
Unknown Object (File)
Dec 23 2023, 12:20 AM
Unknown Object (File)
Dec 3 2023, 1:18 PM
Unknown Object (File)
Sep 6 2023, 12:10 AM
Unknown Object (File)
Sep 6 2023, 12:07 AM
Unknown Object (File)
Sep 6 2023, 12:06 AM
Unknown Object (File)
Aug 31 2023, 11:42 PM
Unknown Object (File)
Aug 24 2023, 9:59 PM
Subscribers

Details

Summary

So it turns out rack has a shortcoming in dup-ack counting. It counts the dupacks but
then does not properly respond to them. This is because a few missing bits are not present.
BBR actually does properly respond (though it also sends a TLP which is interesting and
maybe something to fix)..

Test Plan

The following dupack pkt drill can show the issue and also the fix

--ip_version=ipv4

+0.00 `sysctl -w net.inet.tcp.hostcache.purgenow=1`
+0.00 `sysctl -w net.inet.tcp.syncookies_only=0`
+0.00 `sysctl -w net.inet.tcp.syncookies=1`
+0.00 `sysctl -w net.inet.tcp.rfc1323=1`
+0.00 `sysctl -w net.inet.tcp.sack.enable=1`
+0.00 `sysctl -w net.inet.tcp.ecn.enable=2`
// Create a TCP endpoint in the ESTABLISHED state.
+0.00 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3
+0.00 fcntl(3, F_GETFL) = 0x02 (flags O_RDWR)
+0.00 fcntl(3, F_SETFL, O_RDWR | O_NONBLOCK) = 0
+0.00 setsockopt(3, IPPROTO_TCP, TCP_LOG, [4], 4) = 0
+0.00 connect(3, ..., ...) = -1 EINPROGRESS (Operation now in progress)
+0.00 > S  0:0(0) win 65535 <mss 1460,nop,wscale 6,sackOK,TS val 100 ecr 0>
+0.10 < S. 0:0(0) ack 1 win 32767 <mss 1460,sackOK,TS val 500 ecr 100>
* >  . 1:1(0) ack 1 win 65535 <nop,nop,TS val 200 ecr 500>
// Verify that there are no errors pending at the socket layer.
+0.10 getsockopt(3, SOL_SOCKET, SO_ERROR, [0], [4]) = 0
// Change to BBR
+0.00 setsockopt(3, IPPROTO_TCP, TCP_FUNCTION_BLK, {function_set_name="rack_latest", pcbcnt=0}, 36) = 0
+0.00 send(3, ..., 1448, 0) = 1448
* > P. 1:1449(1448) ack 1 win 65535 <nop,nop,TS val 300 ecr 500>
+.10 <  . 1:1(0) ack 1449 win 32000 <nop, nop, TS val 600 ecr 300>
+0.0  send(3, ..., 4344, 0) = 4344
*  > . 1449:2897(1448) ack 1 win 65535 <nop,nop,TS val 400 ecr 600>
+0.00  <  . 1:1(0) ack 1449 win 32000 <nop, nop, TS val 600 ecr 300>
*  > . 2897:4345(1448) ack 1 win 65535 <nop,nop,TS val 500 ecr 600>
+0.00  <  . 1:1(0) ack 1449 win 32000 <nop, nop, TS val 700 ecr 300>
*  > P. 4345:5793(1448) ack 1 win 65535 <nop,nop,TS val 600 ecr 600>
+0.00  <  . 1:1(0) ack 1449 win 32000 <nop, nop, TS val 800 ecr 300>
*  > . 1449:2897(1448) ack 1 win 65535 <nop,nop,TS val 700 ecr 800>
+.10 <  . 1:1(0) ack 5793 win 32000 <nop, nop, TS val 900 ecr 700>
// Tear it down.
+0.00 close(3) = 0
+0.00 > F. 5793:5793 (0) ack 1 win 65535 <nop,nop,TS val 800 ecr 900>
+0.10 < F. 1:1(0) ack 5794 win 32767 <nop,nop,TS val 1000 ecr 800>
+0.00 > . 5794:5794 (0) ack 2 win 65535 <nop,nop,TS val 900 ecr 1000>

Diff Detail

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