From 2194680136400d6a5f12298ff4993fa6f51c2e10 Mon Sep 17 00:00:00 2001 From: Lang Cheng Date: Wed, 8 Dec 2021 19:03:56 +0800 Subject: libhns: Forcibly rewrite the strong-order flag of WQE The Local Invalid operation sets so flag, otherwise clears so flag. Fixes: a9ae7e9bfb5d ("libhns: Add local invalidate MR support for hip08") Signed-off-by: Lang Cheng Signed-off-by: Wenpeng Liang --- providers/hns/hns_roce_u_hw_v2.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/providers/hns/hns_roce_u_hw_v2.c b/providers/hns/hns_roce_u_hw_v2.c index 4eaa929..cf871ab 100644 --- a/providers/hns/hns_roce_u_hw_v2.c +++ b/providers/hns/hns_roce_u_hw_v2.c @@ -1143,10 +1143,6 @@ static int set_rc_wqe(void *wqe, struct hns_roce_qp *qp, struct ibv_send_wr *wr, struct hns_roce_v2_wqe_data_seg *dseg; int ret; - ret = check_rc_opcode(rc_sq_wqe, wr); - if (ret) - return ret; - roce_set_bit(rc_sq_wqe->byte_4, RC_SQ_WQE_BYTE_4_CQE_S, !!(wr->send_flags & IBV_SEND_SIGNALED)); roce_set_bit(rc_sq_wqe->byte_4, RC_SQ_WQE_BYTE_4_FENCE_S, @@ -1155,6 +1151,11 @@ static int set_rc_wqe(void *wqe, struct hns_roce_qp *qp, struct ibv_send_wr *wr, !!(wr->send_flags & IBV_SEND_SOLICITED)); roce_set_bit(rc_sq_wqe->byte_4, RC_SQ_WQE_BYTE_4_INLINE_S, !!(wr->send_flags & IBV_SEND_INLINE)); + roce_set_bit(rc_sq_wqe->byte_4, RC_SQ_WQE_BYTE_4_SO_S, 0); + + ret = check_rc_opcode(rc_sq_wqe, wr); + if (ret) + return ret; roce_set_field(rc_sq_wqe->byte_20, RC_SQ_WQE_BYTE_20_MSG_START_SGE_IDX_M, -- 2.27.0