xref: /linux/tools/testing/selftests/net/packetdrill/tcp_eor_no-coalesce-large.pkt (revision 0ad9617c78acbc71373fb341a6f75d4012b01d69)
1// SPDX-License-Identifier: GPL-2.0
2// Test TCP does not append any data from consequent writes to the tail
3// skb created for the chunk. The large chunk itself should be packetized as
4// usual.
5`./defaults.sh
6`
7
8// Initialize connection
9    0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3
10   +0 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
11   +0 bind(3, ..., ...) = 0
12   +0 listen(3, 1) = 0
13
14   +0 < S 0:0(0) win 32792 <mss 1000,sackOK,nop,nop,nop,wscale 10>
15   +0 > S. 0:0(0) ack 1 <mss 1460,nop,nop,sackOK,nop,wscale 8>
16 +.01 < . 1:1(0) ack 1 win 514
17
18   +0 accept(3, ..., ...) = 4
19
20// Write a 10400B chunk to fill the ICW, and have a 400 byte skb sitting on
21// the tail.
22   +0 write(4, ..., 10400) = 10400
23
24// Write another 10040B chunk with no coalescing options.
25   +0 send(4, ..., 10400, MSG_EOR) = 10400
26
27// Write a 2KB chunk. This chunk should not be appended to the packets created
28// the previous chunk.
29   +0 write(4, ..., 2000) = 2000
30
31   +0 > P. 1:10001(10000) ack 1
32+.001 < .  1:1(0) ack 10001 win 514
33// Now we have enough room to send out the 2 x 400B packets out.
34   +0 > P. 10001:20801(10800) ack 1
35+.001 < .  1:1(0) ack 20801 win 514
36// This 2KB packet should be sent alone.
37   +0 > P. 20801:22801(2000) ack 1
38+.001 < .  1:1(0) ack 22801 win 514
39