[ofa-general] [PATCH] uDAPL v2: dapltest: reset server listen ports to avoid collisions during long runs
Davis, Arlin R
arlin.r.davis at intel.com
Sun Apr 19 01:07:06 PDT 2009
If server is running continuously the port number increments
from base without reseting between tests. This will
eventually cause collisions in port space.
Signed-off-by: Arlin Davis <ardavis at ichips.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 4d386fe..fc6c8af 100644
--- a/test/dapltest/test/dapl_server.c
+++ b/test/dapltest/test/dapl_server.c
@@ -465,6 +465,9 @@ DT_cs_Server (Params_t * params_ptr)
DT_Tdep_PT_Debug (1,(phead,"%s: Send Server_Info\n", module));
pt_ptr->Server_Info.dapltest_version = DAPLTEST_VERSION;
pt_ptr->Server_Info.is_little_endian = DT_local_is_little_endian;
+ /* reset port, don't eat up port space on long runs */
+ if (ps_ptr->NextPortNumber >= SERVER_PORT_NUMBER + 1000)
+ ps_ptr->NextPortNumber = SERVER_PORT_NUMBER + 1;
pt_ptr->Server_Info.first_port_number = ps_ptr->NextPortNumber;
ps_ptr->NextPortNumber += pt_ptr->Client_Info.total_threads;
--
1.5.2.5
More information about the general
mailing list