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. Also, when packets are retransmitted, they 4*6f669205SSoham Chakradeo// will not be coalesce into the same skb. 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 10 400B chunks with no coalescing options. 25*6f669205SSoham Chakradeo +0 send(4, ..., 400, MSG_EOR) = 400 26*6f669205SSoham Chakradeo +0 send(4, ..., 400, MSG_EOR) = 400 27*6f669205SSoham Chakradeo +0 send(4, ..., 400, MSG_EOR) = 400 28*6f669205SSoham Chakradeo +0 send(4, ..., 400, MSG_EOR) = 400 29*6f669205SSoham Chakradeo +0 send(4, ..., 400, MSG_EOR) = 400 30*6f669205SSoham Chakradeo +0 send(4, ..., 400, MSG_EOR) = 400 31*6f669205SSoham Chakradeo +0 send(4, ..., 400, MSG_EOR) = 400 32*6f669205SSoham Chakradeo +0 send(4, ..., 400, MSG_EOR) = 400 33*6f669205SSoham Chakradeo +0 send(4, ..., 400, MSG_EOR) = 400 34*6f669205SSoham Chakradeo +0 send(4, ..., 400, MSG_EOR) = 400 35*6f669205SSoham Chakradeo// This chunk should not be appended to the skbs created for the previous chunk. 36*6f669205SSoham Chakradeo +0 write(4, ..., 10000) = 10000 37*6f669205SSoham Chakradeo 38*6f669205SSoham Chakradeo +0 > P. 1:10001(10000) ack 1 39*6f669205SSoham Chakradeo+.001 < . 1:1(0) ack 10001 win 514 40*6f669205SSoham Chakradeo// Now we have enough room to send out the 2 x 400B packets out. 41*6f669205SSoham Chakradeo +0 > P. 10001:10801(800) ack 1 42*6f669205SSoham Chakradeo// The 9 remaining 400B chunks should be sent as individual packets. 43*6f669205SSoham Chakradeo +0 > P. 10801:11201(400) ack 1 44*6f669205SSoham Chakradeo +0 > P. 11201:11601(400) ack 1 45*6f669205SSoham Chakradeo +0 > P. 11601:12001(400) ack 1 46*6f669205SSoham Chakradeo +0 > P. 12001:12401(400) ack 1 47*6f669205SSoham Chakradeo +0 > P. 12401:12801(400) ack 1 48*6f669205SSoham Chakradeo +0 > P. 12801:13201(400) ack 1 49*6f669205SSoham Chakradeo +0 > P. 13201:13601(400) ack 1 50*6f669205SSoham Chakradeo +0 > P. 13601:14001(400) ack 1 51*6f669205SSoham Chakradeo +0 > P. 14001:14401(400) ack 1 52*6f669205SSoham Chakradeo// The last 10KB chunk should be sent separately. 53*6f669205SSoham Chakradeo +0 > P. 14401:24401(10000) ack 1 54*6f669205SSoham Chakradeo 55*6f669205SSoham Chakradeo+.001 < . 1:1(0) ack 10401 win 514 56*6f669205SSoham Chakradeo+.001 < . 1:1(0) ack 10801 win 514 57*6f669205SSoham Chakradeo+.001 < . 1:1(0) ack 11201 win 514 58*6f669205SSoham Chakradeo+.001 < . 1:1(0) ack 11601 win 514 59*6f669205SSoham Chakradeo+.001 < . 1:1(0) ack 12001 win 514 <sack 13201:14401,nop,nop> 60*6f669205SSoham Chakradeo// TCP should fill the hole but no coalescing should happen, and all 61*6f669205SSoham Chakradeo// retransmissions should be sent out as individual packets. 62*6f669205SSoham Chakradeo 63*6f669205SSoham Chakradeo// Note : This is timeout based retransmit. 64*6f669205SSoham Chakradeo// Do not put +0 here or flakes will come back. 65*6f669205SSoham Chakradeo+.004~+.008 > P. 12001:12401(400) ack 1 66*6f669205SSoham Chakradeo 67*6f669205SSoham Chakradeo+.001 < . 1:1(0) ack 12401 win 514 <sack 13201:14401,nop,nop> 68*6f669205SSoham Chakradeo +0 > P. 12401:12801(400) ack 1 69*6f669205SSoham Chakradeo +0 > P. 12801:13201(400) ack 1 70*6f669205SSoham Chakradeo+.001 < . 1:1(0) ack 12801 win 514 <sack 13201:14401,nop,nop> 71*6f669205SSoham Chakradeo+.001 < . 1:1(0) ack 14401 win 514 72*6f669205SSoham Chakradeo+.001 < . 1:1(0) ack 24401 win 514 73