In Up/Down direction is determined by comparing GUID values when
destination to root nodes is equal. This comparison was done in network
byte order - I found this as very confused when tried to use this
feature. Another bad things with it is that UP/DOWN algorithm in OpenSM
may work differently on big- and little- endian machines. Fixing this.

Signed-off-by: Sasha Khapyorsky <[EMAIL PROTECTED]>
---
 opensm/opensm/osm_ucast_updn.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/opensm/opensm/osm_ucast_updn.c b/opensm/opensm/osm_ucast_updn.c
index c839f63..95bd946 100644
--- a/opensm/opensm/osm_ucast_updn.c
+++ b/opensm/opensm/osm_ucast_updn.c
@@ -180,7 +180,8 @@ __updn_bfs_by_node(IN osm_log_t * p_log,
                        rem_u = p_remote_sw->priv;
                        /* Decide which direction to mark it (UP/DOWN) */
                        next_dir = __updn_get_dir(u->rank, rem_u->rank,
-                                                 current_guid, remote_guid);
+                                                 cl_ntoh64(current_guid),
+                                                 cl_ntoh64(remote_guid));
 
                        /* Check if this is a legal step : the only illegal 
step is going
                           from DOWN to UP */
-- 
1.5.4.1.122.gaa8d

_______________________________________________
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

Reply via email to