[openib-general] opensm and faulty hardware
Viswanath Krishnamurthy
viswa.krish at gmail.com
Tue Sep 27 16:44:04 PDT 2005
Hal,
Thanks.. works like a charm...
-Viswa
On 27 Sep 2005 16:13:01 -0400, Hal Rosenstock <halr at voltaire.com> wrote:
>
> On Tue, 2005-09-27 at 16:00, Viswanath Krishnamurthy wrote:
> > Hal,
> >
> > I added a hack now to get around the problem. There needs to be a
> > proper fix later..
>
> Can you try this instead ? Thanks.
>
> -- Hal
>
> Index: include/opensm/osm_port.h
> ===================================================================
> --- include/opensm/osm_port.h (revision 3567)
> +++ include/opensm/osm_port.h (working copy)
> @@ -346,7 +346,7 @@ osm_physp_is_healthy(
> * Returns TRUE if the Physical Port has been maked as healthy
> * FALSE otherwise.
> * All physical ports are initialized as "healthy" but may be marked
> -* otherwise if a received trap claims otherwise.
> +* otherwise if a received trap claims otherwise.
> *
> * NOTES
> *
> @@ -456,6 +456,42 @@ osm_physp_set_port_info(
> * Port, Physical Port
> *********/
>
> +/****f* OpenSM: Physical Port/osm_physp_validate_base_lid
> +* NAME
> +* osm_physp_validate_base_lid
> +*
> +* DESCRIPTION
> +* Validates the base LID in the Physical Port object.
> +*
> +* SYNOPSIS
> +*/
> +static inline boolean_t
> +osm_physp_validate_base_lid(
> + IN osm_physp_t* const p_physp )
> +{
> + CL_ASSERT( osm_physp_is_valid( p_physp ) );
> + if ( cl_ntoh16( p_physp->port_info.base_lid ) > IB_LID_UCAST_END_HO )
> + {
> + p_physp->port_info.base_lid = 0;
> + return FALSE;
> + }
> + return TRUE;
> +}
> +/*
> +* PARAMETERS
> +* p_physp
> +* [in] Pointer to an osm_physp_t object.
> +*
> +* RETURN VALUES
> +* Returns TRUE if the base LID in the Physical port object is valid.
> +* FALSE otherwise.
> +*
> +* NOTES
> +*
> +* SEE ALSO
> +* Port, Physical Port
> +*********/
> +
> /****f* OpenSM: Physical Port/osm_physp_set_pkey_tbl
> * NAME
> * osm_physp_set_pkey_tbl
> Index: opensm/osm_port_info_rcv.c
> ===================================================================
> --- opensm/osm_port_info_rcv.c (revision 3579)
> +++ opensm/osm_port_info_rcv.c (working copy)
> @@ -346,8 +346,12 @@ __osm_pi_rcv_process_switch_port(
>
> if (port_num == 0)
> {
> - /* This is a management port 0 */
> - __osm_pi_rcv_process_endport(p_rcv, p_physp, p_pi);
> + /* This is switch management port 0 */
> + if ( !osm_physp_validate_base_lid( p_physp ) )
> + osm_log( p_rcv->p_log, OSM_LOG_ERROR,
> + "__osm_pi_rcv_process_switch_port: ERR 0F04: "
> + "Invalid base LID corrected.\n" );
> + __osm_pi_rcv_process_endport(p_rcv, p_physp, p_pi);
> }
>
> OSM_LOG_EXIT( p_rcv->p_log );
> @@ -367,6 +371,10 @@ __osm_pi_rcv_process_ca_port(
> UNUSED_PARAM( p_node );
>
> osm_physp_set_port_info( p_physp, p_pi );
> + if ( !osm_physp_validate_base_lid( p_physp ) )
> + osm_log( p_rcv->p_log, OSM_LOG_ERROR,
> + "__osm_pi_rcv_process_ca_port: ERR 0F08: "
> + "Invalid base LID corrected.\n" );
>
> __osm_pi_rcv_process_endport(p_rcv, p_physp, p_pi);
>
> @@ -390,6 +398,10 @@ __osm_pi_rcv_process_router_port(
> Update the PortInfo attribute.
> */
> osm_physp_set_port_info( p_physp, p_pi );
> + if ( !osm_physp_validate_base_lid( p_physp ) )
> + osm_log( p_rcv->p_log, OSM_LOG_ERROR,
> + "__osm_pi_rcv_process_router_port: ERR 0F09: "
> + "Invalid base LID corrected.\n" );
>
> OSM_LOG_EXIT( p_rcv->p_log );
> }
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/general/attachments/20050927/14dafeb3/attachment.html>
More information about the general
mailing list