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:ja...@dev.mellanox.co.il] 
Sent: Thursday, June 03, 2010 6:14 AM
To: e...@openfabrics.org
Cc: Mike Heinz; e...@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


_______________________________________________
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg

Reply via email to