[ofa-general] Re: [PATCH] for-2.6.23 ib/umad: add partition support

Hal Rosenstock halr at voltaire.com
Fri Jun 22 09:34:59 PDT 2007


On Fri, 2007-06-22 at 12:17, Roland Dreier wrote:
>  > Ugh. OFED 1.2 (with the old ABI) just went out.
>  > I wonder - is it time to start making the kernel backwards-compatible?
>  > It would be trivial to have userspace supply its own ABI
>  > version and have kernel support both new and old ABI if we want to.
>  > What do you think?
> 
> There's always a balance between keeping cruft in the kernel for
> compatibility and not breaking userspace.  I'm beginning to think the
> right plan in this case might be to rename struct ib_user_mad_hdr to
> struct ib_user_mad_hdr_old, make a new struct ib_user_mad with the
> pkey_index member and add a new ioctl IB_USER_MAD_ENABLE_PKEY_INDEX.
> 
> The ABI version would stay the same, and if someone just opened the
> device and didn't do the IB_USER_MAD_ENABLE_PKEY_INDEX they would get
> the old ABI.  If they do the ioctl then they get the new header.  Also
> we could define that ABI version 6 just has the new struct
> ib_user_mad_hdr and no ioctl.
> 
> Then we could say we were going to switch to the new ABI in a year or
> two.  And print a warning in the kernel log for every application that
> doesn't use the ioctl.

This seems like a good approach to me.

The only question is what happens with apps which enable the pkey index
mode but run on an older kernel which does not support this. They would
get an error back (-ENOIOCTLCMD) from user_mad. They could either error
out on this or continue on depending on what the app wants to do.

> I'll try to cook up a kernel patch next week.

Thanks.

-- Hal

>  - R.
> _______________________________________________
> 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