We have to add the module value to the index before actually doing the module,
or we get a value of -1 which makes OpenSM segfaults
Signed-off-by: Nicolas Morey-Chaisemartin
<[email protected]>
---
I missed this one in my previous patch. Sorry for that
opensm/opensm/osm_ucast_ftree.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/opensm/opensm/osm_ucast_ftree.c b/opensm/opensm/osm_ucast_ftree.c
index 4e65c87..c8f5f08 100644
--- a/opensm/opensm/osm_ucast_ftree.c
+++ b/opensm/opensm/osm_ucast_ftree.c
@@ -1921,7 +1921,8 @@ __osm_ftree_fabric_route_upgoing_by_going_down(IN ftree_fabric_t * p_ftree,
return FALSE;
/* foreach down-going port group (in indexing order) */
- i = p_sw->down_port_groups_idx;
+ i = (p_sw->down_port_groups_idx +
+ p_sw->down_port_groups_num) % p_sw->down_port_groups_num;
for (k = 0; k < p_sw->down_port_groups_num; k++) {
p_group = p_sw->down_port_groups[i];
_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general
To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general