All of lore.kernel.org
 help / color / mirror / Atom feed
From: Xiao Yang <yangx.jy@cn.fujitsu.com>
To: Jason Gunthorpe <jgg@nvidia.com>
Cc: Yishai Hadas <yishaih@nvidia.com>, <linux-rdma@vger.kernel.org>,
	<leon@kernel.org>
Subject: Re: [PATCH 1/2] RDMA/uverbs: Don't set rcq if qp_type is IB_QPT_XRC_INI
Date: Thu, 14 Jan 2021 16:58:30 +0800	[thread overview]
Message-ID: <600007B6.1070606@cn.fujitsu.com> (raw)
In-Reply-To: <20210112200925.GA20208@nvidia.com>

On 2021/1/13 4:09, Jason Gunthorpe wrote:
> On Wed, Dec 16, 2020 at 03:17:54PM +0800, Xiao Yang wrote:
>> INI QP doesn't require receive CQ.
>>
>> Signed-off-by: Xiao Yang<yangx.jy@cn.fujitsu.com>
>>   drivers/infiniband/core/uverbs_cmd.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c
>> index 418d133a8fb0..d8bc8ea3ad1e 100644
>> +++ b/drivers/infiniband/core/uverbs_cmd.c
>> @@ -1345,7 +1345,7 @@ static int create_qp(struct uverbs_attr_bundle *attrs,
>>   		if (has_sq)
>>   			scq = uobj_get_obj_read(cq, UVERBS_OBJECT_CQ,
>>   						cmd->send_cq_handle, attrs);
>> -		if (!ind_tbl)
>> +		if (!ind_tbl&&  cmd->qp_type != IB_QPT_XRC_INI)
>>   			rcq = rcq ?: scq;
> Hmm, this does make it consistent with the UVERBS_METHOD_QP_CREATE
> flow which does set attr.recv_cq to NULL if the user didn't specify one.
>
> However this has been like this since the beginning - what are you
> doing that this detail matters?
Hi Jason,

Thanks for your comment.
1) I didn't get any issue for now.
2) I think it is not meaningful to set rcq for XRC INITIATOR QP, current 
code has ignores rcq as below:
-------------------------------------------------
static int create_qp(struct uverbs_attr_bundle *attrs,
                     struct ib_uverbs_ex_create_qp *cmd)
...
                 if (cmd->qp_type == IB_QPT_XRC_INI) {
                         cmd->max_recv_wr = 0;
                         cmd->max_recv_sge = 0;
...
-------------------------------------------------

By the way, I have a question:
Why do we need two kinds of uverbs API?(a: read & write, b: ioctl)

Best Regards,
Xiao Yang
> Jason
>
>
> .
>




  reply	other threads:[~2021-01-14  8:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-16  7:17 [PATCH 1/2] RDMA/uverbs: Don't set rcq if qp_type is IB_QPT_XRC_INI Xiao Yang
2020-12-16  7:17 ` [PATCH 2/2] RDMA/rxe: Add check for supported QP types Xiao Yang
2021-01-12 20:15   ` Jason Gunthorpe
2021-01-12 20:09 ` [PATCH 1/2] RDMA/uverbs: Don't set rcq if qp_type is IB_QPT_XRC_INI Jason Gunthorpe
2021-01-14  8:58   ` Xiao Yang [this message]
2021-01-15 19:23     ` Jason Gunthorpe
2021-01-18  7:58       ` Xiao Yang
2021-01-21 17:05 ` Jason Gunthorpe

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=600007B6.1070606@cn.fujitsu.com \
    --to=yangx.jy@cn.fujitsu.com \
    --cc=jgg@nvidia.com \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=yishaih@nvidia.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 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.