Minor fix and cleanup. Junxian Huang (2): libhns: Fix wrong WQE data when QP wraps around libhns: Clean up an extra blank line providers/hns/hns_roce_u_hw_v2.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 2.33.0
DirectWQE fields are not assigned or cleared explicitly when DirectWQE not used. When QP wraps around, data in these fields from the previous use at the same position still remains and are issued to HW by mistake. Clear these fields before issuing doorbell to HW. Fixes: 159933c37450 ("libhns: Add support for direct wqe") Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com> --- providers/hns/hns_roce_u_hw_v2.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/providers/hns/hns_roce_u_hw_v2.c b/providers/hns/hns_roce_u_hw_v2.c index da8451534..e2f61fcea 100644 --- a/providers/hns/hns_roce_u_hw_v2.c +++ b/providers/hns/hns_roce_u_hw_v2.c @@ -1374,6 +1374,9 @@ int hns_roce_u_v2_post_send(struct ibv_qp *ibvqp, struct ibv_send_wr *wr, wqe = get_send_wqe(qp, wqe_idx); qp->sq.wrid[wqe_idx] = wr->wr_id; + /* RC and UD share the same DirectWQE field layout */ + ((struct hns_roce_rc_sq_wqe *)wqe)->byte_4 = 0; + switch (ibvqp->qp_type) { case IBV_QPT_XRC_SEND: hr_reg_write(wqe, RCWQE_XRC_SRQN, -- 2.33.0
Clean up an extra blank line. Fixes: b47932358e64 ("libhns: Fix the sge num problem of atomic op") Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com> --- providers/hns/hns_roce_u_hw_v2.c | 1 - 1 file changed, 1 deletion(-) diff --git a/providers/hns/hns_roce_u_hw_v2.c b/providers/hns/hns_roce_u_hw_v2.c index e2f61fcea..b9bd3bd0b 100644 --- a/providers/hns/hns_roce_u_hw_v2.c +++ b/providers/hns/hns_roce_u_hw_v2.c @@ -2203,7 +2203,6 @@ static void wr_set_sge_list_rc(struct ibv_qp_ex *ibv_qp, size_t num_sge, return; } - hr_reg_write(wqe, RCWQE_MSG_START_SGE_IDX, qp->sge_info.start_idx & (qp->ex_sge.sge_cnt - 1)); -- 2.33.0
participants (1)
-
Junxian Huang