Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mptcp: add_addr: more tolerant with retrans timeout after errors #98

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// connection initiated by packetdrill
--tolerance_usecs=200000
--tolerance_usecs=500000
`../common/defaults.sh`

+0 `sysctl -wq net.mptcp.add_addr_timeout=1`
Expand All @@ -19,16 +19,23 @@
+0 > . 1:1(0) ack 1 <add_address address_id=1 addr[saddr0] hmac=auto>
// send echo with wrong address, expect a retry in 1s
+0 < . 1:1(0) ack 1 win 257 <add_address address_id=1 addr[ep=inet_addr("1.2.3.4")] addr_echo, dss dack4=1 ssn=1 dll=0 nocs>
+1.0 > . 1:1(0) ack 1 <add_address address_id=1 addr[saddr0] hmac=auto>

// We expect the restransmissions to come ~1s after the last sent packet but in packetdrill, the timing is compared to the last packet.
// The last packet here is not the ADD_ADDR that was sent before (which should have been sent 1 second before the retransmission) but it was
// the injected and falty echo ADD_ADR: with a slow host, it can takes a bit of time... We need to be more tolerant here to take the time to
// inject the previous packet. Because we have another test validating the timing for the retransmissions, we can be very tolerant here.
+0~+1.0 > . 1:1(0) ack 1 <add_address address_id=1 addr[saddr0] hmac=auto>
// send echo with wrong id, expect a retry in 1s
+0 < . 1:1(0) ack 1 win 257 <add_address address_id=90 addr[saddr0] addr_echo>
+1.0 > . 1:1(0) ack 1 <add_address address_id=1 addr[saddr0] hmac=auto>

+0~+1.0 > . 1:1(0) ack 1 <add_address address_id=1 addr[saddr0] hmac=auto>
// send echo with correct id, expect no retry
+0 < . 1:1(0) ack 1 win 257 <add_address address_id=1 addr[saddr0] addr_echo>

// read and ack 1 data segment
+1.1 < P. 1:1001(1000) ack 1 win 450 <nop, nop, dss dack8=1 dsn8=1 ssn=1 dll=1000 nocs>
+0 > . 1:1(0) ack 1001 <dss dack8=1001 ssn=1 dll=0 nocs>
+1.1 < P. 1:1001(1000) ack 1 win 450 <nop, nop, dss dack8=1 dsn8=1 ssn=1 dll=1000 nocs>
+0 > . 1:1(0) ack 1001 <dss dack8=1001 ssn=1 dll=0 nocs>
+0.3 read(4, ..., 1000) = 1000

+0 close(4) = 0
+0 > . 1:1(0) ack 1001 <dss dack8=1001 dsn8=1 ssn=0 dll=1 nocs fin, nop, nop>
+0 > . 1:1(0) ack 1001 <dss dack8=1001 dsn8=1 ssn=0 dll=1 nocs fin, nop, nop>
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@

// ADD_ADDR is sent directly (>= 5.12), not after first data (< 5.12)
+0 > . 1:1(0) ack 1 <add_address address_id=1 addr[saddr0] hmac=auto>
// send echo with wrong address, expect a retry in 1s
+0 < . 1:1(0) ack 1 win 257 <add_address address_id=1 addr[ep=inet6_addr("2001:db8::c1a0")] addr_echo>

// Retransmitted after one second
+1.0 > . 1:1(0) ack 1 <add_address address_id=1 addr[saddr0] hmac=auto>
// send echo with wrong id, expect a retry in 1s
+0 < . 1:1(0) ack 1 win 257 <add_address address_id=90 addr[saddr0] addr_echo>
+1.0 > . 1:1(0) ack 1 <add_address address_id=1 addr[saddr0] hmac=auto>

// send echo with correct id, expect no retry
+0 < . 1:1(0) ack 1 win 257 <add_address address_id=1 addr[saddr0] addr_echo>

// read and ack 1 data segment
+1.1 < P. 1:1001(1000) ack 1 win 450 <nop, nop, dss dack8=1 dsn8=1 ssn=1 dll=1000 nocs>
+0 > . 1:1(0) ack 1001 <dss dack8=1001 ssn=1 dll=0 nocs>
Expand Down