[ofa-general] [PATCH] uDAPL v2: dapltest, adjust next port number for number of threads to avoid duplication

Davis, Arlin R arlin.r.davis at intel.com
Sun Apr 19 01:06:05 PDT 2009


To avoid duplicating port numbers between different tests, the next port
number to use must increment based on the number of endpoints per thread *
the number of threads.

Signed-off-by: Sean Hefty <sean.hefty at intel.com>
---
 test/dapltest/test/dapl_server.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/test/dapltest/test/dapl_server.c b/test/dapltest/test/dapl_server.c
index d589e7b..4d386fe 100644
--- a/test/dapltest/test/dapl_server.c
+++ b/test/dapltest/test/dapl_server.c
@@ -480,6 +480,9 @@ DT_cs_Server (Params_t * params_ptr)
 	    case TRANSACTION_TEST:
 	    {
 		/* create a thread to handle this pt_ptr; */
+		ps_ptr->NextPortNumber +=
+			(pt_ptr->Params.u.Transaction_Cmd.eps_per_thread - 1) *
+			pt_ptr->Client_Info.total_threads;
 		DT_Tdep_PT_Debug (1,(phead,"%s: Creating Transaction Test Thread\n", module));
 		pt_ptr->thread = DT_Thread_Create (pt_ptr,
 					   DT_Transaction_Test_Server,
-- 
1.5.2.5




More information about the general mailing list