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 09:30:07AM -0600, Jason Gunthorpe wrote:
> On Mon, Mar 26, 2018 at 04:44:35PM +0300, Leon Romanovsky wrote:
> > On Sun, Mar 25, 2018 at 11:09:02PM +0300, Yuval Shaia wrote:
> > > Upon QP creation failure provider's create_qp function sets errno with
> > > error code and return NULL to caller.
> > >
> > > Let's return this errno to caller to reflect the exact reason for the
> > > error.
> > >
> > > Signed-off-by: Yuval Shaia <yuval.shaia@xxxxxxxxxx>
> > >  librdmacm/cma.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/librdmacm/cma.c b/librdmacm/cma.c
> > > index fa370650..e92a022c 100644
> > > +++ b/librdmacm/cma.c
> > > @@ -1369,7 +1369,7 @@ int rdma_create_qp_ex(struct rdma_cm_id *id,
> > >  		attr->srq = id->srq;
> > >  	qp = ibv_create_qp_ex(id->verbs, attr);
> > >  	if (!qp) {
> > > -		ret = ERR(ENOMEM);
> > > +		ret = ERR(errno);
> >
> > It is not always correct, for example
> > ibv_create_qp_ex -> ibv_create_qp -> pd->context->ops.create_qp ->
> > mlx5_create_qp -> create_qp -> can return NULL without updating errno.
>
> That is a driver bug..

It was an example, does patch author go to check and update ALL paths in
all drivers?

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