Upgrade to 2.4.2.
This commit is contained in:
parent
2dec6f528c
commit
ab9f89b62e
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=176894
21 changed files with 69 additions and 233 deletions
|
@ -6,20 +6,21 @@
|
|||
#
|
||||
|
||||
PORTNAME= netperf
|
||||
PORTVERSION= 2.3.1
|
||||
PORTREVISION= 1
|
||||
PORTVERSION= 2.4.2
|
||||
CATEGORIES= benchmarks ipv6
|
||||
MASTER_SITES= ftp://ftp.cup.hp.com/dist/networking/benchmarks/netperf/
|
||||
DISTNAME= netperf-2.3pl1
|
||||
MASTER_SITES= ftp://ftp.netperf.org/netperf/
|
||||
|
||||
MAINTAINER= sumikawa@FreeBSD.org
|
||||
COMMENT= Rick Jones' <raj@cup.hp.com> network performance benchmarking package
|
||||
COMMENT= Network performance benchmarking package
|
||||
|
||||
MAKEFILE= makefile
|
||||
GNU_CONFIGURE= yes
|
||||
CONFIGURE_ENV= "transform="
|
||||
CONFIGURE_ARGS= --program-prefix="" --program-suffix=""
|
||||
MAN1= netperf.1 netserver.1
|
||||
|
||||
SCRIPTS= arr_script snapshot_script tcp_range_script tcp_rr_script \
|
||||
tcp_stream_script udp_rr_script udp_stream_script
|
||||
SCRIPTS= arr_script packet_byte_script sctp_stream_script snapshot_script \
|
||||
tcp_range_script tcp_rr_script tcp_stream_script udp_rr_script \
|
||||
udp_stream_script
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
|
@ -27,19 +28,7 @@ BUILD_DEFS+= USE_INET6
|
|||
|
||||
post-patch:
|
||||
.for i in ${SCRIPTS}
|
||||
@${MV} ${WRKSRC}/$i ${WRKSRC}/$i.pre-sed
|
||||
@${SED} -e 's^%%PREFIX%%^${PREFIX}^' ${WRKSRC}/$i.pre-sed > ${WRKSRC}/$i
|
||||
@${REINPLACE_CMD} -e 's^%%PREFIX%%^${PREFIX}^' ${WRKSRC}/doc/examples/$i
|
||||
.endfor
|
||||
|
||||
post-install:
|
||||
${STRIP_CMD} ${PREFIX}/netperf/netperf
|
||||
${STRIP_CMD} ${PREFIX}/netperf/netserver
|
||||
${INSTALL_MAN} ${WRKSRC}/netperf.man ${PREFIX}/man/man1/netperf.1
|
||||
${INSTALL_MAN} ${WRKSRC}/netserver.man ${PREFIX}/man/man1/netserver.1
|
||||
.if !defined(NOPORTDOCS)
|
||||
${MKDIR} ${PREFIX}/share/doc/netperf
|
||||
${INSTALL_DATA} ${WRKSRC}/netperf.ps ${PREFIX}/share/doc/netperf
|
||||
${GZIP_CMD} ${PREFIX}/share/doc/netperf/netperf.ps
|
||||
.endif
|
||||
|
||||
.include <bsd.port.post.mk>
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
MD5 (netperf-2.3pl1.tar.gz) = b74314d78af31cb13516fb9a372d2e86
|
||||
SHA256 (netperf-2.3pl1.tar.gz) = f35828acb7b343e52e5bd296e110009f44cbce4a8df7d0b3dde2fda8a6915e88
|
||||
SIZE (netperf-2.3pl1.tar.gz) = 836110
|
||||
MD5 (netperf-2.4.2.tar.gz) = c747042975c2965b2cd45ebf8525c5f8
|
||||
SHA256 (netperf-2.4.2.tar.gz) = 844ba97e745a0b9f37afc7daa323cafcef00108cd0254667da0a00558eb323a7
|
||||
SIZE (netperf-2.4.2.tar.gz) = 1161450
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
/usr/bin/diff --ignore-matching-lines=.*{$Id:|$Header:}.* -u arr_script.orig arr_script
|
||||
--- arr_script.orig Wed Sep 8 15:57:17 1999
|
||||
+++ arr_script Wed Sep 8 15:57:56 1999
|
||||
@@ -10,8 +10,7 @@
|
||||
TOLERANCE=15
|
||||
MAX_RETRIES=3
|
||||
|
||||
- NETPERF="/usr/local/netperf/netperf"
|
||||
- NETPERF="./netperf"
|
||||
+ NETPERF="%%PREFIX%%/netperf/netperf"
|
||||
|
||||
NPROC_LIST=""
|
||||
RR_SIZES=""
|
12
benchmarks/netperf/files/patch-arr_script
Normal file
12
benchmarks/netperf/files/patch-arr_script
Normal file
|
@ -0,0 +1,12 @@
|
|||
--- doc/examples/arr_script.orig Wed Sep 8 15:57:17 1999
|
||||
+++ doc/examples/arr_script Wed Sep 8 15:57:56 1999
|
||||
@@ -10,8 +10,7 @@
|
||||
TOLERANCE=15
|
||||
MAX_RETRIES=3
|
||||
|
||||
- NETPERF="/usr/local/netperf/netperf"
|
||||
- NETPERF="./netperf"
|
||||
+ NETPERF="%%PREFIX%%/bin/netperf"
|
||||
|
||||
NPROC_LIST=""
|
||||
RR_SIZES=""
|
|
@ -1,23 +0,0 @@
|
|||
--- makefile.orig Fri Feb 14 23:32:44 2003
|
||||
+++ makefile Sat Feb 22 08:21:09 2003
|
||||
@@ -15,8 +15,8 @@
|
||||
# for the rest of the world, it is probably better to put the binaries
|
||||
# in /usr/local/netperf or /opt/netperf
|
||||
#
|
||||
-#NETPERF_HOME = /usr/local/netperf
|
||||
-NETPERF_HOME = /opt/netperf
|
||||
+NETPERF_HOME = ${PREFIX}/netperf
|
||||
+#NETPERF_HOME = /opt/netperf
|
||||
|
||||
# The compiler on your system might be somewhere else, and/or have
|
||||
# a different name.
|
||||
@@ -95,7 +95,8 @@
|
||||
# the makefile for your platform
|
||||
|
||||
LOG_FILE=DEBUG_LOG_FILE="\"/tmp/netperf.debug\""
|
||||
-CFLAGS = -O -D$(LOG_FILE) -DNEED_MAKEFILE_EDIT
|
||||
+CFLAGS = %CFLAGS% -D$(LOG_FILE) -DDO_FIRST_BURST
|
||||
+CFLAGS+= -DDO_UNIX -DDO_1644 -DDO_IPV6
|
||||
|
||||
# Some platforms, and some options, require additional libraries.
|
||||
# you can add to the "LIBS =" line to accomplish this. if you find
|
|
@ -1,20 +0,0 @@
|
|||
--- netlib.c.orig Tue Sep 21 22:33:40 2004
|
||||
+++ netlib.c Fri Nov 5 12:57:14 2004
|
||||
@@ -1656,7 +1656,7 @@
|
||||
dump_request();
|
||||
|
||||
fprintf(where,
|
||||
- "\nsend_request: about to send %ld bytes from %p\n",
|
||||
+ "\nsend_request: about to send %d bytes from %p\n",
|
||||
sizeof(netperf_request),
|
||||
&netperf_request);
|
||||
fflush(where);
|
||||
@@ -3887,7 +3887,7 @@
|
||||
/* program, but that doesn't really seem worthwhile - raj 4/95 */
|
||||
if (debug > 1) {
|
||||
fprintf(where,
|
||||
- "Looper child %d is born, pid %d\n",
|
||||
+ "Looper child %d is born, pid %ld\n",
|
||||
child_index,
|
||||
getpid());
|
||||
fflush(where);
|
|
@ -1,22 +0,0 @@
|
|||
--- netlib.h.orig Tue Sep 21 22:33:40 2004
|
||||
+++ netlib.h Fri Nov 5 12:56:59 2004
|
||||
@@ -275,6 +275,11 @@
|
||||
(errno == WSAECONNRESET) ))
|
||||
#endif
|
||||
|
||||
+#if defined(__FreeBSD__) || defined(__NetBSD__)
|
||||
+#define HAVE_BCOPY
|
||||
+#define HAVE_BZERO
|
||||
+#endif /* __FreeBSD__ || __NetBSD__ */
|
||||
+
|
||||
#ifdef HAVE_SENDFILE
|
||||
|
||||
struct sendfile_ring_elt {
|
||||
@@ -411,6 +416,7 @@
|
||||
extern int dl_open(char devfile[], int ppa);
|
||||
extern char format_cpu_method(int method);
|
||||
extern unsigned int convert(char *string);
|
||||
+extern int delta_micro();
|
||||
|
||||
/* these are all for the confidence interval stuff */
|
||||
extern double confidence;
|
|
@ -1,10 +0,0 @@
|
|||
--- netperf.c.orig Tue Sep 21 22:33:40 2004
|
||||
+++ netperf.c Fri Nov 5 12:58:32 2004
|
||||
@@ -50,6 +50,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <strings.h>
|
||||
+#include <sys/types.h>
|
||||
|
||||
#ifdef WIN32
|
||||
#include <winsock2.h>
|
|
@ -1,47 +0,0 @@
|
|||
--- nettest_bsd.c.orig Tue Sep 21 22:33:40 2004
|
||||
+++ nettest_bsd.c Thu Nov 18 23:29:38 2004
|
||||
@@ -7649,7 +7649,9 @@
|
||||
else {
|
||||
tcp_tran_rr_request->test_length = test_trans * -1;
|
||||
}
|
||||
-
|
||||
+ tcp_tran_rr_request->port = remote_data_port;
|
||||
+ tcp_tran_rr_request->ipaddress = remote_data_ip;
|
||||
+
|
||||
if (debug > 1) {
|
||||
fprintf(where,"netperf: send_tcp_tran_rr: requesting TCP_TRR test\n");
|
||||
}
|
||||
@@ -7753,9 +7755,11 @@
|
||||
/* all depends on "reality of programming." keeping it this way is */
|
||||
/* a bit more conservative I imagine - raj 3/95 */
|
||||
send_socket = create_data_socket(AF_INET,
|
||||
- SOCK_STREAM);
|
||||
+ SOCK_STREAM,
|
||||
+ local_data_ip,
|
||||
+ local_data_port);
|
||||
|
||||
- if (send_socket == INAVLID_SOCKET) {
|
||||
+ if (send_socket == INVALID_SOCKET) {
|
||||
perror("netperf: send_tcp_tran_rr: tcp stream data socket");
|
||||
exit(1);
|
||||
}
|
||||
@@ -8219,7 +8223,9 @@
|
||||
loc_sndavoid = tcp_tran_rr_request->so_sndavoid;
|
||||
|
||||
s_listen = create_data_socket(AF_INET,
|
||||
- SOCK_STREAM);
|
||||
+ SOCK_STREAM,
|
||||
+ tcp_tran_rr_request->ipaddress,
|
||||
+ tcp_tran_rr_request->port);
|
||||
|
||||
if (s_listen == INVALID_SOCKET) {
|
||||
netperf_response.content.serv_errno = errno;
|
||||
@@ -8438,7 +8444,7 @@
|
||||
send_message_ptr,
|
||||
tcp_tran_rr_request->response_size,
|
||||
MSG_EOF,
|
||||
- &peeraddr_in,
|
||||
+ (struct sockaddr *)&peeraddr_in,
|
||||
sizeof(struct sockaddr_in))) == SOCKET_ERROR) {
|
||||
if (SOCKET_EINTR(bytes_sent)) {
|
||||
/* the test timer has popped */
|
|
@ -1,11 +0,0 @@
|
|||
--- nettest_ipv6.c.orig Tue Sep 21 22:33:40 2004
|
||||
+++ nettest_ipv6.c Thu Nov 18 23:32:10 2004
|
||||
@@ -6371,7 +6371,7 @@
|
||||
send_message_ptr,
|
||||
tcpipv6_tran_rr_request->response_size,
|
||||
MSG_EOF,
|
||||
- &peeraddr_in,
|
||||
+ (struct sockaddr *)&peeraddr_in,
|
||||
sizeof(struct sockaddr_in6))) == INVALID_SOCKET) {
|
||||
if (SOCKET_EINTR(bytes_sent)) {
|
||||
/* the test timer has popped */
|
|
@ -1,13 +0,0 @@
|
|||
--- nettest_unix.c.orig Thu Nov 18 23:24:22 2004
|
||||
+++ nettest_unix.c Thu Nov 18 23:26:24 2004
|
||||
@@ -52,7 +52,9 @@
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <sys/time.h>
|
||||
-#if ! defined(__bsdi__) && ! defined(_APPLE_)
|
||||
+#if __FreeBSD__
|
||||
+#include <stdlib.h>
|
||||
+#elif ! defined(__bsdi__) && ! defined(_APPLE_)
|
||||
#include <malloc.h>
|
||||
#else
|
||||
#include <sys/malloc.h>
|
11
benchmarks/netperf/files/patch-packet_byte_script
Normal file
11
benchmarks/netperf/files/patch-packet_byte_script
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- doc/examples/packet_byte_script.bak Fri Oct 21 07:58:11 2005
|
||||
+++ doc/examples/packet_byte_script Thu Nov 9 13:20:06 2006
|
||||
@@ -22,7 +22,7 @@
|
||||
fi
|
||||
|
||||
# where is netperf
|
||||
-NETPERF_CMD=${NETPERF_CMD:=/opt/netperf/netperf}
|
||||
+NETPERF_CMD=${NETPERF_CMD:=%%PREFIX%%/bin/netperf}
|
||||
|
||||
# at what port will netserver be waiting? If you decide to run
|
||||
# netserver at a differnet port than the default of 12865, then set
|
11
benchmarks/netperf/files/patch-sctp_stream_script
Normal file
11
benchmarks/netperf/files/patch-sctp_stream_script
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- doc/examples/sctp_stream_script.bak Fri Oct 21 07:58:11 2005
|
||||
+++ doc/examples/sctp_stream_script Thu Nov 9 13:20:35 2006
|
||||
@@ -24,7 +24,7 @@
|
||||
# where the programs are
|
||||
#NETHOME=/usr/local/netperf
|
||||
#NETHOME="/opt/netperf"
|
||||
-NETHOME=.
|
||||
+NETHOME="%%PREFIX%%/bin"
|
||||
|
||||
# at what port will netserver be waiting? If you decide to run
|
||||
# netserver at a differnet port than the default of 12865, then set
|
|
@ -1,11 +1,11 @@
|
|||
--- snapshot_script 2 Aug 1999 12:01:24 -0000 1.1.1.1
|
||||
+++ snapshot_script 21 Jan 2003 00:45:21 -0000
|
||||
--- doc/examples/snapshot_script 2 Aug 1999 12:01:24 -0000 1.1.1.1
|
||||
+++ doc/examples/snapshot_script 21 Jan 2003 00:45:21 -0000
|
||||
@@ -37,7 +37,7 @@
|
||||
#
|
||||
# where is netperf installed, there are a few possible places:
|
||||
|
||||
-NETPERF_CMD=${NETPERF_CMD:=/opt/netperf/netperf}
|
||||
+NETPERF_CMD=${NETPERF_CMD:=%%PREFIX%%/netperf/netperf}
|
||||
+NETPERF_CMD=${NETPERF_CMD:=%%PREFIX%%/bin/netperf}
|
||||
|
||||
|
||||
# there should be no more than two parms passed
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
--- tcp_range_script 2 Aug 1999 12:01:24 -0000 1.1.1.1
|
||||
+++ tcp_range_script 21 Jan 2003 00:45:21 -0000
|
||||
--- doc/examples/tcp_range_script 2 Aug 1999 12:01:24 -0000 1.1.1.1
|
||||
+++ doc/examples/tcp_range_script 21 Jan 2003 00:45:21 -0000
|
||||
@@ -43,7 +43,7 @@
|
||||
# where is netperf, and are there any "constant" options such as
|
||||
# the netserver port number
|
||||
#NETHOME=/usr/etc/net_perf
|
||||
-NETHOME="."
|
||||
+NETHOME="%%PREFIX%%/netperf"
|
||||
+NETHOME="%%PREFIX%%/bin"
|
||||
NETPERF=$NETHOME/netperf $PORT
|
||||
|
||||
# How accurate we want the estimate of performance:
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
--- tcp_rr_script 2 Aug 1999 12:01:24 -0000 1.1.1.1
|
||||
+++ tcp_rr_script 21 Jan 2003 00:45:21 -0000
|
||||
--- doc/examples/tcp_rr_script 2 Aug 1999 12:01:24 -0000 1.1.1.1
|
||||
+++ doc/examples/tcp_rr_script 21 Jan 2003 00:45:21 -0000
|
||||
@@ -23,9 +23,9 @@
|
||||
fi
|
||||
|
||||
# where the programs are
|
||||
-#NETHOME=/usr/local/netperf
|
||||
+NETHOME=%%PREFIX%%/netperf
|
||||
#NETHOME=/usr/local/netperf
|
||||
#NETHOME="/opt/netperf"
|
||||
-NETHOME=.
|
||||
+#NETHOME=.
|
||||
+NETHOME=%%PREFIX%%/bin
|
||||
|
||||
# at what port will netserver be waiting? If you decide to run
|
||||
# netserver at a differnet port than the default of 12865, then set
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
--- tcp_stream_script 2 Aug 1999 12:01:23 -0000 1.1.1.1
|
||||
+++ tcp_stream_script 21 Jan 2003 00:45:21 -0000
|
||||
--- doc/examples/tcp_stream_script 2 Aug 1999 12:01:23 -0000 1.1.1.1
|
||||
+++ doc/examples/tcp_stream_script 21 Jan 2003 00:45:21 -0000
|
||||
@@ -22,9 +22,9 @@
|
||||
fi
|
||||
|
||||
# where the programs are
|
||||
-#NETHOME=/usr/local/netperf
|
||||
+NETHOME=%%PREFIX%%/netperf
|
||||
#NETHOME=/usr/local/netperf
|
||||
#NETHOME="/opt/netperf"
|
||||
-NETHOME=.
|
||||
+#NETHOME=.
|
||||
+NETHOME=%%PREFIX%%/bin
|
||||
|
||||
# at what port will netserver be waiting? If you decide to run
|
||||
# netserver at a differnet port than the default of 12865, then set
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
--- udp_rr_script 2 Aug 1999 12:01:24 -0000 1.1.1.1
|
||||
+++ udp_rr_script 21 Jan 2003 00:45:21 -0000
|
||||
--- doc/examples/udp_rr_script 2 Aug 1999 12:01:24 -0000 1.1.1.1
|
||||
+++ doc/examples/udp_rr_script 21 Jan 2003 00:45:21 -0000
|
||||
@@ -20,9 +20,9 @@
|
||||
|
||||
# where the programs are
|
||||
|
||||
-#NETHOME=/usr/local/netperf
|
||||
+NETHOME=%%PREFIX%%/netperf
|
||||
#NETHOME=/usr/local/netperf
|
||||
#NETHOME="/opt/netperf"
|
||||
-NETHOME="."
|
||||
+#NETHOME="."
|
||||
+NETHOME=%%PREFIX%%/bin
|
||||
|
||||
# at what port will netserver be waiting? If you decide to run
|
||||
# netserver at a differnet port than the default of 12865, then set
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
--- udp_stream_script 2 Aug 1999 12:01:23 -0000 1.1.1.1
|
||||
+++ udp_stream_script 21 Jan 2003 00:45:21 -0000
|
||||
--- doc/examples/udp_stream_script 2 Aug 1999 12:01:23 -0000 1.1.1.1
|
||||
+++ doc/examples/udp_stream_script 21 Jan 2003 00:45:21 -0000
|
||||
@@ -17,9 +17,9 @@
|
||||
|
||||
# where the programs are
|
||||
|
||||
-#NETHOME=/usr/local/netperf
|
||||
+NETHOME=%%PREFIX%%/netperf
|
||||
#NETHOME=/usr/local/netperf
|
||||
#NETHOME="/opt/netperf"
|
||||
-NETHOME="."
|
||||
+#NETHOME="."
|
||||
+NETHOME=%%PREFIX%%/bin
|
||||
|
||||
# at what port will netserver be waiting? If you decide to run
|
||||
# netserver at a differnet port than the default of 12865, then set
|
||||
|
|
|
@ -5,22 +5,15 @@ Testing is done using a pair of programs: `netserver' (the server) and
|
|||
|
||||
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/recieve 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.
|
||||
|
||||
This port of netperf has been configured to support:
|
||||
|
||||
TCP and UDP via BSD sockets
|
||||
Unix domain sockets
|
||||
|
||||
WWW: http://www.netperf.org/
|
||||
|
||||
- Koshy
|
||||
|
|
17
benchmarks/netperf/scripts/configure
vendored
17
benchmarks/netperf/scripts/configure
vendored
|
@ -1,17 +0,0 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
#
|
||||
# If this is FreeBSD 2.2 or later, this will work. Older FreeBSD versions
|
||||
# will set CFLAGS to "". Life's a bitch.
|
||||
#
|
||||
CFLAGS=`make -V CFLAGS echo` || echo "*** Ignore this error"
|
||||
|
||||
if [ X"$CFLAGS" = X ] ; then
|
||||
CFLAGS="-O2 -fno-strength-reduce"
|
||||
fi
|
||||
|
||||
cd $WRKSRC
|
||||
echo "Setting CFLAGS to \"$CFLAGS\""
|
||||
sed -e "s/%CFLAGS%/${CFLAGS}/" makefile >makefile.new
|
||||
mv -f makefile makefile.orig2
|
||||
mv -f makefile.new makefile
|
Loading…
Reference in a new issue