[ofa-general] [PATCH 1/3] libvendor: osm_vendor_get_all_port_attr() rework

Hal Rosenstock hrosenstock at xsigo.com
Tue Jan 8 11:47:25 PST 2008


On Tue, 2008-01-08 at 19:44 +0000, Sasha Khapyorsky wrote:
> On 08:58 Tue 08 Jan     , Hal Rosenstock wrote:
> > 
> > Yes, but it goes further than checking in tree consumers and not
> > everyone is paying attention all the time or running complete
> > regressions frequently so this wasn't found until recently.
> > 
> > This change broke autoselection on a machine running OpenSM with a
> > combination of IB and iWARP adapters as it selected an iWARP adapter and
> > exited.
> 
> Right, after reviewing this code again I see that it is possible
> failure.
> 
> > If we care about continuing to support this feature, I suppose code
> > might be able to be added to OpenSM main.c to handle this rather than it
> > being in a lower layer as it was before.
> 
> We don't have appropriate indication in the vendor layer. I think non-IB
> devices can be filtered out in osm_vendor_get_all_port_attr(), something
> like this:

Yes, that looks like it would work. Hoping to get it tested.

-- Hal

> diff --git a/opensm/libvendor/osm_vendor_ibumad.c b/opensm/libvendor/osm_vendor_ibumad.c
> index 522325b..977a3b2 100644
> --- a/opensm/libvendor/osm_vendor_ibumad.c
> +++ b/opensm/libvendor/osm_vendor_ibumad.c
> @@ -571,6 +571,8 @@ osm_vendor_get_all_port_attr(IN osm_vendor_t * const p_vend,
>  		 * For each CA, retrieve the port guids
>  		 */
>  		if (umad_get_ca(p_vend->ca_names[i], &ca) == 0) {
> +			if (ca.node_type < 1 || ca.node_type > 3)
> +				continue;
>  			for (j = 0; j <= ca.numports; j++) {
>  				if (!ca.ports[j])
>  					continue;
> 
> Sasha
> _______________________________________________
> general mailing list
> general at lists.openfabrics.org
> http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general
> 
> To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general



More information about the general mailing list