[openib-general] RE: [PATCH] OpenSM/osmtest: Add rudimentary SA GuidInfoRecord test

Eitan Zahavi eitan at mellanox.co.il
Wed May 10 06:09:01 PDT 2006


Cool. 

Eitan Zahavi
Design Technology Director
Mellanox Technologies LTD
Tel:+972-4-9097208
Fax:+972-4-9593245
P.O. Box 586 Yokneam 20692 ISRAEL


> -----Original Message-----
> From: Hal Rosenstock [mailto:halr at voltaire.com]
> Sent: Wednesday, May 10, 2006 3:45 PM
> To: openib-general at openib.org
> Cc: Eitan Zahavi; Yael Kalka; Ofer Gigi
> Subject: [PATCH] OpenSM/osmtest: Add rudimentary SA GuidInfoRecord
test
> 
> OpenSM/osmtest: Add rudimentary SA GuidInfoRecord test
> 
> Signed-off-by: Hal Rosenstock <halr at voltaire.com>
> 
> Index: osmtest/osmtest.c
> ===================================================================
> --- osmtest/osmtest.c	(revision 7043)
> +++ osmtest/osmtest.c	(working copy)
> @@ -4055,6 +4055,59 @@ osmtest_validate_all_node_recs( IN osmte
>  #endif
> 
>  #ifdef VENDOR_RMPP_SUPPORT
> +static ib_api_status_t
> +osmtest_validate_all_guidinfo_recs( IN osmtest_t * const p_osmt )
> +{
> +  osmtest_req_context_t context;
> +  const ib_guidinfo_record_t *p_rec;
> +  cl_status_t status;
> +  size_t num_recs;
> +
> +  OSM_LOG_ENTER( &p_osmt->log, osmtest_validate_all_guidinfo_recs );
> +
> +  cl_memclr( &context, sizeof( context ) );
> +
> +  /*
> +   * Do a blocking query for all GuidInfoRecords in the subnet.
> +   */
> +  status = osmtest_get_all_recs( p_osmt, IB_MAD_ATTR_GUIDINFO_RECORD,
> +                                 sizeof( *p_rec ), &context );
> +
> +
> +  if( status != IB_SUCCESS )
> +    {
> +      osm_log( &p_osmt->log, OSM_LOG_ERROR,
> +               "osmtest_validate_all_guidinfo_recs: ERR 0099: "
> +               "osmtest_get_all_recs failed (%s)\n",
> +               ib_get_err_str( status ) );
> +      goto Exit;
> +    }
> +
> +  num_recs = context.result.result_cnt;
> +
> +  if( osm_log_is_active( &p_osmt->log, OSM_LOG_VERBOSE ) )
> +    {
> +      osm_log( &p_osmt->log, OSM_LOG_VERBOSE,
> +               "osmtest_validate_all_guidinfo_recs: "
> +               "Received %u records\n", num_recs );
> +    }
> +
> +  /* No validation as yet */
> +
> + Exit:
> +  /*
> +   * Return the IB query MAD to the pool as necessary.
> +   */
> +  if( context.result.p_result_madw != NULL )
> +    {
> +      osm_mad_pool_put( &p_osmt->mad_pool,
context.result.p_result_madw );
> +      context.result.p_result_madw = NULL;
> +    }
> +
> +  OSM_LOG_EXIT( &p_osmt->log );
> +  return ( status );
> +}
> +
>
/**********************************************************************
>
**********************************************************************/
>  static ib_api_status_t
> @@ -4738,6 +4791,12 @@ osmtest_validate_against_db( IN osmtest_
>    if( status != IB_SUCCESS )
>      goto Exit;
> 
> +#ifdef VENDOR_RMPP_SUPPORT
> +  status = osmtest_validate_all_guidinfo_recs( p_osmt );
> +  if( status != IB_SUCCESS )
> +    goto Exit;
> +#endif
> +
>  #if defined (VENDOR_RMPP_SUPPORT) && defined (DUAL_SIDED_RMPP)
>    cl_memclr( &context, sizeof( context ) );
>    cl_memclr( &request, sizeof( request ) );
> 




More information about the general mailing list