Hello,
I am debugging tcp/slow_start/slow-start-ack-per-2pkt.pkt failure and want to understand how the script works. Any documentation on the script syntax and format.
Snippets of the script shown below. I understand basic socket/setsocketopt/bind/listen...
0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3
+0 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
+0 bind(3, ..., ...) = 0
+0 listen(3, 1) = 0
+.1 < S 0:0(0) win 32792 <mss 1000,sackOK,nop,nop,nop,wscale 7>
+0 > S. 0:0(0) ack 1 <mss 1460,nop,nop,sackOK,nop,wscale 8>
+.1 < . 1:1(0) ack 1 win 257
+0 accept(3, ..., ...) = 4
+0 setsockopt(4, SOL_SOCKET, SO_SNDBUF, [200000], 4) = 0
+0 write(4, ..., 30000) = 30000
+0 > P. 1:10001(10000) ack 1
+0 %{ assert tcpi_snd_cwnd == 10, tcpi_snd_cwnd }%
However, I am not sure about the above 3 lines?
Is write writing to sndbuf,
P -- TCP PSH?
assert reading via TCP_INFO on sender congestion window?
If I have to debug the failure what would be the best way?
Reason being, initially test started failing with following error messages
run_packet.c 709] map_outbound_live_packet
run_packet.c 1493] packet time_usecs: 1692653421581819
run.c 186] expected: 0.306 actual: 0.201 (secs)
stderr:
slow-start-ack-per-2pkt.pkt:27: error handling packet: timing error: expected outbound packet at 0.305893 sec but happened at 0.200515 sec; tolerance 0.004000 sec
script packet: 0.305893 P. 10001:14001(4000) ack 1
actual packet: 0.200515 P. 10001:14001(4000) ack 1 win 256
Ran 3 tests: 0 passing, 3 failing, 0 timed out (3.39 sec): ./tcp/slow_start/slow-start-ack-per-2pkt.pkt
I added --tolerance_usecs=130000 to the .pkt at the beginning, now the script fails at
run.c 390] gettimeofday: 1692653524.867610
stderr:
slow-start-ack-per-2pkt.pkt:25: error in Python code
Traceback (most recent call last):
File "/tmp/code_64Afd5", line 98, in <module>
assert tcpi_snd_cwnd == 10, tcpi_snd_cwnd
AssertionError: 100
slow-start-ack-per-2pkt.pkt: error executing code: 'python3' returned non-zero status 1
Ran 3 tests: 0 passing, 3 failing, 0 timed out (3.54 sec): ./tcp/slow_start/slow-start-ack-per-2pkt.pkt
Thanks,
Ravi