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

Sasha Khapyorsky sashak at voltaire.com
Tue Jan 8 09:00:41 PST 2008


On 08:22 Tue 08 Jan     , Hal Rosenstock wrote:
> Sasha,
> 
> On Tue, 2008-01-08 at 16:20 +0000, Sasha Khapyorsky wrote:
> > On 07:03 Mon 07 Jan     , Hal Rosenstock wrote:
> > > Sasha,
> > > 
> > > On Thu, 2007-11-15 at 11:12 +0200, Sasha Khapyorsky wrote:
> > > > It fixes couple of issues with this function:
> > > > 
> > > > - return only valid guids, don't return duplicated entries
> > > 
> > > What entries were duplicated ?
> > 
> > At index zero of the array.
> 
> That was the "best" port (and was intentionally duplicated).

Yes (not in general, but only for CAs) and in this sense it was "API"
violation (following the name and the description of function
osm_vendor_get_all_port_attr()), also seems another vendor layers never
supported this (which was resulted in having four ugly
#ifdef OSM_VENDOR_INTF_OPENIB in OpenSM port selection code).

> > > I think there may be a subtle "API" change in that the ib_port_attr_t
> > > array filled in no longer has (or properly calculates the "best" port).
> > > Not sure if it is this change or some other change which causes this.
> > 
> > I think it is a just a fix and API is untouched there.
> 
> Changing index 0 of the array is a subtle API change (and it affected
> consumers which use this).

I checked an open source consumers available at OFA (ibutils, opensm) -
nobody used this (OpenSM had '#ifdef OSM_VENDOR_INTF_OPENIB' just in
order to ignore the index '0' of the array).

Sasha



More information about the general mailing list