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 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); > > > > >