Skip to content

Commit

Permalink
providers/irdma: Fix the number of CQEs attribute returned in create_…
Browse files Browse the repository at this point in the history
…ex CQ.

[ Upstream commit 2796a42 ]

When an application creates extended CQ, irdma library modifies
the attribute attr_ex->cqe by doubling it to accommodate
for immediate data. This number should not be reported back to
the application. Fix this by restoring the attr_ex->cqe to the
original value.

Unit tests CqExOpTest.BasicPollSend/RecvCq are seeing this
issue, i.e. CQ create failed since the application created
the second CQE with 2 * max CQ size.

Fixes: 14a0fc8 ("rdma-core/irdma: Implement device supported verb APIs")
Signed-off-by: Tatyana Nikolova <tatyana.e.nikolova@intel.com>
Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
Signed-off-by: Nicolas Morey <nmorey@suse.com>
  • Loading branch information
tatyana-en authored and nmorey committed May 30, 2024
1 parent 05e42ae commit 6cc40f8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions providers/irdma/uverbs.c
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,7 @@ static struct ibv_cq_ex *ucreate_cq(struct ibv_context *context,
ret = ibv_cmd_create_cq_ex(context, attr_ex, &iwucq->verbs_cq,
&cmd.ibv_cmd, sizeof(cmd), &resp.ibv_resp,
sizeof(resp), 0);
attr_ex->cqe = ncqe;
if (ret) {
errno = ret;
goto err_dereg_shadow;
Expand Down

0 comments on commit 6cc40f8

Please sign in to comment.