aboutsummaryrefslogtreecommitdiff
path: root/src/iperf_tcp.c
diff options
context:
space:
mode:
authorBruce A. Mah <bmah@es.net>2016-09-22 13:34:52 -0700
committerBruce A. Mah <bmah@es.net>2016-09-22 13:34:52 -0700
commit7eeaa1cb070de41ff41d2d881ddb094db7f43352 (patch)
tree86b4ce72d41417cf1908413de23b0c8f6ee9d6e4 /src/iperf_tcp.c
parent353615b772201eb77786b25485bf20f4a50ce413 (diff)
downloadiperf3-7eeaa1cb070de41ff41d2d881ddb094db7f43352.tar.gz
First try at issue #461.
First, realize that we've been setting the congestion control (CC) algorithm unnecessarily; rather than doing it for all listening or connecting sockets, do it just for those sockets that are being used for TCP test streams. Record the CC algorithm in use (this handles the case where a CC algorithm hasn't been specified), and have the client and server exchange this information. Report the CC algorithms that were used (note that it's theoretically possible for the two ends of the test to be using different algorithms, if no algorithm was explicitly specified and the two end hosts have different defaults, or if one side allows setting the CC algorithm and the other doesn't). Committing to a branch to make it easier to test this code on a wider combination of systems.
Diffstat (limited to 'src/iperf_tcp.c')
-rw-r--r--src/iperf_tcp.c21
1 files changed, 0 insertions, 21 deletions
diff --git a/src/iperf_tcp.c b/src/iperf_tcp.c
index ac3b392..a2eb85b 100644
--- a/src/iperf_tcp.c
+++ b/src/iperf_tcp.c
@@ -235,16 +235,6 @@ iperf_tcp_listen(struct iperf_test *test)
}
printf("SO_SNDBUF is %u\n", opt);
}
-#if defined(HAVE_TCP_CONGESTION)
- if (test->congestion) {
- if (setsockopt(s, IPPROTO_TCP, TCP_CONGESTION, test->congestion, strlen(test->congestion)) < 0) {
- close(s);
- freeaddrinfo(res);
- i_errno = IESETCONGESTION;
- return -1;
- }
- }
-#endif /* HAVE_TCP_CONGESTION */
#if defined(HAVE_SO_MAX_PACING_RATE)
/* If socket pacing is available and not disabled, try it. */
if (! test->no_fq_socket_pacing) {
@@ -473,17 +463,6 @@ iperf_tcp_connect(struct iperf_test *test)
}
#endif /* HAVE_FLOWLABEL */
-#if defined(HAVE_TCP_CONGESTION)
- if (test->congestion) {
- if (setsockopt(s, IPPROTO_TCP, TCP_CONGESTION, test->congestion, strlen(test->congestion)) < 0) {
- close(s);
- freeaddrinfo(server_res);
- i_errno = IESETCONGESTION;
- return -1;
- }
- }
-#endif /* HAVE_TCP_CONGESTION */
-
#if defined(HAVE_SO_MAX_PACING_RATE)
/* If socket pacing is available and not disabled, try it. */
if (! test->no_fq_socket_pacing) {