[openib-general] [PATCH] [MINOR} OpenSM/osm_port_info_rcv.c: Move assert to beforewhere PortInfo is assumed
Eitan Zahavi
eitan at mellanox.co.il
Wed Jun 14 23:02:07 PDT 2006
Makes perfect sense.
> -----Original Message-----
> From: Hal Rosenstock [mailto:halr at voltaire.com]
> Sent: Thursday, June 15, 2006 7:11 AM
> To: openib-general at openib.org
> Cc: Eitan Zahavi
> Subject: [PATCH] [MINOR} OpenSM/osm_port_info_rcv.c: Move assert to
> beforewhere PortInfo is assumed
>
> OpenSM/osm_port_info_rcv.c: Move assert to before where PortInfo is
> assumed as shouldn't be processing as PortInfo unless it really is
>
> Signed-off-by: Hal Rosenstock <halr at voltaire.com>
>
> Index: opensm/osm_port_info_rcv.c
> ===================================================================
> --- opensm/osm_port_info_rcv.c (revision 7961)
> +++ opensm/osm_port_info_rcv.c (working copy)
> @@ -683,6 +683,8 @@ osm_pi_rcv_process(
> p_context = osm_madw_get_pi_context_ptr( p_madw );
> p_pi = (ib_port_info_t*)ib_smp_get_payload_ptr( p_smp );
>
> + CL_ASSERT( p_smp->attr_id == IB_MAD_ATTR_PORT_INFO );
> +
> /* On receipt of client reregister, clear the reregister bit so
> reregistering won't be sent again and again */
> if ( ib_port_info_get_client_rereg( p_pi ) )
> @@ -698,8 +700,6 @@ osm_pi_rcv_process(
> port_guid = p_context->port_guid;
> node_guid = p_context->node_guid;
>
> - CL_ASSERT( p_smp->attr_id == IB_MAD_ATTR_PORT_INFO );
> -
> osm_dump_port_info(
> p_rcv->p_log, node_guid, port_guid, port_num, p_pi,
OSM_LOG_DEBUG);
>
>
More information about the general
mailing list