Hi Sasha,

osm_get_port_by_guid function takes guid in network order.
Fixing function header and one relevant log message.

This patch is also relevant for ofed_1_3, but it's not
really a bug, so it's your call.

Signed-off-by: Yevgeny Kliteynik <[EMAIL PROTECTED]>
---
 opensm/include/opensm/osm_subnet.h     |    4 ++--
 opensm/opensm/osm_sa_mcmember_record.c |    3 ++-
 opensm/opensm/osm_subnet.c             |    2 +-
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/opensm/include/opensm/osm_subnet.h 
b/opensm/include/opensm/osm_subnet.h
index 967c067..1c8b6d6 100644
--- a/opensm/include/opensm/osm_subnet.h
+++ b/opensm/include/opensm/osm_subnet.h
@@ -965,14 +965,14 @@ struct _osm_node *osm_get_node_by_guid(IN osm_subn_t 
const *p_subn,
 * SYNOPSIS
 */
 struct _osm_port *osm_get_port_by_guid(IN osm_subn_t const *p_subn,
-                                      IN uint64_t guid);
+                                      IN ib_net64_t guid);
 /*
 * PARAMETERS
 *      p_subn
 *              [in] Pointer to an osm_subn_t object
 *
 *      guid
-*              [in] The port guid in host order
+*              [in] The port guid in network order
 *
 * RETURN VALUES
 *      The port structure pointer if found. NULL otherwise.
diff --git a/opensm/opensm/osm_sa_mcmember_record.c 
b/opensm/opensm/osm_sa_mcmember_record.c
index 63202e8..d544c0e 100644
--- a/opensm/opensm/osm_sa_mcmember_record.c
+++ b/opensm/opensm/osm_sa_mcmember_record.c
@@ -1376,7 +1376,8 @@ __osm_mcmr_rcv_join_mgrp(IN osm_sa_t * sa,
                CL_PLOCK_RELEASE(sa->p_lock);

                OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
-                       "Unknown port GUID 0x%016" PRIx64 "\n", portguid);
+                       "Unknown port GUID 0x%016" PRIx64 "\n",
+                       cl_ntoh64(portguid));
                sa_status = IB_SA_MAD_STATUS_REQ_INVALID;
                osm_sa_send_error(sa, p_madw, sa_status);
                goto Exit;
diff --git a/opensm/opensm/osm_subnet.c b/opensm/opensm/osm_subnet.c
index 03fd53a..903825b 100644
--- a/opensm/opensm/osm_subnet.c
+++ b/opensm/opensm/osm_subnet.c
@@ -363,7 +363,7 @@ osm_node_t *osm_get_node_by_guid(IN osm_subn_t const 
*p_subn, IN uint64_t guid)

 /**********************************************************************
  **********************************************************************/
-osm_port_t *osm_get_port_by_guid(IN osm_subn_t const *p_subn, IN uint64_t guid)
+osm_port_t *osm_get_port_by_guid(IN osm_subn_t const *p_subn, IN ib_net64_t 
guid)
 {
        osm_port_t *p_port;

-- 
1.5.1.4

_______________________________________________
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