[openib-general] [PATCH] opensm: switch lookups consolidation with osm_get_switch_by_guid()

Hal Rosenstock halr at voltaire.com
Wed Dec 6 05:40:44 PST 2006


On Sun, 2006-11-26 at 18:32, Sasha Khapyorsky wrote:
> For switch object lookups, instead of repetead in many places code
> fragments like:
> 
>   p_sw_guid_tbl = &p_mgr->p_subn->sw_guid_tbl;
> 
>   p_sw = (osm_switch_t*)cl_qmap_get( p_sw_guid_tbl, node_guid );
>   if (p_sw == (osm_switch_t*)cl_qmap_end( p_sw_guid_tbl ) ) { ... }
> 
> use already existing "centralized" osm_get_switch_by_guid() function.
> 
> Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>

Thanks. Applied.

-- Hal





More information about the general mailing list