Hi Sasha, On Sun, Aug 31, 2008 at 10:46 AM, Sasha Khapyorsky <[EMAIL PROTECTED]> wrote: > Hi Hal, > > On 17:45 Wed 27 Aug , Hal Rosenstock wrote: >>>> diff --git a/ibsim/sim_net.c b/ibsim/sim_net.c >>>> index 6e3c0e9..146bcde 100644 >>>> --- a/ibsim/sim_net.c >>>> +++ b/ibsim/sim_net.c >>>> @@ -190,7 +190,9 @@ char (*aliases)[NODEIDLEN + NODEPREFIX + 1]; // >>>> aliases map format: "[EMAIL PROTECTED]" >>>> int netnodes, netswitches, netports, netaliases; >>>> char netprefix[NODEPREFIX + 1]; >>>> +int netvendid; >>>> int netdevid; >>>> +uint64_t netsysimgguid; >>>> int netwidth = DEFAULT_LINKWIDTH; >>>> int netspeed = DEFAULT_LINKSPEED; >>>> @@ -324,11 +326,12 @@ static Node *new_node(int type, char *nodename, >>>> char *nodedesc, int nodeports) >>>> } >>>> mad_set_field(nd->nodeinfo, 0, IB_NODE_NPORTS_F, nd->numports); >>>> + mad_set_field(nd->nodeinfo, 0, IB_NODE_VENDORID_F, netvendid); >>>> mad_set_field(nd->nodeinfo, 0, IB_NODE_DEVID_F, netdevid); >>>> mad_encode_field(nd->nodeinfo, IB_NODE_GUID_F, &nd->nodeguid); >>>> mad_encode_field(nd->nodeinfo, IB_NODE_PORT_GUID_F, &nd->nodeguid); >>>> - mad_encode_field(nd->nodeinfo, IB_NODE_SYSTEM_GUID_F, &nd->nodeguid); >>>> + mad_encode_field(nd->nodeinfo, IB_NODE_SYSTEM_GUID_F, &netsysimgguid); >>>> >>> >>> And when netsysimgguid was not parsed for this node, it will put previous >>> value there (or "0" if it was never parsed)? >>> >> Is "state" for a node in the topology file needed to deal with this ? >> Something like the following: When the vendor ID line is seen, reset >> netsysimgguid and if 0 when new_node is invoked, then use the node GUID as >> currently done. Does that make sense ? > > Why to not reset netsysimgguid unconditionally at end of new_node()?
Sure; that's better as the "state" for new node is already determined. Updated patch to follow shortly. -- Hal > The rest could be as you said: > > mad_encode_field(nd->nodeinfo, IB_NODE_SYSTEM_GUID_F, > netsysimgguid ? &netsysimgguid : &nd->nodeguid); > > Sasha > _______________________________________________ > general mailing list > [email protected] > http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general > > To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general > _______________________________________________ general mailing list [email protected] http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
