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

raj at netperf.org raj at netperf.org
Wed Jan 9 15:09:19 PST 2013


Author: raj
Date: 2013-01-09 15:09:19 -0800 (Wed, 09 Jan 2013)
New Revision: 622

Modified:
   trunk/src/nettest_omni.c
Log:
further Eric-suggested changes to the splice support

Modified: trunk/src/nettest_omni.c
===================================================================
--- trunk/src/nettest_omni.c	2013-01-09 18:39:52 UTC (rev 621)
+++ trunk/src/nettest_omni.c	2013-01-09 23:09:19 UTC (rev 622)
@@ -2988,14 +2988,11 @@
     
     
     if (bytes_recvd > 0) {
-      if (splice(pfd[0],
-		 NULL,
-		 fdnull,
-		 NULL,
-		 bytes_recvd,
-		 my_flags) != bytes_recvd) {
-	return -3;
-      }
+      /* per Eric Dumazet, we should just let this second splice call
+	 move as many bytes as it can and not worry about how much.
+	 this should make the call more robust when made on a system
+	 under memory pressure */
+      splice(pfd[0], NULL, fdnull, NULL, 1 << 30, my_flags);
       bytes_left -= bytes_recvd;
     }
     else {



More information about the netperf-dev mailing list