diff mbox

ibsim: Set issm flag on connect when SIM_SET_ISSM set

Message ID 1371839285.19017.136.camel@auk59.llnl.gov (mailing list archive)
State Superseded
Delegated to: Hal Rosenstock
Headers show

Commit Message

Al Chu June 21, 2013, 6:28 p.m. UTC
When the SIM_SET_ISSM environment variable is set, ibsim did not
set the issm bit until after an ibsim connection was complete.  This
allowed multiple SMs to actively run as the SM on the same port.

Signed-off-by: Albert L. Chu <chu11@llnl.gov>
---
 umad2sim/sim_client.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
diff mbox

Patch

diff --git a/umad2sim/sim_client.c b/umad2sim/sim_client.c
index eb42a7c..5a04be5 100644
--- a/umad2sim/sim_client.c
+++ b/umad2sim/sim_client.c
@@ -178,7 +178,10 @@  static int sim_connect(struct sim_client *sc, int id, int qp, char *nodeid)
 	struct sim_client_info info = { 0 };
 
 	info.id = id;
-	info.issm = 0;
+	if (getenv("SIM_SET_ISSM"))
+		info.issm = 1;
+	else
+		info.issm = 0;
 	info.qp = qp;
 
 	if (nodeid)