Page MenuHomeFreeBSD

tcp: implement ACE-change ACKs
Needs ReviewPublic

Authored by rscheff on Nov 13 2023, 4:06 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mar 25 2024, 10:34 PM
Unknown Object (File)
Mar 2 2024, 4:40 PM
Unknown Object (File)
Mar 2 2024, 4:40 PM
Unknown Object (File)
Mar 2 2024, 4:40 PM
Unknown Object (File)
Mar 2 2024, 4:40 PM
Unknown Object (File)
Mar 2 2024, 4:40 PM
Unknown Object (File)
Mar 2 2024, 4:40 PM
Unknown Object (File)
Mar 2 2024, 4:40 PM

Details

Reviewers
tuexen
rrs
cc
glebius
thj
Group Reviewers
transport
Summary

Missed the change triggered ACKs from AccECN draft. Whenever the accumulated
change in the locally received CE packet counter (rcep) exceeds 3, immediately
reflect that change back to the other end with a pure ACK.

Also, minor updates around ACE helper functions:

  • make them static inline
  • get/set by using masking and shifting
Test Plan

'''
// Testing AccECN ACE (CE-triggered) ACK

--tolerance_usecs=2000000

Set sysctl defaults
0.0 sysctl net.inet.tcp.cc.algorithm=newreno
+0.1 sysctl net.inet.tcp.functions_default=freebsd
+0.1 sysctl net.inet.tcp.initcwnd_segments=10
+0.1 sysctl net.inet.tcp.ecn.enable=4
+0.1 sysctl net.inet.tcp.hostcache.purgenow=1
+0.1 tcpdump -i tun0 -w accecn.trc tcp &

// Test Server side

// Establish a AccECN TCP session, ECT1
+0.0 echo 'server: AccECN ECT1'
+0.50 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3
+0.01 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
+0.01 setsockopt(3, SOL_SOCKET, SO_LINGER, {onoff=1, linger=0}, 8) = 0
+0.01 bind(3, ..., ...) = 0
+0.01 listen(3, 1) = 0
+0.04 <[ect1] S7 0:0(0) win 65535 <mss 1000, wscale 10, eol >
+0.00 >[noecn] SEW. 0:0(0) ack 1 win 65535 <...>
+0.00 <[noecn] . 1:1(0) ack 1 win 65535
+0.00 accept(3, ..., ...) = 7
+0.00 write(7, ..., 10000) = 10000
+0.00 >[ect0] .5 1:1001(1000) ack 1 win 1032 <...>
+0.00 >[ect0] .5 1001:2001(1000) ack 1 win 1032 <...>
+0.00 >[ect0] .5 2001:3001(1000) ack 1 win 1032 <...>
+0.00 >[ect0] .5 3001:4001(1000) ack 1 win 1032 <...>
+0.00 >[ect0] .5 4001:5001(1000) ack 1 win 1032 <...>
+0.00 >[ect0] .5 5001:6001(1000) ack 1 win 1032 <...>
+0.00 >[ect0] .5 6001:7001(1000) ack 1 win 1032 <...>
+0.00 >[ect0] .5 7001:8001(1000) ack 1 win 1032 <...>
+0.00 >[ect0] .5 8001:9001(1000) ack 1 win 1032 <...>
+0.00 >[ect0] P.5 9001:10001(1000) ack 1 win 1032 <...>

// Return volley of CE-marked ACKs

+0.01 <[ce] .5 1:1(0) ack 1001 win 65535
+0.01 <[ce] .5 1:1(0) ack 2001 win 65535
+0.01 <[ce] .5 1:1(0) ack 3001 win 65535

After 3 CE marks received, expect
pure ACK with updated ACE field
// (5 + 3) modulo 8 is 0

+0.00 >[noecn] .0 10001:10001(0) ack 1 win 1032 <...>

+0.01 <[ce] .5 1:1(0) ack 4001 win 65535
+0.01 <[ce] .5 1:1(0) ack 5001 win 65535
+0.01 <[ce] .5 1:1(0) ack 6001 win 65535

+0.00 >[noecn] .3 10001:10001(0) ack 1 win 1032 <...>

+0.01 <[ce] .5 1:1(0) ack 7001 win 65535
+0.01 <[ce] .5 1:1(0) ack 8001 win 65535
+0.01 <[ce] .5 1:1(0) ack 9001 win 65535

+0.00 >[noecn] .6 10001:10001(0) ack 1 win 1032 <...>

+0.2~+0.3 >[noecn] P.6 9001:10001(1000) ack 1 win 1032 <...>

+0.00 close(7) = 0
+0.00 >[noecn] R. 10001:10001(0) ack 1 win 0 <...>
+0.00 close(3) = 0

`{
sysctl net.inet.tcp.functions_default=freebsd;
sysctl net.inet.tcp.cc.algorithm=newreno;
sysctl net.inet.tcp.initcwnd_segments=10;
sysctl net.inet.tcp.rfc3465=1;
sysctl net.inet.tcp.rfc1323=1;
sysctl net.inet.tcp.sack.enable=1;
sysctl net.inet.tcp.rexmit_slop=200;
sysctl net.inet.tcp.rexmit_min=30;
sysctl net.inet.tcp.rexmit_initial=1000;
sysctl net.inet.tcp.ecn.enable=2;
killall tcpdump;
}`

'''

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 56081
Build 52970: arc lint + arc unit

Event Timeline

  • name magic constant when to trigger an ACE-ACK
  • skip over normal ACK processing for pure ACE-ACKs
rscheff retitled this revision from [tcp] implement ACE-change ACKs to tcp: implement ACE-change ACKs.Dec 2 2023, 8:17 AM