[ofa-general] [PATCH] libibumad: support for new pkey enabled user_mad API

Sasha Khapyorsky sashak at voltaire.com
Thu Nov 1 03:38:32 PDT 2007


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, 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