[ewg] [PATCH] node description patch

Mike Heinz michael.heinz at qlogic.com
Fri Jun 11 09:12:56 PDT 2010


Jack - for some reason your reply dropped into my junk email box instead of my EWG folder.

I hate Outlook.

Anyway - It looks like NODE_DESC_HOSTNAME is set in /etc/infiniband/openib.conf but, you're right, there should be a fallback in the script. I'll make the change and resubmit. I'll also add code to force a trailing zero.

-----Original Message-----
From: Jack Morgenstein [mailto:jackm at dev.mellanox.co.il] 
Sent: Thursday, June 03, 2010 6:14 AM
To: ewg at openfabrics.org
Cc: Mike Heinz; ewg at openfabrics.org
Subject: Re: [ewg] [PATCH] node description patch

On Tuesday 01 June 2010 17:04, Mike Heinz wrote:
> +            logger -i "Set node_desc for ${hca}: ${NODE_DESC_HOSTNAME} HCA-\${hca_id}"
> +            echo -n "${NODE_DESC_HOSTNAME} HCA-${hca_id}" >> ${sysdir}/${hca}/node_desc
> 

I don't see NODE_DESC_HOSTNAME defined anywhere.

Don't you need a line like:
> +            echo -n "${NODE_DESC_HOSTNAME:-@} HCA-${hca_id}" >> ${sysdir}/${hca}/node_desc

So that you will have the "@" that the driver looks for if NODE_DESC_HOSTNAME is not set
in the environment, or will use some other string if the user
wishes to override by setting NODE_DESC_HOSTNAME to something else in the environment?

Also, I am concerned about the trailing \0 character. It looks to me that your function
ib_build_node_desc does not deal with this.  For example, if the node name is very long,
and the 64 bytes does not reach the end of the string stored in sysfs due to the length
difference when replacing "@" with the node name.

-Jack





More information about the ewg mailing list