Re: [bug] rdma-core/librdmacm/cma.c rdma_create_qp_exï¼add id->cq refer to qp_attr->cq, when qp_attr->cq is not NULL, and id->cq is NULL

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

 



在 2024/8/28 8:51, Zhijian Li (Fujitsu) 写道:
Not related to your modification,

In general,
- Please report a bug with more details, such as how to reproduce, your expectations and what's the impact, etc...
- Please follow the patch submit instruction[1] or a PR if you want to submit a patch to the communities.

[1] https://docs.kernel.org/process/submitting-patches.html

It seems a rdma-core problem. Not sure if it is reasonable to use the above link.

Zhu Yanjun



On 27/08/2024 14:20, 靳文宾 wrote:





I think the following modification is more correct,
if there have something i dont know, pls tell me, thx





diff --git a/librdmacm/cma.c b/librdmacm/cma.c
index 7b924bd0d..9e71ba858 100644
--- a/librdmacm/cma.c
+++ b/librdmacm/cma.c
@@ -1654,10 +1654,20 @@ int rdma_create_qp_ex(struct rdma_cm_id *id,
          if (ret)
                  return ret;


-       if (!attr->send_cq)
+       if (!attr->send_cq) {
                  attr->send_cq = id->send_cq;
-       if (!attr->recv_cq)
+       } else {
+               if (!id->recv_cq)
+                       id->recv_cq = attr->recv_cq;
+       }
+       if (!attr->recv_cq) {
                  attr->recv_cq = id->recv_cq;
+       } else {
+               if (!id->recv_cq)
+                       id->recv_cq = attr->recv_cq;
+       }
+
+
          if (id->srq && !attr->srq)
                  attr->srq = id->srq;
          qp = ibv_create_qp_ex(id->verbs, attr);









[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