Re: [PATCH 1/2] RDMA/uverbs: Don't set rcq if qp_type is IB_QPT_XRC_INI

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

 



On 2021/1/16 3:23, Jason Gunthorpe wrote:
On Thu, Jan 14, 2021 at 04:58:30PM +0800, Xiao Yang wrote:
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@xxxxxxxxxxxxxx>
   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)
The write APIs can't be modified due to how they were
designed. Whenever someone needs to change something they have to move
things to ioctl
Hi Jason,

Could you explain that the write APIs can't be modified? :-)

Best Regards,
Xiao Yang
Jason


.







[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