diff mbox

[10/10] OpenSM: dfsssp - moved paths from one to another VL might be counted multiple times

Message ID 1358872924-17101-1-git-send-email-domke.j.aa@m.titech.ac.jp (mailing list archive)
State Accepted
Delegated to: Alex Netes
Headers show

Commit Message

Jens Domke Jan. 22, 2013, 4:42 p.m. UTC
the counter for paths, which have been moved to a different VL,
was incorrect; the counter should not include paths moved in a
previous step

Signed-off-by: Jens Domke <domke.j.aa@m.titech.ac.jp>
---
 opensm/osm_ucast_dfsssp.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
diff mbox

Patch

diff --git a/opensm/osm_ucast_dfsssp.c b/opensm/osm_ucast_dfsssp.c
index c8a1007..a53e783 100644
--- a/opensm/osm_ucast_dfsssp.c
+++ b/opensm/osm_ucast_dfsssp.c
@@ -1813,8 +1813,14 @@  static int dfsssp_remove_deadlocks(dfsssp_context_t * dfsssp_ctx)
 					    (uint8_t)
 					    vltable_get_vl(srcdest2vl_table,
 							   cl_hton16(slid),
-							   cl_hton16(dlid)))
+							   cl_hton16(dlid))) {
+						/* this path has been moved
+						   before -> don't count
+						 */
+						paths_per_vl[test_vl]++;
+						paths_per_vl[test_vl + 1]--;
 						continue;
+					}
 
 					src_port =
 					    osm_get_port_by_lid(p_mgr->p_subn,