[openib-general] Re: [PATCH 1 of 3] core: static rate encoding changesupport

Jack Morgenstein jackm at mellanox.co.il
Sun Mar 19 07:59:36 PST 2006


On Thursday 16 March 2006 19:17, Bryan O'Sullivan wrote:
> On Thu, 2006-03-16 at 18:58 +0200, Michael S. Tsirkin wrote:
> > > BTW, have you looked at ehca or ipath?  Do they need their static rate
> > > handling fixed up?
> >
> > Not sure, I think they do.
>
> Came a bit late to this discussion, sorry.  If you make core changes
> that require driver changes to work with them, it's probably a good idea
> to file bugs against those drivers in Bugzilla so that the ehca and
> ipath owners know something is up that they'll need to fix.
>
This encoding change DOES demand changes to the provider code.

I note that both ehca and ipath take the static rate field as the IPD value.
(ehca copies the static rate value in the ah attr struct to an "ipd" field, 
ipath copies the entire ah attribute structure as-is).
The new encoding will require ehca and ipath to translate the new encoding to 
an IPD value at the provider layer (from the encoding as given in the URLs 
above -- essentially the encoding described in the PathRecord rate field 
(Table 205 on page 901, section 15.2.5.6 of IB Spec).

Such translation is currently done by ULPs! (not good).

For example,  in IPoIB:
   ipoib_multicast.c, procedure  ipoib_mcast_join_task() :
   (tracking current rate)
		if (!ib_query_port(priv->ca, priv->port, &attr)) {
			priv->local_lid  = attr.lid;
			priv->local_rate = attr.active_speed *
				ib_width_enum_to_int(attr.active_width);
		} else

  and ipoib_main.c, procedure path_rec_completion :
   (computing IPD from current rate and desired rate)
		int path_rate = ib_sa_rate_enum_to_int(pathrec->rate);

		if (path_rate > 0 && priv->local_rate > path_rate)
			av.static_rate = (priv->local_rate - 1) / path_rate;

The proper place for this translation is at the provider layer (ULPs should 
NOT be involved in IPD calculations).

The changes to ehca and ipath should be very minor, but must be done

(For full discussion, see the links below)
http://openib.org/pipermail/openib-general/2006-March/017452.html
http://openib.org/pipermail/openib-general/2006-March/017453.html
http://openib.org/pipermail/openib-general/2006-March/017454.html

Definition of new encoding:
http://openib.org/pipermail/openib-general/2006-March/017999.html
(and see thread starting at this point)

ULP (ipoib) changes for new encoding:
http://openib.org/pipermail/openib-general/2006-March/018000.html

Finally, changes submitted for Mellanox provider layer:
http://openib.org/pipermail/openib-general/2006-March/018001.html

- Jack



More information about the general mailing list