Skip to content

Commit

Permalink
libhns: Fix the shift size of SQ WQE
Browse files Browse the repository at this point in the history
[ Upstream commit 847336b ]

Currently, the shift size of SQ WQE is based on the size of the SQ WQE
structure of HIP06. Although the size of SQ WQE of HIP08 is the same as
the size of SQ WQE of HIP06, it is not a correct way for HIP08 to use the
structure of HIP06 to define the size of SQ WQE.

Fixes: b6cd213 ("libhns: Refactor for creating qp")
Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com>
Signed-off-by: Nicolas Morey-Chaisemartin <nmoreychaisemartin@suse.com>
  • Loading branch information
Chengchang Tang authored and nmorey committed Apr 29, 2022
1 parent ae2dacc commit a366b25
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions providers/hns/hns_roce_u_verbs.c
Original file line number Diff line number Diff line change
Expand Up @@ -756,8 +756,7 @@ static void hns_roce_set_qp_params(struct ibv_qp_init_attr *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);
Expand Down

0 comments on commit a366b25

Please sign in to comment.