public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Zhu Yanjun <yanjun.zhu@linux.dev>
To: "Zhijian Li (Fujitsu)" <lizhijian@fujitsu.com>,
	靳文宾 <jinwenbinxue@163.com>,
	"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>
Subject: 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: Thu, 29 Aug 2024 20:04:55 +0800	[thread overview]
Message-ID: <34234a57-9553-4193-a855-ee1ebbea3d6e@linux.dev> (raw)
In-Reply-To: <63408cd4-c4a9-4268-84a7-2c7fab9b690e@fujitsu.com>

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


  parent reply	other threads:[~2024-08-29 12:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-27  6:20 [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 靳文宾
2024-08-28  0:51 ` Zhijian Li (Fujitsu)
2024-08-29  9:08   ` Leon Romanovsky
2024-08-29 12:04   ` Zhu Yanjun [this message]
2024-09-02  7:00     ` [bug] rdma-core/librdmacm/cma.c rdma_create_qp_exï¼add " Leon Romanovsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=34234a57-9553-4193-a855-ee1ebbea3d6e@linux.dev \
    --to=yanjun.zhu@linux.dev \
    --cc=jinwenbinxue@163.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=lizhijian@fujitsu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox