[netperf-dev] netperf2 commit notice r618 - trunk/src

raj at netperf.org raj at netperf.org
Tue Dec 11 12:49:34 PST 2012


Author: raj
Date: 2012-12-11 12:49:33 -0800 (Tue, 11 Dec 2012)
New Revision: 618

Modified:
   trunk/src/nettest_omni.c
Log:
some fixups for fast open

Modified: trunk/src/nettest_omni.c
===================================================================
--- trunk/src/nettest_omni.c	2012-12-06 00:19:42 UTC (rev 617)
+++ trunk/src/nettest_omni.c	2012-12-11 20:49:33 UTC (rev 618)
@@ -89,8 +89,13 @@
 #ifdef HAVE_LINUX_SOCKET_H
 # include <linux/socket.h>
 # ifndef MSG_FASTOPEN
+#  warning Using our own value for MSG_FASTOPEN
 #  define MSG_FASTOPEN	0x20000000	/* Send data in TCP SYN */
 # endif
+# ifndef TCP_FASTOPEN
+#  warning Using our own value for TCP_FASTOPEN
+#  define TCP_FASTOPEN 23
+# endif
 #endif
 
 #ifdef HAVE_NETINET_SCTP_H
@@ -3396,12 +3401,6 @@
 
 }
 
-/*
-   if ( setsockopt(sd, SOL_TCP, TCP_CONGESTION, "ledbat", 6) == -1 ) {
-     perror("setsockopt");
-     exit(EXIT_FAILURE);
-   }
-*/
 static void
 get_transport_cong_control(SOCKET socket, int protocol, char cong_control[], int len)
 {
@@ -5289,7 +5288,7 @@
        like the listen() call does - it is classic, and was what was
        used in the online example I found */
     if (use_fastopen &&
-	(setsockopt(s_listen,SOL_TCP, TCP_FASTOPEN, &backlog, sizeof(qlen)) ==
+	(setsockopt(s_listen,IPPROTO_TCP, TCP_FASTOPEN, &backlog, sizeof(backlog)) ==
 	 SOCKET_ERROR)) {
       netperf_response.content.serv_errno = errno;
       close(s_listen);



More information about the netperf-dev mailing list