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

raj at netperf.org raj at netperf.org
Mon May 19 16:06:36 PDT 2008


Author: raj
Date: 2008-05-19 16:06:35 -0700 (Mon, 19 May 2008)
New Revision: 277

Modified:
   trunk/src/netdrv_ethtool.c
   trunk/src/nettest_omni.c
Log:
make ethtool ioctl work on older stuff

Modified: trunk/src/netdrv_ethtool.c
===================================================================
--- trunk/src/netdrv_ethtool.c	2008-04-22 21:21:35 UTC (rev 276)
+++ trunk/src/netdrv_ethtool.c	2008-05-19 23:06:35 UTC (rev 277)
@@ -1,3 +1,7 @@
+#if defined(HAVE_CONFIG_H)
+#include <config.h>
+#endif
+
 #include <sys/types.h>
 #include <string.h>
 #include <sys/ioctl.h>
@@ -16,6 +20,12 @@
 typedef __uint16_t __u16;
 typedef __uint8_t  __u8;
 
+/* older ones want them without the leading underscores */
+typedef __uint64_t u64;
+typedef __uint32_t u32;
+typedef __uint16_t u16;
+typedef __uint8_t  u8;
+
 #include <linux/ethtool.h>
 
 void
@@ -84,3 +94,26 @@
   
   return;
 }
+
+#if defined(NETPERF_STANDALONE_DEBUG)
+int
+main(int argc, char *argv[]) {
+
+  char driver[32];
+  char version[32];
+  char firmware[32];
+  char businfo[32];
+
+  if (argc != 2) {
+    fprintf(stderr,"%s <interface>\n",argv[0]);
+    return -1;
+  }
+
+  find_driver_info(argv[1],driver, version, firmware, businfo, 32);
+
+  printf("For %s driver %s version %s firmware %s businfo %s\n",
+	 argv[1],driver, version, firmware, businfo);
+
+  return 0;
+}
+#endif

Modified: trunk/src/nettest_omni.c
===================================================================
--- trunk/src/nettest_omni.c	2008-04-22 21:21:35 UTC (rev 276)
+++ trunk/src/nettest_omni.c	2008-05-19 23:06:35 UTC (rev 277)
@@ -5605,7 +5605,7 @@
 	/* special case - if the file name is "?" then we will emit a
 	   list of the available outputs */
 	if (strcmp(csv_selection_file,"?") == 0) {
-	  dump_netperf_output_list(where,1);
+	  dump_netperf_output_list(stdout,1);
 	  exit(1);
 	}
       }
@@ -5627,7 +5627,7 @@
 	human_selection_file = strdup(argv[optind]);
 	optind++;
 	if (strcmp(human_selection_file,"?") == 0) {
-	  dump_netperf_output_list(where,0);
+	  dump_netperf_output_list(stdout,0);
 	  exit(1);
 	}
       }



More information about the netperf-dev mailing list