[ofa-general] [PATCH] libibumad: support for new pkey enabled user_mad API
Sasha Khapyorsky
sashak at voltaire.com
Thu Nov 1 03:56:24 PDT 2007
On 12:38 Thu 01 Nov , Sasha Khapyorsky wrote:
> On 11:19 Thu 01 Nov , Yevgeny Kliteynik wrote:
> > > + if (abi_version > 5)
> > > + new_user_mad_api = 1;
> > > + else {
> > > + int ret = ioctl(fd, IB_USER_MAD_ENABLE_PKEY, NULL);
> > >
> > I got (ret = -1) and (errno = 515)
>
> It is ENOIOCTLCMD,
OTOH it is defined in include/linux/errno.h under #ifdef __KERNEL__
and with caution: /* Should never be seen by user programs */
Roland! Any idea?
Sasha
> and it is correct value when unlocked_ioctl() method
> is not defined by driver. So I think we need to handle this one too.
>
> > > + if (ret == 0)
> > > + new_user_mad_api = 1;
> > > + else if (ret < 0 && errno == EINVAL)
> > > + new_user_mad_api = 0;
> > > + else {
> > >
> > So eventually I got here.
> > I have kernel 2.6.9-42.
>
> I will send update soon.
>
> Sasha
More information about the general
mailing list