[openib-general] opensm RFC: access switch object via node

Sasha Khapyorsky sashak at voltaire.com
Sun Nov 26 16:01:12 PST 2006


Hi,

I noticed that in most of cases when switch object lookup is performed
in OpenSM it is done by searching sw_guid_tbl map by switch node's
GUID value.

For me it looks better and simpler just to keep pointer to switch object
as member of its node structure. So for switch nodes such pointer will
point to node's valid switch object and for other nodes this will be
initialized as NULL.

Then instead of sw_guid_tbl map searching we will have switch object
pointer directly available from the node structure (and sw_guid_tbl map
can be replaced by "cheaper" linked list).

Other positive "side effect" is nice way (one more) to detect
switch/non-switch node type just as (node->sw != NULL).

Any comments?

If no real objections I can prepare patches.

Sasha




More information about the general mailing list