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)
Best Regards,
Xiao Yang
Jason
.