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

raj at netperf.org raj at netperf.org
Tue Jul 12 16:16:44 PDT 2011


Author: raj
Date: 2011-07-12 16:16:44 -0700 (Tue, 12 Jul 2011)
New Revision: 428

Modified:
   trunk/src/netlib.c
   trunk/src/netserver.c
   trunk/src/nettest_omni.c
Log:
some Wall cleanups and fix test by byte count rather than time for omni

Modified: trunk/src/netlib.c
===================================================================
--- trunk/src/netlib.c	2011-07-12 22:15:42 UTC (rev 427)
+++ trunk/src/netlib.c	2011-07-12 23:16:44 UTC (rev 428)
@@ -2593,7 +2593,8 @@
   if (local_proc_affinity != -1) {
     bind_to_specific_processor(local_proc_affinity,0);
   } 
-  
+
+  return buflen;
 }
 
  /***********************************************************************/
@@ -3784,8 +3785,6 @@
 HIST
 HIST_new_n(int max_outstanding) {
   HIST h;
-  int bytes;
-  void *buf;
   if((h = (HIST) malloc(sizeof(struct histogram_struct))) == NULL) {
     perror("HIST_new_n - histogram_struct malloc failed");
     exit(1);

Modified: trunk/src/netserver.c
===================================================================
--- trunk/src/netserver.c	2011-07-12 22:15:42 UTC (rev 427)
+++ trunk/src/netserver.c	2011-07-12 23:16:44 UTC (rev 428)
@@ -349,7 +349,7 @@
   struct addrinfo hints;
   struct addrinfo *local_res;
   struct addrinfo *local_res_temp;
-  int count, error, not_listening;
+  int count, error;
   int on = 1;
   SOCKET temp_socket;
   struct listen_elt *temp_elt;
@@ -1254,8 +1254,6 @@
 daemonize() {
 #if defined(HAVE_FORK)
 
-  FILE *rd_null_fp;    /* Used to redirect from "/dev/null". */
-
   if (debug) {
     fprintf(where,
 	    "%s: enter\n",

Modified: trunk/src/nettest_omni.c
===================================================================
--- trunk/src/nettest_omni.c	2011-07-12 22:15:42 UTC (rev 427)
+++ trunk/src/nettest_omni.c	2011-07-12 23:16:44 UTC (rev 428)
@@ -382,7 +382,7 @@
 int csv = 0;
 int keyword = 0;
 uint64_t      trans_completed = 0;
-uint64_t      units_remaining;
+int64_t      units_remaining;
 uint64_t      bytes_sent = 0;
 uint64_t      bytes_received = 0;
 uint64_t      local_send_calls = 0;
@@ -797,7 +797,7 @@
 		 IPPROTO_IP,
 		 IP_TTL,
 		 &multicast_ttl,
-		 &optlen) < 0) {
+		 (netperf_socklen_t *)&optlen) < 0) {
     fprintf(where,
 	    "getsockopt(IP_TTL) failed errno %d\n",
 	    errno);
@@ -853,7 +853,7 @@
 		     IPPROTO_IP,
 		     IP_TTL,
 		     &multicast_ttl,
-		     &optlen) < 0) {
+		     (netperf_socklen_t *)&optlen) < 0) {
 	fprintf(where,
 		"getsockopt(IP_TTL) failed errno %d\n",
 		errno);
@@ -4648,7 +4648,7 @@
   struct sockaddr_storage remote_addr;
   struct sockaddr_storage my_addr;
   int                     remote_addr_len = sizeof(remote_addr);
-  int                     my_addr_len = sizeof(my_addr);
+  netperf_socklen_t       my_addr_len = sizeof(my_addr);
 
   SOCKET	data_socket;
   int           need_socket;
@@ -6382,7 +6382,7 @@
        is why there are two routines to rule them all rather than just
        one :) */
     if ((omni_request->direction & NETPERF_RECV) &&
-	!times_up) {
+	((!times_up) || (units_remaining > 0))) {
       ret = recv_data(data_socket,
 		      recv_ring,
 		      bytes_to_recv,
@@ -6438,7 +6438,7 @@
     /* if we should try to send something, then by all means, let us
        try to send something. */
     if ((omni_request->direction & NETPERF_XMIT) &&
-	!times_up) {
+	((!times_up) || (units_remaining > 0))) {
       ret = send_data(data_socket,
 		      send_ring,
 		      bytes_to_send,



More information about the netperf-dev mailing list