
The shift size of current SQ WQE is based on the size of the SQ WQE structure of HIP06. When using HIP08, this value is unreasonable. So, use a more reasonable macro to replace it. Fixes: b6cd213b276f ("libhns: Refactor for creating qp") Signed-off-by: Chengchang Tang <tangchengchang@huawei.com> --- providers/hns/hns_roce_u_verbs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/providers/hns/hns_roce_u_verbs.c b/providers/hns/hns_roce_u_verbs.c index e88a5af1..e3c5e521 100644 --- a/providers/hns/hns_roce_u_verbs.c +++ b/providers/hns/hns_roce_u_verbs.c @@ -1041,8 +1041,7 @@ static void hns_roce_set_qp_params(struct ibv_qp_init_attr_ex *attr, } if (attr->cap.max_send_wr) { - qp->sq.wqe_shift = - hr_ilog32(sizeof(struct hns_roce_rc_send_wqe)); + qp->sq.wqe_shift = HNS_ROCE_SQWQE_SHIFT; cnt = roundup_pow_of_two(attr->cap.max_send_wr); qp->sq.wqe_cnt = cnt; qp->sq.shift = hr_ilog32(cnt); -- 2.33.0