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

raj at netperf.org raj at netperf.org
Tue Jan 15 17:41:32 PST 2008


Author: raj
Date: 2008-01-15 17:41:32 -0800 (Tue, 15 Jan 2008)
New Revision: 168

Modified:
   trunk/src/nettest_omni.c
Log:
small stuff

Modified: trunk/src/nettest_omni.c
===================================================================
--- trunk/src/nettest_omni.c	2008-01-16 00:56:28 UTC (rev 167)
+++ trunk/src/nettest_omni.c	2008-01-16 01:41:32 UTC (rev 168)
@@ -333,7 +333,7 @@
      we use send.  we ass-u-me blocking operations always, so no need
      to check for eagain or the like. */
 
-  if (debug) {
+  if (debug > 2) {
     fprintf(where,
 	    "send_data sock %d ring %p bytes %d dest %p len %d\n",
 	    data_socket,
@@ -1857,7 +1857,7 @@
 
 {
 
-#define OMNI_ARGS "b:cCDnNhH:L:m:M:p:P:r:s:S:t:T:Vw:W:46"
+#define OMNI_ARGS "b:cCd:DnNhH:L:m:M:p:P:r:s:S:t:T:Vw:W:46"
 
   extern char	*optarg;	  /* pointer to option string	*/
   
@@ -1890,7 +1890,8 @@
   protocol = IPPROTO_TCP;
 #endif
 
-  /* default to direction being NETPERF_XMIT */
+  /* default to direction being NETPERF_XMIT. I wonder if I should be
+     setting this here, or checking after argument scanning... */
   direction = NETPERF_XMIT;
 
   /* default is to be a stream test, so req_size and rsp_size should
@@ -1945,6 +1946,10 @@
       printf("WARNING: TCP_CORK not available on this platform!\n");
 #endif /* TCP_CORK */
       break;
+    case 'd':
+      /* arbitrarily set the direction variable */
+      direction = strtol(optarg,NULL,0);
+      break;
     case 'D':
       /* set the TCP nodelay flag */
       loc_nodelay = 1;
@@ -1975,7 +1980,8 @@
     case 'm':
       /* set the send size. if we set the local send size it will add
 	 XMIT to direction.  if we set the remote send size it will
-	 add RECV to the direction */
+	 add RECV to the direction.  likely as not this will need some
+	 additional throught */
       break_args_explicit(optarg,arg1,arg2);
       if (arg1[0]) {
 	send_size = convert(arg1);



More information about the netperf-dev mailing list