Skip to content

Commit

Permalink
Merge pull request #483 from oulijun/lijun-rdma-core
Browse files Browse the repository at this point in the history
libhns: limit minimum ROCE CQ depth to 64
  • Loading branch information
rleon committed Mar 18, 2019
2 parents 23fff44 + cefc812 commit 43adee5
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions providers/hns/hns_roce_u_verbs.c
Original file line number Diff line number Diff line change
Expand Up @@ -301,19 +301,11 @@ static void hns_roce_set_sq_sizes(struct hns_roce_qp *qp,

static int hns_roce_verify_cq(int *cqe, struct hns_roce_context *context)
{
struct hns_roce_device *hr_dev =
to_hr_dev(context->ibv_ctx.context.device);

if (*cqe < 1 || *cqe > context->max_cqe)
return -1;

if (hr_dev->hw_version == HNS_ROCE_HW_VER1)
if (*cqe < HNS_ROCE_MIN_CQE_NUM) {
fprintf(stderr,
"cqe = %d, less than minimum CQE number.\n",
*cqe);
*cqe = HNS_ROCE_MIN_CQE_NUM;
}
if (*cqe < HNS_ROCE_MIN_CQE_NUM)
*cqe = HNS_ROCE_MIN_CQE_NUM;

return 0;
}
Expand Down

0 comments on commit 43adee5

Please sign in to comment.