[netperf-dev] netperf2 commit notice r480 - in trunk: . src

raj at netperf.org raj at netperf.org
Wed Aug 3 11:12:29 PDT 2011


Author: raj
Date: 2011-08-03 11:12:29 -0700 (Wed, 03 Aug 2011)
New Revision: 480

Modified:
   trunk/Release_Notes
   trunk/src/hist.h
   trunk/src/netlib.c
   trunk/src/nettest_bsd.h
   trunk/src/nettest_omni.c
Log:
assorted fixes

Modified: trunk/Release_Notes
===================================================================
--- trunk/Release_Notes	2011-07-30 00:59:55 UTC (rev 479)
+++ trunk/Release_Notes	2011-08-03 18:12:29 UTC (rev 480)
@@ -1,12 +1,18 @@
 These are the Release Notes for post Revision 2.5.0 top-of-trunk netperf:
 
+*) Make the "sum" field of the histogram structure a 64 bit int to
+   avoid having it wrap-around on tests where the sum of all the
+   measured latencies was larger than 31 bits. This was causing
+   statistics like stddev to go negative in some cases.
+
 *) If the time delta between two events is negative, do not bother
    doing any math with it in the histogram/statistics code, just
    increment the ridiculous count and move-on.
 
 *) Fixed a bug which caused local transport retransmissions to be
    reported as -1 even though the getsockopt() call was
-   successful. (Linux)
+   successful. (Linux).  Later included remote transport
+   retransmissions.
 
 *) The src/nettest_omni.c and re-written src/netserver.c code are now
    known to have compiled under Windows 7 x64 with the Microsoft

Modified: trunk/src/hist.h
===================================================================
--- trunk/src/hist.h	2011-07-30 00:59:55 UTC (rev 479)
+++ trunk/src/hist.h	2011-08-03 18:12:29 UTC (rev 480)
@@ -58,7 +58,7 @@
   int ten_sec[HIST_NUM_OF_BUCKET];
   int ridiculous;
   int total;
-  int sum;
+  int64_t sum;
   double sumsquare;
   int hmin;
   int hmax;

Modified: trunk/src/netlib.c
===================================================================
--- trunk/src/netlib.c	2011-07-30 00:59:55 UTC (rev 479)
+++ trunk/src/netlib.c	2011-08-03 18:12:29 UTC (rev 480)
@@ -3965,6 +3965,14 @@
    output_row(stdout, "TEN_SEC       ", h->ten_sec);
    fprintf(where,">100_SECS: %d\n", h->ridiculous);
    fprintf(where,"HIST_TOTAL:      %d\n", h->total);
+   if (debug) {
+     fprintf(where,
+	     "sum %"PRIi64", sumsquare %f, limit %d count %d\n",
+	     h->sum,
+	     h->sumsquare,
+	     h->limit,
+	     h->count);
+   }
 }
 
 /* search buckets for each unit */

Modified: trunk/src/nettest_bsd.h
===================================================================
--- trunk/src/nettest_bsd.h	2011-07-30 00:59:55 UTC (rev 479)
+++ trunk/src/nettest_bsd.h	2011-08-03 18:12:29 UTC (rev 480)
@@ -152,7 +152,8 @@
 			       interface */ 
   int32_t    subvendor;
   int32_t    subdevice;
-  #define OMNI_RESULTS_CONF_CUTOFF 21
+  int32_t    transport_retrans;
+  #define OMNI_RESULTS_CONV_CUTOFF 22
   /* this is the 22dn 32-bit word and we have 248-(17*4) bytes
      available from here */
   char       ifname[16];    /* the probable egress interface */
@@ -161,7 +162,7 @@
   char       firmware[32];  
   char       bus[32];
   char       ifslot[16];    /* slot id of the probable egress interface */
-  /* only 4 bytes left... */
+  /* 0 bytes left... */
 };
 
 #endif /* WANT_OMNI */

Modified: trunk/src/nettest_omni.c
===================================================================
--- trunk/src/nettest_omni.c	2011-07-30 00:59:55 UTC (rev 479)
+++ trunk/src/nettest_omni.c	2011-08-03 18:12:29 UTC (rev 480)
@@ -5386,9 +5386,9 @@
 	    (++requests_this_cwnd == request_cwnd)) {
 	  request_cwnd += 1;
 	  requests_this_cwnd = 0;
-	  if (debug) {
+	  if (debug > 1) {
 	    fprintf(where,
-		    "incr req_cwnd to %d first_burst %d reqs_outstndng %di trans %"PRIu64"\n",
+		    "incr req_cwnd to %d first_burst %d reqs_outstanding %d trans %"PRIu64"\n",
 		    request_cwnd,
 		    first_burst_size,
 		    requests_outstanding,
@@ -5637,19 +5637,19 @@
 	 calculated service demand and all those interesting things. If
 	 it wasn't supposed to care, it will return obvious values. */
   
-      recv_response_n(OMNI_RESULTS_CONF_CUTOFF);
+      recv_response_n(OMNI_RESULTS_CONV_CUTOFF);
       if (!netperf_response.content.serv_errno) {
 	if (debug)
 	  fprintf(where,"remote results obtained\n");
 	remote_cpu_method = format_cpu_method(omni_result->cpu_method);
+	lib_num_rem_cpus = omni_result->num_cpus;
+	lib_remote_peak_cpu_util = (double)omni_result->peak_cpu_util;
+	lib_remote_peak_cpu_id = omni_result->peak_cpu_id;
 	/* why?  because some stacks want to be clever and autotune their
 	   socket buffer sizes, which means that if we accept the defaults,
 	   the size we get from getsockopt() at the beginning of a
 	   connection may not be what we would get at the end of the
 	   connection... */
-	lib_num_rem_cpus = omni_result->num_cpus;
-	lib_remote_peak_cpu_util = (double)omni_result->peak_cpu_util;
-	lib_remote_peak_cpu_id = omni_result->peak_cpu_id;
 	rsr_size_end = omni_result->recv_buf_size;
 	rss_size_end = omni_result->send_buf_size;
 	remote_bytes_sent = (uint64_t)omni_result->bytes_sent_hi << 32;
@@ -5685,6 +5685,7 @@
 	remote_interface_device = omni_result->device;
 	remote_interface_subvendor = omni_result->subvendor;
 	remote_interface_subdevice = omni_result->subdevice;
+	remote_transport_retrans = omni_result->transport_retrans;
       }
       else {
 	Set_errno(netperf_response.content.serv_errno);
@@ -6580,6 +6581,9 @@
     elapsed_time -= pad_time;
   }
 
+  remote_transport_retrans = get_transport_retrans(data_socket,
+						   omni_request->protocol);
+
   if (connected) {
 #ifdef __linux
     /* so, "Linux" with autotuning likes to alter the socket buffer
@@ -6619,6 +6623,7 @@
   omni_results->send_buf_size   = lss_size_end;
   omni_results->trans_received	= (uint32_t) trans_completed;
   omni_results->elapsed_time	= elapsed_time;
+  omni_results->transport_retrans = remote_transport_retrans;
   omni_results->cpu_method      = cpu_method;
   omni_results->num_cpus        = lib_num_loc_cpus;
   if (omni_request->flags & OMNI_MEASURE_CPU) {
@@ -6680,7 +6685,7 @@
     fflush(where);
   }
   
-  send_response_n(OMNI_RESULTS_CONF_CUTOFF);
+  send_response_n(OMNI_RESULTS_CONV_CUTOFF);
 
 }
 



More information about the netperf-dev mailing list