Re: [PATCH] librdmacm: Return errno on create_qp failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 26, 2018 at 04:13:15PM -0600, Jason Gunthorpe wrote:
> On Mon, Mar 26, 2018 at 10:06:37PM +0000, Hefty, Sean wrote:
> > > Drivers are supposed to return errno, I'm sure lots and lots of them
> > > have paths where they fail to do this.
> >
> > The code could check for errno, and assume if set that it's set to the correct error number.
> >
> > if (!qp) {
> > 	ret = errno ? ERR(errno) : ENOMEM;
> >
> > or wrap the errno check/return in a macro
>
> And zero errno befor calling the driver.
>
> We'd have to put that sort of guard in all the verbs calls that return
> a pointer, I think.

+1,

It is an excellent suggestion, at the end such code will allow us to unify
all returned "errno" and ensure that they are consistent between different
verbs calls.

Thanks

>
> Jason
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux