[ofa-general] Re: infiniband-diags/saquery.c:print_multicast_member_record question

Hal Rosenstock hrosenstock at xsigo.com
Tue Jun 10 11:35:19 PDT 2008


On Tue, 2008-06-10 at 11:26 -0700, Ira Weiny wrote:
> On Tue, 10 Jun 2008 11:16:24 -0700
> Hal Rosenstock <hrosenstock at xsigo.com> wrote:
> 
> > On Tue, 2008-06-10 at 11:11 -0700, Ira Weiny wrote:
> > > On Tue, 10 Jun 2008 10:23:24 -0700
> > > Hal Rosenstock <hrosenstock at xsigo.com> wrote:
> > > 
> > > > On Tue, 2008-06-10 at 09:05 -0700, Ira Weiny wrote:
> > > > > Yea, that comment does not make sense.
> > > > > 
> > > > > I am searching the node records for the node which has the port defined in the
> > > > > member record.  The interface ID is simply the port guid, is it not?
> > > > > 
> > > > > 	uint64_t gid_interface_id = cl_ntoh64( p_mcmr->port_gid.unicast.interface_id );
> > > > > 
> > > > > I guess the comments should read.
> > > > > 
> > > > >    /* go through the node records searching for a port guid which matches
> > > > >     * this port gid interface id.
> > > > >     * This gives us a node description to print.
> > > > >     */
> > > > > 
> > > > > Does that make more sense?
> > > > 
> > > > The makes more sense but I don't think that the code does what's
> > > > intended.
> > > 
> > > Why do you say that?
> > 
> > Looks to me like it relies on some node GUID being same as port GUID.
> > While that's allowable for one port, it won't always be the case.
> 
> In my test system the Node GUID and port GUID are different and this works.  I
> am specifically using the port guid out of the NodeInfo struct of the
> NodeRecord.  So I should be using the port guid vs port GID ID _only_.

Not sure what you mean; port GID 0 = subnet prefix + port GUID. Not sure
what SMs support other port GIDs than this but OpenSM doesn't.
 
> > > Have you found some configuration in which this does not
> > > work?
> > 
> > Yes.
> 
> :-(  Sorry, I'm pretty sure this should be ok...

It's possible it's an environment thing but there's a couple of
suboptimialities in print_multicast_member_record:

1. Does osmv_get_query_node_rec always return a non NULL pointer ?
2. If the loop fails to find a match, the last node description is used.

-- Hal

> Ira
> 
> > 
> > -- Hal
> > 
> > > From the spec pg 905:
> > > 
> > >    "Note: If a channel adapter or router has multiple ports on the same subnet,
> > >    there will be multiple NodeRecords available for that node from SA, one for
> > >    each possible PortGUID value of NodeInfo for that node on that subnet."
> > > 
> > > So each NodeRecord should have a unique port GUID in it.
> > > 
> > > Or do you think the GID interface ID will not always equal the GUID?  I thought
> > > I read that somewhere but perhaps I am wrong.  I don't find it right now.  :-/
> > > 
> > > Ira
> > > 
> > > > 
> > > > -- Hal
> > > > 
> > > > > Ira
> > > > > 
> > > > > On Tue, 10 Jun 2008 07:46:26 -0700
> > > > > Hal Rosenstock <hrosenstock at xsigo.com> wrote:
> > > > > 
> > > > > > Ira,
> > > > > > 
> > > > > > In saquery.c:print_multicast_member_record, there is the following:
> > > > > > 
> > > > > >         /* go through and find the node description for this node GID */
> > > > > >         for (i = 0; i < result.result_cnt; i++) {
> > > > > >                 node_record = osmv_get_query_node_rec(result.p_result_madw, i);
> > > > > >                 if (cl_ntoh64(node_record->node_info.port_guid) == gid_interface_id)
> > > > > >                         break;
> > > > > >         }
> > > > > > 
> > > > > > I have a question about the intention here:
> > > > > > 
> > > > > > The comment mentions the node description for this node GID. Is that
> > > > > > what is meant or is the intention to get the node description
> > > > > > corresponding to the port GUID for each MCMember record ?
> > > > > > 
> > > > > > -- Hal
> > > > > > 
> > > > > > 
> > > > 
> > 




More information about the general mailing list