On Tue, 2015-09-22 at 07:46 -0700, Eric Dumazet wrote:
>
> Ahem.
>
> packetdrill can make this in one script, as you can exactly control the
> packets that the 'remote' peer would answer.
>
> No need for complex setup. You should try it, and as a bonus we could
> easily reproduce the problem and check the fix.
>
> Let see if we can cook a packetdrill scenario.
Following packetdrill skeleton will provide you a connexion with cwnd=1
sshtresh=2 (without patching kernel)
// Establish a connection and send 1 MSS.
0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3
+0 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
+0 setsockopt(3, SOL_TCP, TCP_NODELAY, [1], 4) = 0
+0 bind(3, ..., ...) = 0
+0 listen(3, 1) = 0
+0 < S 0:0(0) win 65535 <mss 1000,sackOK,nop,nop>
+0 > S. 0:0(0) ack 1 <mss 1460,nop,nop,sackOK>
+.200 < . 1:1(0) ack 1 win 65535
+0 accept(3, ..., ...) = 4
+0 write(4, ..., 100) = 100
+0 > P. 1:101(100) ack 1
+.000 %{ print tcpi_rto }%
// TLP
+.500~+.505 > P. 1:101(100) ack 1
// RTO
+.600~+.605 > P. 1:101(100) ack 1
+.200 < . 1:1(0) ack 101 win 65535
// cwnd should be 2, ssthresh should be 7
2.000 write(4, ..., 100) = 100
+0 > P. 101:201(100) ack 1
// TLP
+.500~+.505 > P. 101:201(100) ack 1
// RTO
+1.200~+1.210 > P. 101:201(100) ack 1
+0 %{ print "tcpi_snd_cwnd=%d" % tcpi_snd_cwnd }%
+0 %{ print "tcpi_snd_ssthresh=%d" % tcpi_snd_ssthresh }%
Then we can add a bunch of +.01 write(4, ..., 100) = 100
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html