[PATCH rdma-core] librdmacm: Make rdma_create_qp_ex() report proper errno

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

 



Current rdma_create_qp_ex() reports fixed ENOMEM when calling
ibv_create_qp_ex() fails, so it's hard for user to know which
actual error happens on ibv_create_qp_ex().

Signed-off-by: Xiao Yang <yangx.jy@xxxxxxxxxxxxxx>
---
 librdmacm/cma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/librdmacm/cma.c b/librdmacm/cma.c
index 8c820ccf..20ee1e00 100644
--- a/librdmacm/cma.c
+++ b/librdmacm/cma.c
@@ -1662,7 +1662,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 = -1;
 		goto err1;
 	}
 
-- 
2.25.1






[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