In doing some testing for a different problem, I have found rack retransmitting
all outstanding data every time a timeout occurs. The outstanding is sent 1ms
apart between each packet, and then the timeout runs off again. This causes
extra retransmissions when we should be waiting for an ack after sending the
very first segment.
Details
Details
- Reviewers
tuexen - Group Reviewers
transport - Commits
- rG81560c55823b: TCP: Rack ends up sending all that is outstanding every timeout.
The following pkt drill script fails with the wrong behavior but with this patch
works as expected:
--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 8,sackOK,TS val 100 ecr 0> +0.020 < S. 0:0(0) ack 1 win 32767 <mss 1448> * > . 1:1(0) ack 1 win 65535 // Verify that there are no errors pending at the socket layer. +0.10 getsockopt(3, SOL_SOCKET, SO_ERROR, [0], [4]) = 0 +0.00 setsockopt(3, IPPROTO_TCP, TCP_FUNCTION_BLK, {function_set_name="rack", pcbcnt=0}, 36) = 0 +0.00 send(3, ..., 1448, 0) = 1448 * > P. 1:1449(1448) ack 1 win 65535 +0.0 send(3, ..., 4344, 0) = 4344 * > . 1449:2897(1448) ack 1 win 65535 * > . 2897:4345(1448) ack 1 win 65535 * > P. 4345:5793(1448) ack 1 win 65535 +.001 < . 1:1(0) ack 1449 win 32000 * > . 1449:2897(1448) ack 1 win 65535 * > . 1449:2897(1448) ack 1 win 65535 * > . 1449:2897(1448) ack 1 win 65535 * > . 1449:2897(1448) ack 1 win 65535 * > . 1449:2897(1448) ack 1 win 65535 * > . 1449:2897(1448) ack 1 win 65535 * > . 1449:2897(1448) ack 1 win 65535 * > . 1449:2897(1448) ack 1 win 65535 * > . 1449:2897(1448) ack 1 win 65535 * > . 1449:2897(1448) ack 1 win 65535 * > . 1449:2897(1448) ack 1 win 65535 * > . 1449:2897(1448) ack 1 win 65535 * > R. 5793:5793(0) ack 1 win 0 +0.00 close(3) = 0
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable