netstress.c: change default setup of sysctl parameters
* Allow 'netstress' to use whatever is set in tcp_fastopen sysctl
parameter. There are several advantages to do this:
a. It allows to test default configuration in kernel;
b. We can control this parameter externally and avoid races
when server/client runs on the same machine;
c. Simplifies code.
* Introduce new parameter '-t x' (instead of '-O') where x is the new
value for tcp_fastopen sysctl parameter.
* Enable fastopen API only if '-f' option set.
* Remove 'run_force' parameter '-F'. It didn't do anything useful,
instead, invoke tst_require_root() only if we're going to update
sysctl parameter.
* Update tcp_fastopen test with new options ('-t' & '-f').
Additional fixes:
* Set SO_REUSEADDR option before bind in server.
* Remove linger option and consolidate setting busy_poll socket option
into one function: init_socket_opts().
* Move setting tcp_tw_reuse to client side code.
Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
2 files changed