diff --git a/benchmarks/netperf/Makefile b/benchmarks/netperf/Makefile index 971b35e9820f..51f35e113f64 100644 --- a/benchmarks/netperf/Makefile +++ b/benchmarks/netperf/Makefile @@ -1,56 +1,60 @@ PORTNAME= netperf -PORTVERSION= 2.7.1.p20170921 +PORTVERSION= 2.7.1.p20210121 PORTREVISION= 1 CATEGORIES= benchmarks -MAINTAINER= ports@FreeBSD.org +MAINTAINER= marius@FreeBSD.org COMMENT= Network performance benchmarking package WWW= https://hewlettpackard.github.io/netperf/ +USES= autoreconf:build,2.69 + USE_GITHUB= yes GH_ACCOUNT= HewlettPackard #GH_TAGNAME= ${PORTNAME}-${PORTVERSION} -GH_TAGNAME= d566775bf +GH_TAGNAME= 3bc455b23 OPTIONS_DEFINE= EXAMPLES EXS HISTOGRAM INFO OMNI SCTP SOCKETS OPTIONS_DEFAULT= ${OPTIONS_DEFINE} EXS_DESC= Enable ICSC async socket support HISTOGRAM_DESC= Enable histogram output OMNI_DESC= Enable OMNI tests (disable for aio(4) support) SCTP_DESC= Enable SCTP support SOCKETS_DESC= Enable Unix Domain socket support USE_CSTD= gnu89 GNU_CONFIGURE= yes -CONFIGURE_ENV= "transform=" -CONFIGURE_ARGS= --program-prefix="" --program-suffix="" --enable-dirty \ - --enable-demo --enable-burst --enable-intervals +CONFIGURE_ARGS= --enable-burst --enable-demo --enable-dirty --enable-intervals CFLAGS+= -fcommon INFO_INFO= netperf EXS_CONFIGURE_ENABLE= exs HISTOGRAM_CONFIGURE_ENABLE= histogram OMNI_CONFIGURE_ENABLE= omni SCTP_CONFIGURE_ENABLE= sctp SOCKETS_CONFIGURE_ENABLE= unixdomain SCRIPTS= arr_script bloat.sh find_max_burst.sh packet_byte_script \ remote_hosts runemomni.sh runemomniagg2.sh runemomniaggdemo.sh \ sctp_stream_script snapshot_script tcp_range_script \ tcp_rr_script tcp_stream_script udp_rr_script \ udp_stream_script post-patch: .for i in ${SCRIPTS} @${REINPLACE_CMD} -e 's,%%PREFIX%%,${PREFIX},' ${WRKSRC}/doc/examples/$i .endfor + @${REINPLACE_CMD} -E -e 's,(conf|header),\12.69,g' ${WRKSRC}/autogen.sh + +pre-configure: + @cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ./autogen.sh post-install: ${MKDIR} ${STAGEDIR}${EXAMPLESDIR} .for i in ${SCRIPTS} ${INSTALL_SCRIPT} ${WRKSRC}/doc/examples/$i ${STAGEDIR}${EXAMPLESDIR} .endfor .include diff --git a/benchmarks/netperf/distinfo b/benchmarks/netperf/distinfo index 1ce89f85daa7..a466b562d6b2 100644 --- a/benchmarks/netperf/distinfo +++ b/benchmarks/netperf/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1519739687 -SHA256 (HewlettPackard-netperf-2.7.1.p20170921-d566775bf_GH0.tar.gz) = 66fc216436bdd9dbdb726cc43d6d09a7c5356b4569546fb3dce833ed45ea5b70 -SIZE (HewlettPackard-netperf-2.7.1.p20170921-d566775bf_GH0.tar.gz) = 2010861 +TIMESTAMP = 1681506504 +SHA256 (HewlettPackard-netperf-2.7.1.p20210121-3bc455b23_GH0.tar.gz) = 9b6cc198f1727866ff337e444f35a12ecc708f92e74e12812e4e02f969b88a61 +SIZE (HewlettPackard-netperf-2.7.1.p20210121-3bc455b23_GH0.tar.gz) = 1913413 diff --git a/benchmarks/netperf/files/patch-configure b/benchmarks/netperf/files/patch-configure deleted file mode 100644 index a45924e8e560..000000000000 --- a/benchmarks/netperf/files/patch-configure +++ /dev/null @@ -1,20 +0,0 @@ ---- configure.orig 2017-09-21 17:32:54 UTC -+++ configure -@@ -6817,7 +6817,7 @@ fi - done - - case "$host" in -- *-*-freebsd[7-9].* | *-*-freebsd1[0-1].* ) -+ *-*-freebsd[7-9].* | *-*-freebsd[1-9][0-9].*) - # FreeBSD 7.x and later SCTP support doesn't need -lsctp. - ;; - *) -@@ -7392,7 +7392,7 @@ ac_cv_lib_kstat=ac_cv_lib_kstat_main - enable_cpuutil="kstat - auto" - NETCPU_SOURCE="kstat" - ;; -- *-*-freebsd[4-9].* | *-*-freebsd1[0-1].* | *-*-netbsd[1-9].* ) -+ *-*-freebsd[4-9].* | *-*-freebsd[1-9][0-9].* | *-*-netbsd[1-9].* ) - use_cpuutil=true - - $as_echo "#define USE_SYSCTL /**/" >>confdefs.h diff --git a/benchmarks/netperf/files/patch-configure.ac b/benchmarks/netperf/files/patch-configure.ac new file mode 100644 index 000000000000..dc965e15761d --- /dev/null +++ b/benchmarks/netperf/files/patch-configure.ac @@ -0,0 +1,20 @@ +--- configure.ac.orig 2021-01-21 16:02:24 UTC ++++ configure.ac +@@ -472,7 +472,7 @@ case "$enable_sctp" in + #include + ]]) + case "$host" in +- *-*-freebsd[[7-9]].* | *-*-freebsd1[[0-2]].* ) ++ *-*-freebsd[[7-9]].* | *-*-freebsd[[1-9]][[0-9]].*) + # FreeBSD 7.x and later SCTP support doesn't need -lsctp. + ;; + *) +@@ -704,7 +704,7 @@ case "$enable_cpuutil" in + enable_cpuutil="kstat - auto" + NETCPU_SOURCE="kstat" + ;; +- *-*-freebsd[[4-9]].* | *-*-freebsd1[[0-2]].* | *-*-netbsd[[1-9]].* ) ++ *-*-freebsd[[4-9]].* | *-*-freebsd[[1-9]][[0-9]].* | *-*-netbsd[[1-9]].* ) + use_cpuutil=true + AC_DEFINE([USE_SYSCTL],,[Use MumbleBSD's sysctl interface to measure CPU util.]) + enable_cpuutil="sysctl - auto" diff --git a/benchmarks/netperf/files/patch-doc_examples_runemomni.sh b/benchmarks/netperf/files/patch-doc_examples_runemomni.sh index caaa54ffb138..5718feef41fb 100644 --- a/benchmarks/netperf/files/patch-doc_examples_runemomni.sh +++ b/benchmarks/netperf/files/patch-doc_examples_runemomni.sh @@ -1,74 +1,74 @@ --- doc/examples/runemomni.sh.orig 2011-07-28 20:35:06 UTC +++ doc/examples/runemomni.sh @@ -1,6 +1,8 @@ # a script to run a set of single-instance netperf tests # between two machines +NETPERF="%%PREFIX%%/bin/netperf" + # the length in seconds of each test iteration. the actual # run time will then be somewhere between that times min # and max iteration for confidence intervals @@ -81,7 +83,7 @@ do fi for j in $set - do + do - netperf $HDR -T $i,$j -t omni -c -C -H $control_host -l $length $confidence -- $CSV -H $data -m 64K;HDR="-P 0"; + $NETPERF $HDR -T $i,$j -t omni -c -C -H $control_host -l $length $confidence -- $CSV -H $data -m 64K;HDR="-P 0"; done done fi @@ -100,7 +102,7 @@ do fi for j in $set do - netperf $HDR -T $i,$j -t omni -c -C -H $control_host -l $length $confidence -- $CSV -H $data -s 1M -S 1M -m 64K;HDR="-P 0"; + $NETPERF $HDR -T $i,$j -t omni -c -C -H $control_host -l $length $confidence -- $CSV -H $data -s 1M -S 1M -m 64K;HDR="-P 0"; done done fi @@ -119,7 +121,7 @@ do fi for j in $set do - netperf $HDR -T $i,$j -t omni -f m -c -C -H $control_host -l $length $confidence -- $CSV -H $data -s 1M -S 1M -r 64K -b 12; HDR="-P 0"; + $NETPERF $HDR -T $i,$j -t omni -f m -c -C -H $control_host -l $length $confidence -- $CSV -H $data -s 1M -S 1M -r 64K -b 12; HDR="-P 0"; done done fi @@ -138,7 +140,7 @@ do fi for j in $set do - netperf $HDR -T $i,$j -t omni -c -C -H $control_host -l $length $confidence -- $CSV -H $data -r 1; HDR="-P 0"; + $NETPERF $HDR -T $i,$j -t omni -c -C -H $control_host -l $length $confidence -- $CSV -H $data -r 1; HDR="-P 0"; done done fi @@ -151,7 +153,7 @@ do do for req in $reqs; do for burst in $bursts; do - netperf $HDR -T $i -t omni -f m -c -C -H $control_host -l $length $confidence -- $CSV -H $data -s 1M -S 1M -r $req -b $burst -D;HDR=-"P 0"; + $NETPERF $HDR -T $i -t omni -f m -c -C -H $control_host -l $length $confidence -- $CSV -H $data -s 1M -S 1M -r $req -b $burst -D;HDR=-"P 0"; done done done @@ -165,7 +167,7 @@ do do for req in $reqs; do for burst in $bursts; do - netperf $HDR -T $i -t omni -f m -c -C -H $control_host -l $length $confidence -- $CSV -H $data -s 1M -S 1M -r $req -b $burst -T udp;HDR=-"P 0"; + $NETPERF $HDR -T $i -t omni -f m -c -C -H $control_host -l $length $confidence -- $CSV -H $data -s 1M -S 1M -r $req -b $burst -T udp;HDR=-"P 0"; done done done @@ -180,7 +182,7 @@ do for i in $netperf_CPUs do for req in $reqs; do - netperf $HDR -T $i -t omni -f m -c -C -H $control_host -l $length $confidence -- $CSV -H $data -s 1M -S 1M -m $req -T udp;HDR=-"P 0"; + $NETPERF $HDR -T $i -t omni -f m -c -C -H $control_host -l $length $confidence -- $CSV -H $data -s 1M -S 1M -m $req -T udp;HDR=-"P 0"; done done fi diff --git a/benchmarks/netperf/files/patch-doc_examples_runemomniagg2.sh b/benchmarks/netperf/files/patch-doc_examples_runemomniagg2.sh index 9a64a32bf259..844fd6550979 100644 --- a/benchmarks/netperf/files/patch-doc_examples_runemomniagg2.sh +++ b/benchmarks/netperf/files/patch-doc_examples_runemomniagg2.sh @@ -1,69 +1,69 @@ --- doc/examples/runemomniagg2.sh.orig 2011-07-28 18:37:22 UTC +++ doc/examples/runemomniagg2.sh @@ -1,4 +1,7 @@ #set -x + +NETPERF="%%PREFIX%%/bin/netperf" + # edit and add to this array as necessary # the hosts you will use should be contiguous # starting at index zero @@ -84,11 +87,11 @@ echo four dl585 G5 clients rh5.2, each w echo TCP_STREAM for i in $concurrent_sessions; do - j=0; + j=0; - NETUUID=`netperf -t uuid`; + NETUUID=`$NETPERF -t uuid`; echo $i concurrent streams id $NETUUID; - while [ $j -lt $i ]; do + while [ $j -lt $i ]; do client=`expr $j % $num_cli` ; - netperf $HDR -t omni -c -C -H ${remote_hosts[$client]} -l $length $confidence -- $CSV -H ${remote_hosts[$client]} $socket_sizes -m 64K -u $NETUUID & HDR="-P 0"; + $NETPERF $HDR -t omni -c -C -H ${remote_hosts[$client]} -l $length $confidence -- $CSV -H ${remote_hosts[$client]} $socket_sizes -m 64K -u $NETUUID & HDR="-P 0"; j=`expr $j + 1`; done; wait; @@ -99,11 +102,11 @@ echo four dl585 G5 clients rh5.2, each w echo TCP_MAERTS for i in $concurrent_sessions; do j=0; - NETUUID=`netperf -t uuid`; + NETUUID=`$NETPERF -t uuid`; echo $i concurrent streams id $NETUUID; while [ $j -lt $i ]; do client=`expr $j % $num_cli` ; - netperf $HDR -t omni -c -C -H ${remote_hosts[$client]} -l $length $confidence -- $CSV -H ${remote_hosts[$client]} $socket_sizes -M ,64K -u $NETUUID & HDR="-P 0"; + $NETPERF $HDR -t omni -c -C -H ${remote_hosts[$client]} -l $length $confidence -- $CSV -H ${remote_hosts[$client]} $socket_sizes -M ,64K -u $NETUUID & HDR="-P 0"; j=`expr $j + 1`; done; wait; @@ -115,11 +118,11 @@ echo four dl585 G5 clients rh5.2, each w HDR="-P 1" for i in $concurrent_sessions; do j=0; - NETUUID=`netperf -t uuid`; + NETUUID=`$NETPERF -t uuid`; echo $i concurrent streams id $NETUUID; while [ $j -lt $i ]; do client=`expr $j % $num_cli` ; - netperf $HDR -t omni -f m -c -C -H ${remote_hosts[$client]} -l $length $confidence -- $CSV -H ${remote_hosts[$client]} -s 1M -S 1M -r 64K -b 12 -u $NETUUID & HDR="-P 0"; + $NETPERF $HDR -t omni -f m -c -C -H ${remote_hosts[$client]} -l $length $confidence -- $CSV -H ${remote_hosts[$client]} -s 1M -S 1M -r 64K -b 12 -u $NETUUID & HDR="-P 0"; j=`expr $j + 1`; done; wait; @@ -130,14 +133,14 @@ echo four dl585 G5 clients rh5.2, each w echo TCP_RR aggregates HDR="-P 1" for i in $concurrent_sessions; do - NETUUID=`netperf -t uuid`; + NETUUID=`$NETPERF -t uuid`; echo $i concurrent streams id $NETUUID; for b in $burst_sizes; do echo burst of $b; j=0; while [ $j -lt $i ]; do client=`expr $j % $num_cli` ; - netperf $HDR -t omni -f x -c -C -H ${remote_hosts[$client]} -l $length $confidence -- $CSV -H ${remote_hosts[$client]} -r 1 -b $b -D -u $NETUUID & HDR="-P 0"; + $NETPERF $HDR -t omni -f x -c -C -H ${remote_hosts[$client]} -l $length $confidence -- $CSV -H ${remote_hosts[$client]} -r 1 -b $b -D -u $NETUUID & HDR="-P 0"; j=`expr $j + 1`; done; wait; diff --git a/benchmarks/netperf/files/patch-doc_examples_runemomniaggdemo.sh b/benchmarks/netperf/files/patch-doc_examples_runemomniaggdemo.sh index e2ba57a8a08f..bb68cc7c3766 100644 --- a/benchmarks/netperf/files/patch-doc_examples_runemomniaggdemo.sh +++ b/benchmarks/netperf/files/patch-doc_examples_runemomniaggdemo.sh @@ -1,11 +1,11 @@ --- doc/examples/runemomniaggdemo.sh.orig 2013-05-10 18:14:25 UTC +++ doc/examples/runemomniaggdemo.sh @@ -138,7 +138,7 @@ then fi - # allow the netperf binary to be used to be overridden + # allow the netperf binary to be used to be overridden -NETPERF=${NETPERF:="netperf"} +NETPERF="%%PREFIX%%/bin/netperf" if [ $NUM_REMOTE_HOSTS -lt 2 ] then diff --git a/benchmarks/netperf/files/patch-src_netserver.c b/benchmarks/netperf/files/patch-src_netserver.c new file mode 100644 index 000000000000..b6b2781c6d8b --- /dev/null +++ b/benchmarks/netperf/files/patch-src_netserver.c @@ -0,0 +1,11 @@ +--- src/netserver.c.orig 2021-01-21 16:02:24 UTC ++++ src/netserver.c +@@ -260,8 +260,6 @@ open_debug_file() + + #if !defined(WIN32) + +- chmod(FileName,0644); +- + /* redirect stdin to "/dev/null" */ + rd_null_fp = fopen(NETPERF_NULL,"r"); + if (NULL == rd_null_fp) { diff --git a/benchmarks/netperf/pkg-descr b/benchmarks/netperf/pkg-descr index 369a70d44648..5e6d33dae960 100644 --- a/benchmarks/netperf/pkg-descr +++ b/benchmarks/netperf/pkg-descr @@ -1,15 +1,15 @@ Netperf is a serious networking performance evaluation tool being -distributed under GPL by HP's Information Networks Division. +distributed under BSD-1-clause by HP's Information Networks Division. Testing is done using a pair of programs: `netserver' (the server) and `netperf' (the measurement tool). Netperf allows control over a large number of test `variables'. Some of these are: * specification of desired confidence levels for the tests Netperf will warn the user if these levels were not achieved. * filling send buffers with specified data (to beat compression schemes) * specification of send/receive buffer alignments and data offsets * requesting CPU utilization and service demand calculations * specification of sizes of data to send Netperf can be used for measuring stream performance as well as round-trip performance.