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