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

raj at netperf.org raj at netperf.org
Fri Jul 25 12:02:30 PDT 2008


Author: raj
Date: 2008-07-25 12:02:29 -0700 (Fri, 25 Jul 2008)
New Revision: 283

Added:
   trunk/README.vmware
   trunk/src/Makefile.uw
Modified:
   trunk/Release_Notes
   trunk/configure
   trunk/configure.ac
   trunk/src/Makefile.am
   trunk/src/Makefile.in
   trunk/src/netlib.c
   trunk/src/netserver.c
   trunk/src/nettest_bsd.c
Log:
inital VMware patches

Added: trunk/README.vmware
===================================================================
--- trunk/README.vmware	                        (rev 0)
+++ trunk/README.vmware	2008-07-25 19:02:29 UTC (rev 283)
@@ -0,0 +1,15 @@
+Compiling for VMware is somewhat like compiling for Windows - there is
+a separate, standalone makefile one uses.  In this case, it is
+src/Makefile.uw.  So, to build the bits, cd to src/ and make -f
+Makefile.uw.
+
+At present, the makefile is setup to use a number of the "none" files
+- in particular netcpu_none.c.  When/if we enable the "omni" tests
+we'll perhaps see the addition of a number of other "none" files as
+well.
+
+Also, seems the way things are "run" under VMware is enough different
+that the scripts, should you chose to use them, will need to be
+modified.  The initial set of patches make some arbitrary changes that
+need to be re-worked with some "To run this under VMware uncomment
+this line" or somesuch.

Modified: trunk/Release_Notes
===================================================================
--- trunk/Release_Notes	2008-07-25 18:00:42 UTC (rev 282)
+++ trunk/Release_Notes	2008-07-25 19:02:29 UTC (rev 283)
@@ -2,6 +2,10 @@
 
 Things changed in this release:
 
+*) Changes to enable compilation and building of netperf for
+   VMware. Kudos to the person who did the first port, I will be happy
+   to name that person when told it is OK :)
+
 *) Fixes from Adam Bidema for launching netserver children when the
    path to netserver.exe is very long.  
 

Modified: trunk/configure
===================================================================
--- trunk/configure	2008-07-25 18:00:42 UTC (rev 282)
+++ trunk/configure	2008-07-25 19:02:29 UTC (rev 283)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for netperf 2.4.5pre1.
+# Generated by GNU Autoconf 2.61 for netperf 2.4.5pre2.
 #
 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
 # 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
@@ -572,8 +572,8 @@
 # Identity of this package.
 PACKAGE_NAME='netperf'
 PACKAGE_TARNAME='netperf'
-PACKAGE_VERSION='2.4.5pre1'
-PACKAGE_STRING='netperf 2.4.5pre1'
+PACKAGE_VERSION='2.4.5pre2'
+PACKAGE_STRING='netperf 2.4.5pre2'
 PACKAGE_BUGREPORT=''
 
 ac_unique_file="src/hist.h"
@@ -1222,7 +1222,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures netperf 2.4.5pre1 to adapt to many kinds of systems.
+\`configure' configures netperf 2.4.5pre2 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1293,7 +1293,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of netperf 2.4.5pre1:";;
+     short | recursive ) echo "Configuration of netperf 2.4.5pre2:";;
    esac
   cat <<\_ACEOF
 
@@ -1405,7 +1405,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-netperf configure 2.4.5pre1
+netperf configure 2.4.5pre2
 generated by GNU Autoconf 2.61
 
 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1419,7 +1419,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by netperf $as_me 2.4.5pre1, which was
+It was created by netperf $as_me 2.4.5pre2, which was
 generated by GNU Autoconf 2.61.  Invocation command line was
 
   $ $0 $@
@@ -2185,7 +2185,7 @@
 
 # Define the identity of the package.
  PACKAGE='netperf'
- VERSION='2.4.5pre1'
+ VERSION='2.4.5pre2'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -11102,7 +11102,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by netperf $as_me 2.4.5pre1, which was
+This file was extended by netperf $as_me 2.4.5pre2, which was
 generated by GNU Autoconf 2.61.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -11155,7 +11155,7 @@
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF
 ac_cs_version="\\
-netperf config.status 2.4.5pre1
+netperf config.status 2.4.5pre2
 configured by $0, generated by GNU Autoconf 2.61,
   with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
 

Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac	2008-07-25 18:00:42 UTC (rev 282)
+++ trunk/configure.ac	2008-07-25 19:02:29 UTC (rev 283)
@@ -2,11 +2,11 @@
 # Process this file with autoconf to produce a configure script.
 
 FULL-PACKAGE-NAME=netperf
-VERSION=2.4.5pre1
+VERSION=2.4.5pre2
 BUG-REPORT-ADDRESS=netperf-feedback at netperf.org
 
 AC_PREREQ(2.59)
-AC_INIT(netperf, 2.4.5pre1)
+AC_INIT(netperf, 2.4.5pre2)
 # use the target version rather than host - one day we may want cross-compile
 AC_CANONICAL_TARGET
 AC_CONFIG_SRCDIR([src/hist.h])

Modified: trunk/src/Makefile.am
===================================================================
--- trunk/src/Makefile.am	2008-07-25 18:00:42 UTC (rev 282)
+++ trunk/src/Makefile.am	2008-07-25 19:02:29 UTC (rev 283)
@@ -12,7 +12,7 @@
 USE_SLOT_SOURCE=netslot_ at NETSLOTLKUP_SOURCE@.c
 USE_SYS_SOURCE=netsys_ at NETSYSLKUP_SOURCE@.c
 
-EXTRA_DIST = netcpu_none.c netcpu_looper.c netcpu_pstat.c netcpu_pstatnew.c netcpu_perfstat.c netcpu_procstat.c netcpu_kstat.c netcpu_kstat10.c netcpu_sysctl.c netcpu_ntperf.c netcpu_osx.c dirs NetPerfDir/* NetServerDir/* netperf_version.h.in netrt_rtnetlink.c netrt_none.c netrt_rtmget.c netdrv_ethtool.c netdrv_none.c netslot_linux.c netslot_none.c netsys_none.c netsys_hpux11i.c netsys_linux.c netsys_solaris.c netdrv_solaris.c netslot_solaris.c
+EXTRA_DIST = netcpu_none.c netcpu_looper.c netcpu_pstat.c netcpu_pstatnew.c netcpu_perfstat.c netcpu_procstat.c netcpu_kstat.c netcpu_kstat10.c netcpu_sysctl.c netcpu_ntperf.c netcpu_osx.c dirs NetPerfDir/* NetServerDir/* netperf_version.h.in netrt_rtnetlink.c netrt_none.c netrt_rtmget.c netdrv_ethtool.c netdrv_none.c netslot_linux.c netslot_none.c netsys_none.c netsys_hpux11i.c netsys_linux.c netsys_solaris.c netdrv_solaris.c netslot_solaris.c Makefile.uw
 
 COMMON_SRC = hist.h netlib.c netlib.h netcpu.h netsh.c netsh.h nettest_bsd.c nettest_bsd.h nettest_dlpi.c nettest_dlpi.h nettest_unix.c nettest_unix.h nettest_xti.c nettest_xti.h nettest_sctp.c nettest_sctp.h netperf_version.h nettest_sdp.c nettest_sdp.h nettest_omni.c
 

Modified: trunk/src/Makefile.in
===================================================================
--- trunk/src/Makefile.in	2008-07-25 18:00:42 UTC (rev 282)
+++ trunk/src/Makefile.in	2008-07-25 19:02:29 UTC (rev 283)
@@ -145,7 +145,7 @@
 USE_SLOT_SOURCE = netslot_ at NETSLOTLKUP_SOURCE@.c
 USE_SYS_SOURCE = netsys_ at NETSYSLKUP_SOURCE@.c
 
-EXTRA_DIST = netcpu_none.c netcpu_looper.c netcpu_pstat.c netcpu_pstatnew.c netcpu_perfstat.c netcpu_procstat.c netcpu_kstat.c netcpu_kstat10.c netcpu_sysctl.c netcpu_ntperf.c netcpu_osx.c dirs NetPerfDir/* NetServerDir/* netperf_version.h.in netrt_rtnetlink.c netrt_none.c netrt_rtmget.c netdrv_ethtool.c netdrv_none.c netslot_linux.c netslot_none.c netsys_none.c netsys_hpux11i.c netsys_linux.c netsys_solaris.c netdrv_solaris.c netslot_solaris.c
+EXTRA_DIST = netcpu_none.c netcpu_looper.c netcpu_pstat.c netcpu_pstatnew.c netcpu_perfstat.c netcpu_procstat.c netcpu_kstat.c netcpu_kstat10.c netcpu_sysctl.c netcpu_ntperf.c netcpu_osx.c dirs NetPerfDir/* NetServerDir/* netperf_version.h.in netrt_rtnetlink.c netrt_none.c netrt_rtmget.c netdrv_ethtool.c netdrv_none.c netslot_linux.c netslot_none.c netsys_none.c netsys_hpux11i.c netsys_linux.c netsys_solaris.c netdrv_solaris.c netslot_solaris.c Makefile.uw
 
 COMMON_SRC = hist.h netlib.c netlib.h netcpu.h netsh.c netsh.h nettest_bsd.c nettest_bsd.h nettest_dlpi.c nettest_dlpi.h nettest_unix.c nettest_unix.h nettest_xti.c nettest_xti.h nettest_sctp.c nettest_sctp.h netperf_version.h nettest_sdp.c nettest_sdp.h nettest_omni.c
 

Added: trunk/src/Makefile.uw
===================================================================
--- trunk/src/Makefile.uw	                        (rev 0)
+++ trunk/src/Makefile.uw	2008-07-25 19:02:29 UTC (rev 283)
@@ -0,0 +1,106 @@
+# User-world netperf Makefile.
+# Copyright 2008, VMware, Inc.
+# Portions Copyright 2008, Hewlett-Packard Company.
+#
+# Assume we're building in a DDK universe.
+#
+BORA_ROOT = /build/toolchain/lin32
+
+#
+# userworld library paths, relative to bora-root
+#
+UWGCC_ROOT       = $(BORA_ROOT)/gcc-3.3.3
+UWGLIBC_TOP_DIR  = $(BORA_ROOT)/uwglibc-2.2.5
+UWGLIBC_LIB_DIR  = $(UWGLIBC_TOP_DIR)/lib
+UWGLIBC_USR_DIR  = $(UWGLIBC_TOP_DIR)/usr/lib
+UWGLIBC_DEST_DIR = /usr/lib/vmware/lib
+
+#
+# userworld include paths
+#
+GCC_INCLUDES   = -isystem $(UWGCC_ROOT)/lib/gcc-lib/i686-linux/3.3.3/include
+GLIBC_INCLUDES = -isystem $(BORA_ROOT)/glibc-2.2.5-44/usr/include 
+
+#
+# userworld compiler environment
+#
+CC = GCC_EXEC_PREFIX="$(UWGCC_ROOT)/lib/gcc-lib/" \
+	KROOT=$(BORA_ROOT) \
+	PATH="$(UWGCC_ROOT)/bin:$(BORA_ROOT)/binutils-2.16.1-vt/bin:/bin:/sbin:/usr/sbin:/usr/bin" \
+	$(UWGCC_ROOT)/bin/i686-linux-gcc
+
+CC_INCLUDES = -nostdinc $(GCC_INCLUDES) $(GLIBC_INCLUDES) $(UWVER_INCLUDES)
+
+#
+# userworld shared libraries
+#
+UWGLIBC_LDLINUX_SO = ld-linux.so.2
+
+UWGLIBC_LINK_OPTS = -nostdlib -nostartfiles \
+	-Xlinker --dynamic-linker=$(UWGLIBC_DEST_DIR)/$(UWGLIBC_LDLINUX_SO) \
+	-Xlinker -z -Xlinker nodefaultlib \
+	-Xlinker -rpath -Xlinker $(UWGLIBC_DEST_DIR) \
+	-L$(UWGLIBC_USR_DIR) \
+	-L$(UWGLIBC_LIB_DIR)
+
+UWGLIBC_LINK_CRTS = \
+	${UWGLIBC_TOP_DIR}/usr/lib/crt1.o \
+	${UWGLIBC_TOP_DIR}/usr/lib/crti.o \
+	${UWGCC_ROOT}/lib/gcc-lib/i686-linux/3.3.3/crtbegin.o \
+	${UWGCC_ROOT}/lib/gcc-lib/i686-linux/3.3.3/crtend.o \
+	${UWGLIBC_TOP_DIR}/usr/lib/crtn.o
+
+CFLAGS  = -DVMWARE_UW $(CC_INCLUDES) -g -O -mcpu=pentiumpro
+CFLAGS += -DDEBUG_LOG_FILE=\"/dev/null\" -DDO_FIRST_BURST -DDO_UNIX
+
+UWGLIBC_LINK_LIBS = -lm -ldl -lpthread -lresolv -lnss_nis -lnss_nisplus \
+	-lnss_files -lnss_compat -lnss_dns -lnsl -lc -lc_nonshared -lgcc
+LDFLAGS = $(UWGLIBC_LINK_OPTS) $(UWGLIBC_LINK_CRTS) \
+	$(UWGLIBC_LINK_LIBS) ${UWGLIBC_LIB_DIR}/${UWGLIBC_LDLINUX_SO}
+
+NETSERVER_OBJS = netserver.o nettest_bsd.o nettest_dlpi.o \
+	nettest_unix.o netlib.o netsh.o \
+	nettest_xti.o nettest_ipv6.o \
+	netcpu_none.c \
+	nettest_dns.o
+
+NETPERF_OBJS = netperf.o netsh.o netlib.o nettest_bsd.o \
+	nettest_dlpi.o nettest_unix.o \
+	nettest_xti.o nettest_ipv6.o \
+	netcpu_none.c \
+	nettest_dns.o
+
+all: netperf-uw netserver-uw
+
+netperf-uw: $(NETPERF_OBJS)
+	$(CC) -o $@ $(NETPERF_OBJS) $(LDFLAGS)
+	strip $@
+
+netserver-uw: $(NETSERVER_OBJS)
+	$(CC) -o $@ $(NETSERVER_OBJS) $(LDFLAGS)
+	strip $@
+
+netperf.o: netperf.c netsh.h Makefile.uw
+
+netsh.o: netsh.c netsh.h nettest_bsd.h netlib.h Makefile.uw
+
+netlib.o: netlib.c netlib.h netsh.h Makefile.uw
+
+nettest_bsd.o: nettest_bsd.c nettest_bsd.h netlib.h netsh.h Makefile.uw
+
+nettest_dlpi.o: nettest_dlpi.c nettest_dlpi.h netlib.h netsh.h Makefile.uw
+
+nettest_unix.o: nettest_unix.c nettest_unix.h netlib.h netsh.h Makefile.uw
+
+nettest_xti.o: nettest_xti.c nettest_xti.h netlib.h netsh.h Makefile.uw
+
+nettest_ipv6.o: nettest_ipv6.c nettest_ipv6.h netlib.h netsh.h Makefile.uw
+
+nettest_dns.o: nettest_dns.c nettest_dns.h netlib.h netsh.h Makefile.uw
+
+netcpu_none.o: netcpu_none.c netsh.h netlib.h
+
+netserver.o: netserver.c nettest_bsd.h netlib.h Makefile.uw
+
+clean:
+	rm -f *.o netperf-uw netserver-uw

Modified: trunk/src/netlib.c
===================================================================
--- trunk/src/netlib.c	2008-07-25 18:00:42 UTC (rev 282)
+++ trunk/src/netlib.c	2008-07-25 19:02:29 UTC (rev 283)
@@ -3678,6 +3678,10 @@
    register int val;
    h->total++;
    val = time_delta;
+   /* check for < 0 added via VMware ESX patches */
+   if (val < 0) {
+     h->ridiculous++;
+   }
    if(val <= 9) h->unit_usec[val]++;
    else {
      val = val/10;

Modified: trunk/src/netserver.c
===================================================================
--- trunk/src/netserver.c	2008-07-25 18:00:42 UTC (rev 282)
+++ trunk/src/netserver.c	2008-07-25 19:02:29 UTC (rev 283)
@@ -614,7 +614,7 @@
     setpgrp();
     */
 
-#if !defined(WIN32) && !defined(MPE) && !defined(__VMS)
+#if !defined(WIN32) && !defined(MPE) && !defined(__VMS) && !defined(VMWARE_UW)
   /* Flush the standard I/O file descriptors before forking. */
   fflush (stdin);
   fflush (stdout);
@@ -702,7 +702,7 @@
 	      printf("server_control: accept failed errno %d\n",errno);
 	      exit(1);
 	    }
-#if defined(MPE) || defined(__VMS)
+#if defined(MPE) || defined(__VMS) || defined(VMWARE_UW)
 	  /*
 	   * Since we cannot fork this process , we cant fire any threads
 	   * as they all share the same global data . So we better allow
@@ -806,7 +806,7 @@
 	    }
 #endif /* !WIN32 !MPE !__VMS */  
 	} /*for*/
-#if !defined(WIN32) && !defined(MPE) && !defined(__VMS)
+#if !defined(WIN32) && !defined(MPE) && !defined(__VMS) && !defined(VMWARE_UW)
       break; /*case 0*/
       
     default: 

Modified: trunk/src/nettest_bsd.c
===================================================================
--- trunk/src/nettest_bsd.c	2008-07-25 18:00:42 UTC (rev 282)
+++ trunk/src/nettest_bsd.c	2008-07-25 19:02:29 UTC (rev 283)
@@ -8915,6 +8915,15 @@
     /* zero return we can avoid race conditions that stick us with the */
     /* TIME_WAIT connection and not the server. raj 8/96 */
 
+#ifdef VMWARE_UW
+    /* why this should be for VMware I'm not sure, but it was given as
+       part of the patches, so we include it here, but put it under an
+       ifdef VMWARE_UW. raj 2008-07-25 */
+    if (sp_bytes_recvd < 0 && errno == ECONNRESET) {
+      rsp_bytes_recvd = 0;
+    } 
+#endif /* VMWARE_UW */
+
     if (rsp_bytes_recvd == 0) {
       /* connection close, call close. we assume that the requisite */
       /* number of bytes have been received */



More information about the netperf-dev mailing list