[ofa-general] Re: [PATCH 1/6] complib/nodenamemap: add generic parse_node_map() function

Sasha Khapyorsky sashak at voltaire.com
Sat Mar 29 02:45:53 PDT 2008


On 14:35 Thu 27 Mar     , Ira Weiny wrote:
> 
> Doesn't the root_nodes_list member of updn_t store the guids?

No, it is removed in patch 3/6.

> I'm not quite
> sure what you are avoiding to store.  It does not look as though you are
> searching the file each time the code wants to know if a particular guid is a
> root.

Correct, and this is the point there - each heavy sweep Up/Down re-reads
the root guids file and catches possible changes there.

> In particular I don't want the node name lookup to search the file each time.
> That is why I read the file and store it in a map object.  I suppose the
> callback method allows for users to use their own data structure object.
> 
> > 
> > > We could rename nn_map_t to be more generic if necessary.
> > >
> > > I worry about maintaining 2 functions which parse the same file format in the
> > > same c file.
> > 
> > I agree with you, just didn't time to merge it.
> > 
> 
> Ok, however, I think there is a slight difference in the formats the 2
> functions parse.  I am looking for '"' symbols to delineate the name string.  I
> don't think you are.  For example:
> 
>    0xcafebabe "hello world"
> 
> Would result in a node guid of 0xcafebabe and a string of "hello world".  I
> think your function would parse it as '"hello'?  In fact including the '"'?

Correct, it is slightly different today. By "merging" I meant format
merge as well.

Sasha



More information about the general mailing list