[ofa-general] Issues with osm_state_mgr.c:__osm_state_mgr_get_remote_port_info()

Sasha Khapyorsky sashak at voltaire.com
Wed Jun 25 07:23:05 PDT 2008


On 16:09 Wed 25 Jun     , Vincent Ficet wrote:
>
> diff --git a/opensm/opensm/osm_state_mgr.c b/opensm/opensm/osm_state_mgr.c
> index f15a4af..780d8db 100644
> --- a/opensm/opensm/osm_state_mgr.c
> +++ b/opensm/opensm/osm_state_mgr.c
> @@ -202,8 +202,7 @@ __osm_state_mgr_get_remote_port_info(IN osm_sm_t * sm,
>
> mad_context.pi_context.node_guid =
> osm_node_get_node_guid(osm_physp_get_node_ptr(p_physp));
> - mad_context.pi_context.port_guid =
> - cl_hton64(osm_physp_get_port_num(p_physp));
> + mad_context.pi_context.port_guid = p_physp->port_guid;
> mad_context.pi_context.set_method = FALSE;
> mad_context.pi_context.light_sweep = TRUE;
> mad_context.pi_context.update_master_sm_base_lid = FALSE;

As you can see the patch is totally broken (your mailer or cut&past does
bad :( ).

I applied it by hand, added log message and preserved authorship. Also
next time remember to add 'Sihged-off-by:' line.

Sasha


commit 233b46a410f6d9d7dbd4e762f0b9c9066dcb0a4a
Author: Vincent Ficet <jean-vincent.ficet at bull.net>
Date:   Wed Jun 25 16:51:04 2008 +0300

    opensm: fix wrong port_guid initialization
    
    Fix wrong port_guid field initialization when re-querying PortInfo in
    light sweep. The issue was pointed out by Vincent Ficet.
    
    Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>

diff --git a/opensm/opensm/osm_state_mgr.c b/opensm/opensm/osm_state_mgr.c
index f15a4af..780d8db 100644
--- a/opensm/opensm/osm_state_mgr.c
+++ b/opensm/opensm/osm_state_mgr.c
@@ -202,8 +202,7 @@ __osm_state_mgr_get_remote_port_info(IN osm_sm_t * sm,
 
 	mad_context.pi_context.node_guid =
 	    osm_node_get_node_guid(osm_physp_get_node_ptr(p_physp));
-	mad_context.pi_context.port_guid =
-	    cl_hton64(osm_physp_get_port_num(p_physp));
+	mad_context.pi_context.port_guid = p_physp->port_guid;
 	mad_context.pi_context.set_method = FALSE;
 	mad_context.pi_context.light_sweep = TRUE;
 	mad_context.pi_context.update_master_sm_base_lid = FALSE;




More information about the general mailing list