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

raj at netperf.org raj at netperf.org
Tue Mar 27 17:05:17 PDT 2012


Author: raj
Date: 2012-03-27 17:05:17 -0700 (Tue, 27 Mar 2012)
New Revision: 548

Modified:
   trunk/src/netlib.c
   trunk/src/netlib.h
   trunk/src/nettest_omni.c
Log:
a few tweaks

Modified: trunk/src/netlib.c
===================================================================
--- trunk/src/netlib.c	2012-03-27 00:13:52 UTC (rev 547)
+++ trunk/src/netlib.c	2012-03-28 00:05:17 UTC (rev 548)
@@ -1427,10 +1427,11 @@
 /* this routine will allocate a circular list of buffers for either
    send or receive operations. each of these buffers will be aligned
    and offset as per the users request. the circumference of this ring
-   will be controlled by the setting of send_width. the buffers will
-   be filled with data from the file specified in fill_file. if
-   fill_file is an empty string, the buffers will not be filled with
-   any particular data */
+   will be controlled by the setting of width. the buffers will be
+   filled with data from the file specified in fill_file. if fill_file
+   is an empty string, the buffers will be filled from "default_fill"
+   which will be "netperf" so anyone sniffing the traffic will have a
+   better idea what this traffic happens to be. */
 
 struct ring_elt *
 allocate_buffer_ring(int width, int buffer_size, int alignment, int offset)
@@ -1480,6 +1481,7 @@
 	      (unsigned int)sizeof(struct ring_elt));
       exit(-1);
     }
+    temp_link->completion_ptr = NULL;
     /* remember the first one so we can close the ring at the end */
     if (i == 1) {
       first_link = temp_link;

Modified: trunk/src/netlib.h
===================================================================
--- trunk/src/netlib.h	2012-03-27 00:13:52 UTC (rev 547)
+++ trunk/src/netlib.h	2012-03-28 00:05:17 UTC (rev 548)
@@ -290,6 +290,7 @@
   struct ring_elt *next;  /* next element in the ring */
   char *buffer_base;      /* in case we have to free it at somepoint */
   char *buffer_ptr;       /* the aligned and offset pointer */
+  void *completion_ptr;   /* a pointer to information for async completion */
 };
 
 /* +*+ SAF  Sorry about the hacks with errno; NT made me do it :(

Modified: trunk/src/nettest_omni.c
===================================================================
--- trunk/src/nettest_omni.c	2012-03-27 00:13:52 UTC (rev 547)
+++ trunk/src/nettest_omni.c	2012-03-28 00:05:17 UTC (rev 548)
@@ -2427,7 +2427,7 @@
     break;
   default:
     fprintf(stderr,
-	    "Unknown output_elt output_type of %d\n",
+	    "Unknown/unsupported output_elt output_type of %d\n",
 	    output_elt->output_type);
     fflush(stderr);
     exit(-1);
@@ -2853,6 +2853,7 @@
   int bytes_left;
   int bytes_recvd;
   int my_recvs;
+  int my_flags = 0; /* will we one day want to set MSG_WAITALL? */
 
   /* receive data off the data_socket, ass-u-me-ing a blocking socket
      all the way!-) 2008-01-08 */
@@ -2884,7 +2885,7 @@
       bytes_recvd = recvfrom(data_socket,
 			     temp_message_ptr,
 			     bytes_left,
-			     0,
+			     my_flags,
 			     source,
 			     sourcelen);
     }
@@ -2893,7 +2894,7 @@
       bytes_recvd = recv(data_socket,
 			 temp_message_ptr,
 			 bytes_left,
-			 0);
+			 my_flags);
     }
     if (bytes_recvd > 0) {
       bytes_left -= bytes_recvd;
@@ -3338,9 +3339,9 @@
      initial congestion windows and a non-trivial initial burst of
      requests would not be individual segments even with TCP_NODELAY
      set. so, we have to start tracking a poor-man's congestion window
-     up here in window space because we want to try to make something
+     up here in user space because we want to try to make something
      happen that frankly, we cannot guarantee with the specification
-     of TCP.  ain't that grand?-)  raj 2006-01-30 */
+     of TCP.  ain't that grand?-) raj 2006-01-30 */
   int requests_outstanding = 0;
   int requests_this_cwnd = 0;
   int request_cwnd_initial = REQUEST_CWND_INITIAL;



More information about the netperf-dev mailing list