selftests: mptcp: add option to specify size of file to transfer
authorFlorian Westphal <fw@strlen.de>
Tue, 30 Jun 2020 19:24:44 +0000 (21:24 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 2 Jul 2020 00:47:55 +0000 (17:47 -0700)
commit767659f65000e6a19fee3b9bf6cda2839968329a
tree49ffd9979259008987b497d5358d3cae42e5f8a3
parentb97e9d9d67c88bc413a3c27734d45d98d8d52b00
selftests: mptcp: add option to specify size of file to transfer

The script generates two random files that are then sent via tcp and
mptcp connections.

In order to compare throughput over consecutive runs add an option
to provide the file size on the command line: "-f 128000".

Also add an option, -t, to enable tcp tests. This is useful to
compare throughput of mptcp connections and tcp connections.

Example: run tests with a 4mb file size, 300ms delay 0.01% loss,
default gso/tso/gro settings and with large write/blocking io:

mptcp_connect.sh -t -f $((4 * 1024 * 1024)) -d 300 -l 0.01%  -r 0 -e "" -m mmap

Signed-off-by: Florian Westphal <fw@strlen.de>
Reviewed-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/net/mptcp/mptcp_connect.sh