]> git.baikalelectronics.ru Git - kernel.git/commit
selftests: net: Add FIN_ACK processing order related latency spike test
authorSeongJae Park <sjpark@amazon.de>
Sun, 2 Feb 2020 03:38:27 +0000 (03:38 +0000)
committerJakub Kicinski <kuba@kernel.org>
Sun, 2 Feb 2020 21:33:21 +0000 (13:33 -0800)
commitf7bca7459faeafa0787941caf749604a01948782
tree32f2b03562a1bc6e2e0f725d7ff6ce15048be19f
parent7a722572ce3dcff053a3e8ae888a0b835ac03a75
selftests: net: Add FIN_ACK processing order related latency spike test

This commit adds a test for FIN_ACK process races related reconnection
latency spike issues.  The issue has described and solved by the
previous commit ("tcp: Reduce SYN resend delay if a suspicous ACK is
received").

The test program is configured with a server and a client process.  The
server creates and binds a socket to a port that dynamically allocated,
listen on it, and start a infinite loop.  Inside the loop, it accepts
connection, reads 4 bytes from the socket, and closes the connection.
The client is constructed as an infinite loop.  Inside the loop, it
creates a socket with LINGER and NODELAY option, connect to the server,
send 4 bytes data, try read some data from server.  After the read()
returns, it measure the latency from the beginning of this loop to this
point and if the latency is larger than 1 second (spike), print a
message.

Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: SeongJae Park <sjpark@amazon.de>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/.gitignore
tools/testing/selftests/net/Makefile
tools/testing/selftests/net/fin_ack_lat.c [new file with mode: 0644]
tools/testing/selftests/net/fin_ack_lat.sh [new file with mode: 0755]