提交 dcd33c6b 编写于 作者: W Wenpeng Liang 提交者: Xie XiuQi

RDMA/hns: Correct the value of srq_desc_size

driver inclusion
category: bugfix
bugzilla: NA
CVE: NA

The original value is an integer value less than log2, which
will lead to erroneous calculation. The current value is an
integer value greater than log2.

Feature or Bugfix:Bugfix
Signed-off-by: NWenpeng Liang <liangwenpeng@huawei.com>
Reviewed-by: Nliuyixian <liuyixian@huawei.com>
Reviewed-by: Nliweihang <liweihang@hisilicon.com>
Reviewed-by: NYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 4cd1e33b
......@@ -458,6 +458,7 @@ struct ib_srq *hns_roce_create_srq(struct ib_pd *pd,
srq->max_gs = srq_init_attr->attr.max_sge + HNS_ROCE_RESERVED_SGE;
srq_desc_size = max(HNS_ROCE_SGE_SIZE, HNS_ROCE_SGE_SIZE * srq->max_gs);
srq_desc_size = roundup_pow_of_two(srq_desc_size);
srq->wqe_shift = ilog2(srq_desc_size);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册