Skip to contentSkip to conversation

iperf: Upgrade to version 2.0.5

PATCH New Lauren Post 1 participant 1 message Mar 11, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iperf: Upgrade to version 2.0.5

This version provides better ethernet performance

Patch is required for man page portion of build

---
 .../iperf/iperf-2.0.4/000-Iperf_Fix-CPU-Usage.diff |  164 ------------------
 .../001-cast-to-max_size_t-instead-of-int.patch    |   14 --
 .../003-fix-hyphen-used-as-minus-sign.patch        |  178 --------------------
 .../iperf/iperf-2.0.4/004-svn-r43-ro.patch         |  117 -------------
 .../iperf-2.0.4/005-iperf-die-on-bind-fail.patch   |   15 --
 .../006-iperf-die-on-connect-fail.patch            |   15 --
 .../iperf-2.0.4/007-iperf-reporter-deadlock.patch  |   68 --------
 .../iperf/iperf-2.0.4/008-numofreport.patch        |   15 --
 .../iperf/iperf-2.0.4/009-delayloop.patch          |   22 ---
 .../iperf/iperf-2.0.5/iperf-2.0.5_ManPage.patch    |    8 +
 meta-oe/recipes-benchmark/iperf/iperf_2.0.4.bb     |   46 -----
 meta-oe/recipes-benchmark/iperf/iperf_2.0.5.bb     |   18 ++
 12 files changed, 26 insertions(+), 654 deletions(-)
 delete mode 100644 meta-oe/recipes-benchmark/iperf/iperf-2.0.4/000-Iperf_Fix-CPU-Usage.diff
 delete mode 100644 meta-oe/recipes-benchmark/iperf/iperf-2.0.4/001-cast-to-max_size_t-instead-of-int.patch
 delete mode 100644 meta-oe/recipes-benchmark/iperf/iperf-2.0.4/003-fix-hyphen-used-as-minus-sign.patch
 delete mode 100644 meta-oe/recipes-benchmark/iperf/iperf-2.0.4/004-svn-r43-ro.patch
 delete mode 100644 meta-oe/recipes-benchmark/iperf/iperf-2.0.4/005-iperf-die-on-bind-fail.patch
 delete mode 100644 meta-oe/recipes-benchmark/iperf/iperf-2.0.4/006-iperf-die-on-connect-fail.patch
 delete mode 100644 meta-oe/recipes-benchmark/iperf/iperf-2.0.4/007-iperf-reporter-deadlock.patch
 delete mode 100644 meta-oe/recipes-benchmark/iperf/iperf-2.0.4/008-numofreport.patch
 delete mode 100644 meta-oe/recipes-benchmark/iperf/iperf-2.0.4/009-delayloop.patch
 create mode 100755 meta-oe/recipes-benchmark/iperf/iperf-2.0.5/iperf-2.0.5_ManPage.patch
 delete mode 100644 meta-oe/recipes-benchmark/iperf/iperf_2.0.4.bb
 create mode 100644 meta-oe/recipes-benchmark/iperf/iperf_2.0.5.bb
meta-oe/recipes-benchmark/iperf/iperf-2.0.4/000-Iperf_Fix-CPU-Usage.diff deleted +0 -164
deleted file mode 100644
index 7e89953..0000000
@@ -1,164 +0,0 @@
-[Thread]: Replace thread_rest() with condition variables
-
-This applies the patch by Ingo Molnar from
-
-   http://marc.info/?l=linux-kernel&m=119088670113210&w=2
-
-by reverting previous changes that coincided with changes made by this
-patch. Other than that, the patch is the original from the above URL.
-
-Gerrit
----
- compat/Thread.c |    6 ------
- src/Reporter.c  |   37 +++++++++----------------------------
- src/main.cpp    |    2 ++
- 3 files changed, 11 insertions(+), 34 deletions(-)
-
-rover: changed two remaining thread_rest.
-
---- a/compat/Thread.c
-+++ b/compat/Thread.c
-@@ -405,12 +405,6 @@ int thread_numuserthreads( void ) {
- void thread_rest ( void ) {
- #if defined( HAVE_THREAD )
- #if defined( HAVE_POSIX_THREAD )
--#if defined( _POSIX_PRIORITY_SCHEDULING )
--    sched_yield();
--#else
--    usleep( 0 );
--#endif
--
- #else // Win32
-     SwitchToThread( );
- #endif
---- a/src/Reporter.c
-+++ b/src/Reporter.c
-@@ -110,9 +110,8 @@
- 
- char buffer[64]; // Buffer for printing
- ReportHeader *ReportRoot = NULL;
--int threadWait = 0;
--int threadSleeping = 0;
- extern Condition ReportCond;
-+extern Condition ReportDoneCond;
- int reporter_process_report ( ReportHeader *report );
- void process_report ( ReportHeader *report );
- int reporter_handle_packet( ReportHeader *report );
-@@ -340,7 +339,7 @@
-             // item
-             while ( index == 0 ) {
-                 Condition_Signal( &ReportCond );
--                thread_rest();
-+                Condition_Wait( &ReportDoneCond );
-                 index = agent->reporterindex;
-             }
-             agent->agentindex = 0;
-@@ -348,11 +347,9 @@
-         // Need to make sure that reporter is not about to be "lapped"
-         while ( index - 1 == agent->agentindex ) {
-             Condition_Signal( &ReportCond );
--            thread_rest();
-+            Condition_Wait( &ReportDoneCond );
-             index = agent->reporterindex;
-         }
--	if (threadSleeping)
--           Condition_Signal( &ReportCond );
- 
-         // Put the information there
-         memcpy( agent->data + agent->agentindex, packet, sizeof(ReportStruct) );
-@@ -382,9 +379,6 @@
-         packet->packetLen = 0;
-         ReportPacket( agent, packet );
-         packet->packetID = agent->report.cntDatagrams;
--	if (threadSleeping)
--           Condition_Signal( &ReportCond );
--
-     }
- }
- 
-@@ -396,11 +390,8 @@
- void EndReport( ReportHeader *agent ) {
-     if ( agent != NULL ) {
-         int index = agent->reporterindex;
--	if (threadSleeping)
--           Condition_Signal( &ReportCond );
--
-         while ( index != -1 ) {
--            thread_rest();
-+            Condition_Wait( &ReportDoneCond );
-             index = agent->reporterindex;
-         }
-         agent->agentindex = -1;
-@@ -421,7 +412,7 @@
- Transfer_Info *GetReport( ReportHeader *agent ) {
-     int index = agent->reporterindex;
-     while ( index != -1 ) {
--        thread_rest();
-+        Condition_Wait( &ReportDoneCond );
-         index = agent->reporterindex;
-     }
-     return &agent->report.info;
-@@ -467,10 +458,6 @@
-              * Update the ReportRoot to include this report.
-              */
-             Condition_Lock( ReportCond );
--	    if ( isUDP(agent) )
--	      threadWait = 0;
--	    else
--	      threadWait = 1;
-             reporthdr->next = ReportRoot;
-             ReportRoot = reporthdr;
-             Condition_Signal( &ReportCond );
-@@ -567,6 +554,7 @@
-         }
-         Condition_Unlock ( ReportCond );
- 
-+again:
-         if ( ReportRoot != NULL ) {
-             ReportHeader *temp = ReportRoot;
-             //Condition_Unlock ( ReportCond );
-@@ -589,19 +577,12 @@
-                 // finished with report so free it
-                 free( temp );
-                 Condition_Unlock ( ReportCond );
-+                Condition_Signal( &ReportDoneCond );
-+                if (ReportRoot)
-+                    goto again;
-             }
--            // yield control of CPU is another thread is waiting
--	    // sleep on a condition variable, as it is much cheaper
--	    // on most platforms than issuing schedyield or usleep
--	    // syscalls
--	    Condition_Lock ( ReportCond );
--	    if ( threadWait && ReportRoot != NULL) {
--	      threadSleeping = 1;
--	      Condition_TimedWait (& ReportCond, 1 );
--	      threadSleeping = 0;
--	    }
--	    Condition_Unlock ( ReportCond );
--	    
-+            Condition_Signal( &ReportDoneCond );
-+            usleep(10000);
-         } else {
-             //Condition_Unlock ( ReportCond );
-         }
---- a/src/main.cpp
-+++ b/src/main.cpp
-@@ -96,6 +96,7 @@ extern "C" {
-     // records being accessed in a report and also to
-     // serialize modification of the report list
-     Condition ReportCond;
-+    Condition ReportDoneCond;
- }
- 
- // global variables only accessed within this file
-@@ -142,6 +143,7 @@ int main( int argc, char **argv ) {
- 
-     // Initialize global mutexes and conditions
-     Condition_Initialize ( &ReportCond );
-+    Condition_Initialize ( &ReportDoneCond );
-     Mutex_Initialize( &groupCond );
-     Mutex_Initialize( &clients_mutex );
- 
-
- 	  	 
meta-oe/recipes-benchmark/iperf/iperf-2.0.4/001-cast-to-max_size_t-instead-of-int.patch deleted +0 -14
deleted file mode 100644
index b6728d4..0000000
@@ -1,14 +0,0 @@
-Import Debian patches and fix a lot of real bugs. 
-
-Upstream-Status: Inappropriate [not author. Above message was get from oe.dev c10c33f86903c93611023197a7f812459c2dfe2d]
---- iperf-2.0.4.orig/src/Settings.cpp.orig	2008-04-08 04:37:54.000000000 +0200
-+++ iperf-2.0.4/src/Settings.cpp	2008-05-07 17:41:03.923942801 +0200
-@@ -458,7 +458,7 @@
-         case 't': // seconds to write for
-             // time mode (instead of amount mode)
-             setModeTime( mExtSettings );
--            mExtSettings->mAmount = (int) (atof( optarg ) * 100.0);
-+            mExtSettings->mAmount = (max_size_t) (atof( optarg ) * 100.0);
-             break;
- 
-         case 'u': // UDP instead of TCP
meta-oe/recipes-benchmark/iperf/iperf-2.0.4/003-fix-hyphen-used-as-minus-sign.patch deleted +0 -178

178 lines not on this page · raw message

meta-oe/recipes-benchmark/iperf/iperf-2.0.4/004-svn-r43-ro.patch deleted +0 -117

117 lines not on this page · raw message

meta-oe/recipes-benchmark/iperf/iperf-2.0.4/005-iperf-die-on-bind-fail.patch deleted +0 -15
deleted file mode 100644
index ec13d6b..0000000
@@ -1,15 +0,0 @@
-Import Debian patches and fix a lot of real bugs. 
-
-Upstream-Status: Inappropriate [not author. Above message was get from oe.dev c10c33f86903c93611023197a7f812459c2dfe2d]
-
---- iperf-2.0.4/src/Listener.cpp	2009-02-23 16:20:31.000000000 -0500
-+++ iperf-2.0.4-fixed/src/Listener.cpp	2009-02-23 16:20:40.000000000 -0500
-@@ -333,7 +333,7 @@
- #endif
-     {
-         rc = bind( mSettings->mSock, (sockaddr*) &mSettings->local, mSettings->size_local );
--        WARN_errno( rc == SOCKET_ERROR, "bind" );
-+        FAIL_errno( rc == SOCKET_ERROR, "bind", mSettings );
-     }
-     // listen for connections (TCP only).
-     // default backlog traditionally 5
meta-oe/recipes-benchmark/iperf/iperf-2.0.4/006-iperf-die-on-connect-fail.patch deleted +0 -15
deleted file mode 100644
index 9e17e6d..0000000
@@ -1,15 +0,0 @@
-Import Debian patches and fix a lot of real bugs. 
-
-Upstream-Status: Inappropriate [not author. Above message was get from oe.dev c10c33f86903c93611023197a7f812459c2dfe2d]
-
---- iperf-2.0.4/src/Client.cpp	2008-04-07 22:37:54.000000000 -0400
-+++ iperf-2.0.4-fixed/src/Client.cpp	2009-03-03 12:30:02.000000000 -0500
-@@ -403,7 +403,7 @@
-     // connect socket
-     rc = connect( mSettings->mSock, (sockaddr*) &mSettings->peer, 
-                   SockAddr_get_sizeof_sockaddr( &mSettings->peer ));
--    WARN_errno( rc == SOCKET_ERROR, "connect" );
-+    FAIL_errno( rc == SOCKET_ERROR, "connect", mSettings );
- 
-     getsockname( mSettings->mSock, (sockaddr*) &mSettings->local, 
-                  &mSettings->size_local );
meta-oe/recipes-benchmark/iperf/iperf-2.0.4/007-iperf-reporter-deadlock.patch deleted +0 -68

68 lines not on this page · raw message

meta-oe/recipes-benchmark/iperf/iperf-2.0.4/008-numofreport.patch deleted +0 -15
deleted file mode 100644
index c5d85b1..0000000
@@ -1,15 +0,0 @@
-by Kirby Zhou < kirbyzhou \x40 sohu-rd.com >
-increase the queue length to avoid thread racing
-
-Upstream-Status: Inappropriate [not author]
---- iperf-2.0.4.orig/include/Reporter.h	2008-04-08 04:37:54.000000000 +0200
-+++ iperf-2.0.4/include/Reporter.h	2009-07-06 11:53:58.700541554 +0200
-@@ -61,7 +61,7 @@ struct server_hdr;
- 
- #include "Settings.hpp"
- 
--#define NUM_REPORT_STRUCTS 700
-+#define NUM_REPORT_STRUCTS 5700
- #define NUM_MULTI_SLOTS    5
- 
- #ifdef __cplusplus
meta-oe/recipes-benchmark/iperf/iperf-2.0.4/009-delayloop.patch deleted +0 -22
deleted file mode 100644
index a2a0797..0000000
@@ -1,22 +0,0 @@
-by Kirby Zhou < kirbyzhou \x40 sohu-rd.com >
-using sched_yield to schedule other threads, so multiple iperf can run simultaneously
-using usleep with delay-loop between 2 package is long than 1.25ms.
-
-Upstream-Status: Inappropriate [not author]
-
---- iperf-2.0.4-4/compat/delay.cpp	2009-07-06 12:02:24.166276642 +0200
-+++ iperf-2.0.4/compat/delay.cpp	2009-07-06 12:01:33.858384005 +0200
-@@ -69,6 +69,13 @@ void delay_loop( unsigned long usec ) {
- 
-     Timestamp now;
-     while ( now.before( end ) ) {
-+       long diff = end.subUsec(now);
-+       if (diff >= 1250) {
-+               usleep(0);
-+       }
-+       if (diff >= 2) {
-+               sched_yield();
-+       }
-         now.setnow();
-     }
- }
meta-oe/recipes-benchmark/iperf/iperf-2.0.5/iperf-2.0.5_ManPage.patch new file +8 -0
new file mode 100755
index 0000000..12e8f46
@@ -0,0 +1,8 @@
+diff --git iperf-2.0.5/man/Makefile.am iperf-2.0.5/man/Makefile.am
+ index ed97bc6..728873f 100644
+--- iperf-2.0.5/man/Makefile.am
++++ iperf-2.0.5/man/Makefile.am
+@@ -1,2 +1 @@
+-man_MANS = iperf.1
+-dist_man_MANS = $(man_MANS)
++dist_man_MANS = iperf.1
meta-oe/recipes-benchmark/iperf/iperf_2.0.4.bb deleted +0 -46

46 lines not on this page · raw message

meta-oe/recipes-benchmark/iperf/iperf_2.0.5.bb new file +18 -0
new file mode 100644
index 0000000..a207716
@@ -0,0 +1,18 @@
+DESCRIPTION = "Iperf is a tool to measure maximum TCP bandwidth, allowing the tuning of various parameters and UDP characteristics"
+HOMEPAGE = "http://dast.nlanr.net/Projects/Iperf/"
+SECTION = "console/network"
+LICENSE = "BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://COPYING;md5=e8478eae9f479e39bc34975193360298"
+
+SRC_URI = " ${SOURCEFORGE_MIRROR}/iperf/${PN}-${PV}.tar.gz \
+            file://iperf-2.0.5_ManPage.patch \
+          "
+
+SRC_URI[md5sum] = "44b5536b67719f4250faed632a3cd016"
+SRC_URI[sha256sum] = "636b4eff0431cea80667ea85a67ce4c68698760a9837e1e9d13096d20362265b"
+
+S = "${WORKDIR}/${PN}-${PV}"
+
+inherit autotools pkgconfig
+
+EXTRA_OECONF = "--exec-prefix=${STAGING_DIR_HOST}${layout_exec_prefix}"
Signature · 1 line
1.7.9.5