Page MenuHomeFreeBSD

More rwnd issues with rack and bbr
ClosedPublic

Authored by rrs on Jun 16 2020, 4:21 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Apr 13, 7:14 PM
Unknown Object (File)
Feb 18 2024, 1:07 AM
Unknown Object (File)
Jan 14 2024, 6:19 AM
Unknown Object (File)
Dec 22 2023, 11:05 PM
Unknown Object (File)
Nov 4 2023, 3:49 PM
Unknown Object (File)
Sep 12 2023, 10:32 PM
Unknown Object (File)
Sep 6 2023, 12:29 AM
Unknown Object (File)
Sep 1 2023, 12:08 AM
Subscribers

Details

Summary

So in doing final checks on OCA firmware with all the latest tweaks the dup-ack checking
packet drill script was failing with a number of unexpected acks. So it turns
out if you have the default recvwin set up to 1Meg (like OCA's do) and you
have no window scaling (like the dupack checking code) then we have another
case where we are always trying to update the rwnd and sending an
ack when we should not.

You can use the same dupack checker to recreate this and set your default recv and send buffers
to 1Meg.

Test Plan
--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

Event Timeline

rrs requested review of this revision.Jun 16 2020, 4:21 PM
rrs created this revision.
tuexen edited the test plan for this revision. (Show Details)
This revision is now accepted and ready to land.Jun 16 2020, 6:05 PM