[ofa-general] [PATCH] opensm: PortInfo requests for discovered switches

Sasha Khapyorsky sashak at voltaire.com
Sun Mar 1 23:19:58 PST 2009


On 20:24 Sun 01 Mar     , Hal Rosenstock wrote:
> > + ?? ?? ?? if (ni->node_type == IB_NODE_TYPE_SWITCH) {
> > + ?? ?? ?? ?? ?? ?? ?? port = 0;
> > + ?? ?? ?? ?? ?? ?? ?? num_ports = osm_node_get_num_physp(node);
> > + ?? ?? ?? } else {
> > + ?? ?? ?? ?? ?? ?? ?? port = ib_node_info_get_local_port_num(ni);
> > + ?? ?? ?? ?? ?? ?? ?? num_ports = port + 1;
> 
> The else clause determination of num_ports doesn't look right to me.
> Shouldn't it be
> num_ports = ni->num_ports ?

No, it's non-switch case where we are querying a single port.

Sasha



More information about the general mailing list