| 1 |
// SPDX-License-Identifier: GPL-2.0 |
| 2 |
// Test PRR-slowstart implementation. |
| 3 |
// In this variant we verify that the sender uses SACK info on an ACK |
| 4 |
// below snd_una. |
| 5 |
|
| 6 |
// Set up config. |
| 7 |
`./defaults.sh` |
| 8 |
|
| 9 |
// Establish a connection. |
| 10 |
0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3 |
| 11 |
+0 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0 |
| 12 |
+0 bind(3, ..., ...) = 0 |
| 13 |
+0 listen(3, 1) = 0 |
| 14 |
|
| 15 |
+0 < S 0:0(0) win 32792 <mss 1000,sackOK,nop,nop,nop,wscale 8> |
| 16 |
+0 > S. 0:0(0) ack 1 <mss 1460,nop,nop,sackOK,nop,wscale 8> |
| 17 |
// RTT 10ms |
| 18 |
+.01 < . 1:1(0) ack 1 win 320 |
| 19 |
+0 accept(3, ..., ...) = 4 |
| 20 |
|
| 21 |
// Send 10 data segments. |
| 22 |
+0 write(4, ..., 10000) = 10000 |
| 23 |
+0 > P. 1:10001(10000) ack 1 |
| 24 |
|
| 25 |
// Lost packet 1:1001,4001:5001,7001:8001. |
| 26 |
+.01 < . 1:1(0) ack 1 win 320 <sack 1001:2001,nop,nop> |
| 27 |
+0 < . 1:1(0) ack 1 win 320 <sack 1001:3001,nop,nop> |
| 28 |
+0 < . 1:1(0) ack 1 win 320 <sack 1001:3001 8001:9001,nop,nop> |
| 29 |
+0 > . 1:1001(1000) ack 1 |
| 30 |
|
| 31 |
+.012 < . 1:1(0) ack 4001 win 320 <sack 8001:9001,nop,nop> |
| 32 |
+0 > . 4001:7001(3000) ack 1 |
| 33 |
|
| 34 |
+0 write(4, ..., 10000) = 10000 |
| 35 |
|
| 36 |
// The following ACK was reordered - delayed so that it arrives with |
| 37 |
// an ACK field below snd_una. Here we check that the newly-SACKed |
| 38 |
// 2MSS at 5001:7001 cause us to send out 2 more MSS. |
| 39 |
+.002 < . 1:1(0) ack 3001 win 320 <sack 5001:7001,nop,nop> |
| 40 |
+0 > . 7001:8001(1000) ack 1 |
| 41 |
+0 > . 10001:11001(1000) ack 1 |