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

raj at netperf.org raj at netperf.org
Wed Jan 9 10:39:53 PST 2013


Author: raj
Date: 2013-01-09 10:39:52 -0800 (Wed, 09 Jan 2013)
New Revision: 621

Modified:
   trunk/src/nettest_omni.c
Log:
change the flags parm on the splice calls per Eric Dumazet's suggestion

Modified: trunk/src/nettest_omni.c
===================================================================
--- trunk/src/nettest_omni.c	2012-12-14 21:57:44 UTC (rev 620)
+++ trunk/src/nettest_omni.c	2013-01-09 18:39:52 UTC (rev 621)
@@ -2919,6 +2919,12 @@
 static int
 recv_data_no_copy(SOCKET data_socket, struct ring_elt *recv_ring, uint32_t bytes_to_recv, struct sockaddr *source, netperf_socklen_t *sourcelen, uint32_t flags, uint32_t *num_receives) {
 
+#ifndef SPLICE_F_MOVE
+# define SPLICE_F_MOVE 0x01
+#endif
+#ifndef SPLICE_F_NONBLOCK
+# define SPLICE_F_NONBLOCK 0x02
+#endif
 
   static int pfd[2] = {-1, -1};
   static int fdnull = -1;
@@ -2928,7 +2934,9 @@
   int bytes_left;
   int bytes_recvd;
   int my_recvs;
-  int my_flags = 0; /* will we one day want to set MSG_WAITALL? */
+  int my_flags = SPLICE_F_MOVE | SPLICE_F_NONBLOCK; /* values
+						       suggested by
+						       Eric Dumazet */
   int ret;
 
   if (pfd[0] == -1) {



More information about the netperf-dev mailing list