On 07:57 Tue 03 Feb , Hal Rosenstock wrote: > > Patch to osm_perfmgr_db.c to only error port 0 queries when not enhanced > SP0.
This: + osm_node = osm_get_node_by_guid(pm->subn, cl_hton64(node->node_guid)); + if (!osm_node) + return (PERFMGR_EVENT_DB_GUIDNOTFOUND); + if ((!(osm_node_get_type(osm_node) == IB_NODE_TYPE_SWITCH) || + !osm_node->sw || + !ib_switch_info_is_enhanced_port0(&osm_node->sw->switch_info)) && + (port == 0)) + return (PERFMGR_EVENT_DB_PORTNOTFOUND); (osm_get_node_by_guid()) is expensive operation. If you only need to determine port 0 type - store it as part of struct monitored_node structure. Another (even more universal) approach would be to keep there a reference to related osm_node object. Sasha _______________________________________________ general mailing list [email protected] http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
