[netperf-dev] netperf2 commit notice r552 - trunk/src
raj at netperf.org
raj at netperf.org
Mon Apr 2 17:33:09 PDT 2012
Author: raj
Date: 2012-04-02 17:33:08 -0700 (Mon, 02 Apr 2012)
New Revision: 552
Modified:
trunk/src/Makefile.am
trunk/src/Makefile.in
trunk/src/netlib.c
trunk/src/netsh.c
trunk/src/netsh.h
Log:
dscp changes from dave taht and a fix for an off by two bug they expose from me
Modified: trunk/src/Makefile.am
===================================================================
--- trunk/src/Makefile.am 2012-03-31 00:23:48 UTC (rev 551)
+++ trunk/src/Makefile.am 2012-04-03 00:33:08 UTC (rev 552)
@@ -15,7 +15,7 @@
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 netslot_ux1131.c netsec_linux.c netsec_none.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 net_uuid.c
+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 net_uuid.c dscp.c
netperf_SOURCES = netperf.c $(COMMON_SRC) $(USE_CPU_SOURCE) $(USE_RT_SOURCE) $(USE_DRV_SOURCE) $(USE_SLOT_SOURCE) $(USE_SYS_SOURCE) $(USE_SEC_SOURCE)
netserver_SOURCES = netserver.c $(COMMON_SRC) $(USE_CPU_SOURCE) $(USE_RT_SOURCE) $(USE_DRV_SOURCE) $(USE_SLOT_SOURCE) $(USE_SYS_SOURCE) $(USE_SEC_SOURCE)
Modified: trunk/src/Makefile.in
===================================================================
--- trunk/src/Makefile.in 2012-03-31 00:23:48 UTC (rev 551)
+++ trunk/src/Makefile.in 2012-04-03 00:33:08 UTC (rev 552)
@@ -54,7 +54,7 @@
nettest_dlpi.$(OBJEXT) nettest_unix.$(OBJEXT) \
nettest_xti.$(OBJEXT) nettest_sctp.$(OBJEXT) \
nettest_sdp.$(OBJEXT) nettest_omni.$(OBJEXT) \
- net_uuid.$(OBJEXT)
+ net_uuid.$(OBJEXT) dscp.$(OBJEXT)
am__objects_2 = netcpu_ at NETCPU_SOURCE@.$(OBJEXT)
am__objects_3 = netrt_ at NETRTLKUP_SOURCE@.$(OBJEXT)
am__objects_4 = netdrv_ at NETDRVLKUP_SOURCE@.$(OBJEXT)
@@ -237,7 +237,7 @@
USE_SYS_SOURCE = netsys_ at NETSYSLKUP_SOURCE@.c
USE_SEC_SOURCE = netsec_ at NETSECLKUP_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 netslot_ux1131.c netsec_linux.c netsec_none.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 net_uuid.c
+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 net_uuid.c dscp.c
netperf_SOURCES = netperf.c $(COMMON_SRC) $(USE_CPU_SOURCE) $(USE_RT_SOURCE) $(USE_DRV_SOURCE) $(USE_SLOT_SOURCE) $(USE_SYS_SOURCE) $(USE_SEC_SOURCE)
netserver_SOURCES = netserver.c $(COMMON_SRC) $(USE_CPU_SOURCE) $(USE_RT_SOURCE) $(USE_DRV_SOURCE) $(USE_SLOT_SOURCE) $(USE_SYS_SOURCE) $(USE_SEC_SOURCE)
@@ -330,6 +330,7 @@
distclean-compile:
-rm -f *.tab.c
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dscp.Po at am__quote@
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/net_uuid.Po at am__quote@
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/netcpu_ at NETCPU_SOURCE@.Po at am__quote@
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/netdrv_ at NETDRVLKUP_SOURCE@.Po at am__quote@
Modified: trunk/src/netlib.c
===================================================================
--- trunk/src/netlib.c 2012-03-31 00:23:48 UTC (rev 551)
+++ trunk/src/netlib.c 2012-04-03 00:33:08 UTC (rev 552)
@@ -2378,7 +2378,7 @@
and at any rate, the performance of sending control messages for
this benchmark is not of any real concern. */
- for (counter = 0;counter < count; counter++) {
+ for (counter = 0; counter < count; counter++) {
request_array[counter] = htonl(request_array[counter]);
}
@@ -2529,9 +2529,20 @@
int limit;
limit = sizeof(netperf_request) / 4;
- for (i = n; i < limit; i++) {
+ /* we must remember that the request_array also contains two ints of
+ "other" stuff, so we start the fixup two in - at least I think we
+ should. raj 2012-04-02 */
+ for (i = n + 2; i < limit; i++) {
request_array[i] = htonl(request_array[i]);
}
+ if (debug > 1) {
+ fprintf(where,
+ "%s: request contents after fixup at the %d th int\n",
+ __FUNCTION__,
+ n);
+ dump_request();
+ fflush(where);
+ }
}
/* receive a request, only converting the first n ints-worth of the
@@ -2760,7 +2771,8 @@
0,
&timeout)) != 1) {
fprintf(where,
- "netperf: receive_response: no response received. errno %d counter %d\n",
+ "%s: no response received. errno %d counter %d\n",
+ __FUNCTION__,
errno,
counter);
exit(1);
@@ -3137,7 +3149,7 @@
to assist with pesky end-to-end-unfriendly things like firewalls, we
allow the caller to specify both the remote hostname and port, and
the local addressing info. i believe that in theory it is possible
- to have an IPv4 endpoint and an IPv6 endpoint communicate with one
+
another, but for the time being, we are only going to take-in one
requested address family parameter. this means that the only way
(iirc) that we might get a mixed-mode connection would be if the
Modified: trunk/src/netsh.c
===================================================================
--- trunk/src/netsh.c 2012-03-31 00:23:48 UTC (rev 551)
+++ trunk/src/netsh.c 2012-04-03 00:33:08 UTC (rev 552)
@@ -883,7 +883,7 @@
break_args(optarg, arg1, arg2);
#if defined(IP_TOS) || defined(IPV6_TCLASS)
if (arg1[0])
- local_socket_tos = strtol(arg1,NULL,0);
+ local_socket_tos = parse_ipqos(arg1);
#else
if (debug) {
fprintf(where,
@@ -892,8 +892,15 @@
}
local_socket_tos = -1;
#endif
- if (arg2[0])
- remote_socket_tos = strtol(arg2,NULL,0);
+ if (arg2[0]) {
+ remote_socket_tos = parse_ipqos(arg2);
+ if (debug) {
+ fprintf(where,
+ "Setting remote_socket_tos to 0x%x\n",
+ remote_socket_tos);
+ fflush(where);
+ }
+ }
break;
case 'Z':
/* only copy as much of the passphrase as could fit in the
@@ -1297,8 +1304,8 @@
printf("Remote recv alignment: %d\n",remote_recv_align);
printf("Local socket priority: %d\n", local_socket_prio);
printf("Remote socket priority: %d\n", remote_socket_prio);
- printf("Local socket TOS: %x\n", local_socket_tos);
- printf("Remote socket TOS: %x\n", remote_socket_tos);
+ printf("Local socket TOS: %s\n", iptos2str(local_socket_tos));
+ printf("Remote socket TOS: %s\n", iptos2str(remote_socket_tos));
printf("Report local CPU %d\n",local_cpu_usage);
printf("Report remote CPU %d\n",remote_cpu_usage);
printf("Verbosity: %d\n",verbosity);
Modified: trunk/src/netsh.h
===================================================================
--- trunk/src/netsh.h 2012-03-31 00:23:48 UTC (rev 551)
+++ trunk/src/netsh.h 2012-04-03 00:33:08 UTC (rev 552)
@@ -210,3 +210,7 @@
#endif /* WANT_DLPI */
#endif
+
+extern int parse_ipqos(const char *cp);
+extern const char * iptos2str(int iptos);
+
More information about the netperf-dev
mailing list