* [PATCH rdma-core] librdmacm: Make rdma_create_qp_ex() report proper errno
@ 2020-12-16 1:54 Xiao Yang
2020-12-16 8:21 ` Leon Romanovsky
0 siblings, 1 reply; 2+ messages in thread
From: Xiao Yang @ 2020-12-16 1:54 UTC (permalink / raw)
To: linux-rdma; +Cc: leon, Xiao Yang
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@cn.fujitsu.com>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH rdma-core] librdmacm: Make rdma_create_qp_ex() report proper errno
2020-12-16 1:54 [PATCH rdma-core] librdmacm: Make rdma_create_qp_ex() report proper errno Xiao Yang
@ 2020-12-16 8:21 ` Leon Romanovsky
0 siblings, 0 replies; 2+ messages in thread
From: Leon Romanovsky @ 2020-12-16 8:21 UTC (permalink / raw)
To: Xiao Yang; +Cc: linux-rdma
On Wed, Dec 16, 2020 at 09:54:59AM +0800, Xiao Yang wrote:
> 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@cn.fujitsu.com>
> ---
> librdmacm/cma.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
The same change should be done for the ibv_alloc_pd() call.
635 if (!cma_dev->pd)
636 cma_dev->pd = ibv_alloc_pd(cma_dev->verbs);
637 if (!cma_dev->pd) {
638 ret = ERR(ENOMEM);
639 goto out;
640 }
And please add Fixes line.
Thanks
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-12-16 8:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-16 1:54 [PATCH rdma-core] librdmacm: Make rdma_create_qp_ex() report proper errno Xiao Yang
2020-12-16 8:21 ` Leon Romanovsky
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.