[ofa-general] [PATCH V2] OpenSM: Add a Node Description check on light sweep to ensure that the ND has been found for each node.

Sasha Khapyorsky sashak at voltaire.com
Thu Jul 31 10:37:35 PDT 2008


Hi Ira,

On 10:05 Thu 31 Jul     , Ira Weiny wrote:
> 
> Ah, yes, I forget.  Originally I made this a VERBOSE message but later changed it
> to ERROR.  What method do we use for assigning the error codes?

The method is right two digits are per source file and left two are
unique error code inside this file.

> +static void __osm_state_mgr_get_node_desc(IN cl_map_item_t * const p_object,
> +					IN void *context)
> +{
> +	osm_physp_t *p_physp = NULL;
> +	osm_node_t *const p_node = (osm_node_t *) p_object;
> +	ib_api_status_t status = IB_SUCCESS;
> +	osm_madw_context_t mad_context;
> +	osm_sm_t *sm = (osm_sm_t *)context;
> +
> +	OSM_LOG_ENTER(sm->p_log);
> +
> +	CL_ASSERT(p_node);
> +
> +	if (p_node->print_desc && strcmp(p_node->print_desc, "<unknown>"))
> +		/* if ND is valid, do nothing */
> +		goto exit;
> +
> +	OSM_LOG(sm->p_log, OSM_LOG_ERROR,
> +		"__osm_state_mgr_get_node_desc: ERR 3314: "
> +		"Unknown node description \"%s\" for node 0x%016" PRIx64
> +		".  Reissuing ND query\n",
> +		p_node->print_desc ? p_node->print_desc : "<unknown>",
> +		cl_ntoh64(osm_node_get_node_guid (p_node)));

OSM_LOG() macro includes function name, so you don't need to specify this
explicitly.

> +
> +	/* get a physp to request from. */
> +	p_physp = osm_node_get_any_physp_ptr(p_node);
> +
> +	mad_context.nd_context.node_guid = osm_node_get_node_guid(p_node);
> +
> +	status = osm_req_get(sm,
> +			     osm_physp_get_dr_path_ptr(p_physp),
> +			     IB_MAD_ATTR_NODE_DESC,
> +			     0, CL_DISP_MSGID_NONE, &mad_context);
> +	if (status != IB_SUCCESS)
> +		OSM_LOG(sm->p_log, OSM_LOG_ERROR,
> +			"__osm_state_mgr_get_node_desc: ERR 3315: "

Ditto.

Sasha



More information about the general mailing list