Thread (8 messages) 8 messages, 2 authors, 2021-01-21

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

From: Jason Gunthorpe <jgg@nvidia.com>
Date: 2021-01-12 21:44:30

On Wed, Dec 16, 2020 at 03:17:54PM +0800, Xiao Yang wrote:
quoted hunk ↗ jump to hunk
INI QP doesn't require receive CQ.

Signed-off-by: Xiao Yang <redacted>
 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?

Jason
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help