While coalescing all ECN-related code into new common source files,
the flag to deal with SACK retransmissions was skipped. This leads
to non-compliant ECT-marking of SACK retransmissions, as well as
the premature sending of other TCP ECN flags (CWR).
Details
- Reviewers
rrs tuexen glebius - Group Reviewers
transport - Commits
- rG2ff07d9220a0: tcp: Restore correct ECT marking behavior on SACK retransmissions
'''
// Testing ECT on SACK rexmit and CWR on RTO
--tolerance_usecs=200000
+0 sysctl net.inet.tcp.cc.algorithm=newreno
+0.02 sysctl net.inet.tcp.initcwnd_segments=10
+0.02 sysctl net.inet.tcp.ecn.enable=1
+0.02 sysctl net.inet.tcp.hostcache.purgenow=1
// Create a listening TCP socket.
+0.10 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3
+0.01 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
+0.01 setsockopt(3, SOL_SOCKET, SO_SNDBUF, [1048576], 4) = 0
+0.01 setsockopt(3, SOL_SOCKET, SO_DEBUG, [1], 4) = 0
+0.01 bind(3, ..., ...) = 0
+0.01 listen(3, 1) = 0
// Establish a TCP connection.
+0.04 <[noecn] SEW 0:0(0) win 65535 <mss 1000, sackOK, wscale 10, eol, nop, nop >
+0.00 >[noecn] SE. 0:0(0) ack 1 win 65535 <...>
+0.00 <[noecn] . 1:1(0) ack 1 win 65535
+0.00 accept(3, ..., ...) = 4
// Send IW plus 1 segment, check ECN bits
0.4 write(4, ..., 15000) = 15000
+0 >[ect0] . 1:1001(1000) ack 1 <...>
+0 >[ect0] . 1001:2001(1000) ack 1 <...>
+0 >[ect0] . 2001:3001(1000) ack 1 <...>
+0 >[ect0] . 3001:4001(1000) ack 1 <...>
+0 >[ect0] . 4001:5001(1000) ack 1 <...>
+0 >[ect0] . 5001:6001(1000) ack 1 <...>
+0 >[ect0] . 6001:7001(1000) ack 1 <...>
+0 >[ect0] . 7001:8001(1000) ack 1 <...>
+0 >[ect0] . 8001:9001(1000) ack 1 <...>
+0 >[ect0] . 9001:10001(1000) ack 1 <...>
+0.01 <[noecn] . 1:1(0) ack 1 win 65535 <sack 1001:2001, eol, nop>
+0 >[ect0] . 10001:11001(1000) ack 1 <...>
+0.01 <[noecn] . 1:1(0) ack 1 win 65535 <sack 1001:3001, eol, nop>
+0 >[ect0] . 11001:12001(1000) ack 1 <...>
+0.01 <[noecn] . 1:1(0) ack 1 win 65535 <sack 1001:4001, eol, nop>
// the SACK retransmission should be not ECT and no CWR
+0 >[noecn] . 1:1001(1000) ack 1 <...>
+0.01 <[noecn] . 1:1(0) ack 1 win 65535 <sack 1001:5001, eol, nop>
+0.01 <[noecn] . 1:1(0) ack 1 win 65535 <sack 1001:6001, eol, nop>
+0 >[ect0] W. 12001:13001(1000) ack 1 <...>
+0.01 <[ce] W. 1:1(0) ack 1 win 65535 <sack 1001:7001, eol, nop>
+0 >[noecn] E. 13001:13001(0) ack 1 <...>
+0.01 <[noecn] . 1:1(0) ack 1 win 65535 <sack 1001:8001, eol, nop>
+0.01 <[noecn] . 1:1(0) ack 1 win 65535 <sack 1001:9001, eol, nop>
+0 >[ect0] E. 13001:14001(1000) ack 1 <...>
+0.01 <[noecn] . 1:1(0) ack 1 win 65535 <sack 1001:10001, eol, nop>
+0.01 <[noecn] . 1:1(0) ack 1 win 65535 <sack 1001:11001, eol, nop>
+0 >[ect0] PE. 14001:15001(1000) ack 1 <...>
+0.01 <[noecn] . 1:1(0) ack 1 win 65535 <sack 1001:12001, eol, nop>
+0.01 <[noecn] . 1:1(0) ack 1 win 65535 <sack 1001:13001, eol, nop>
+0.01 <[noecn] W. 1:1(0) ack 1 win 65535 <sack 1001:14001, eol, nop>
+0 >[noecn] . 15001:15001(0) ack 1 <...>
+0.01 <[noecn] . 1:1(0) ack 1 win 65535 <sack 1001:15001, eol, nop>
// the first new packet after an RTO should have CWR set
1.4 >[noecn] . 1:1001(1000) ack 1 <...>
+0.3 <[noecn] . 1:1(0) ack 15001 win 65535
+0 write(4, ..., 1000) = 1000
+0 >[ect0] PW. 15001:16001(1000) ack 1 <...>
+0.01 close(4) = 0
+0.01 >[noecn] F. 16001:16001(0) ack 1 <...>
+0.10 <[noecn] F. 1:1(0) ack 16002 win 65535
+0.02 >[noecn] . 16002:16002(0) ack 2 <...>
'''
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable