Skip to content

Commit 7ac4304

Browse files
Junxian Huangnmorey
authored andcommitted
libhns: Fix wrong WQE data in new post send API when QP wraps around
[ Upstream commit 20147f9 ] The modification in the fixes commit should also be applied to new post send API. Fixes: 15adbcf ("libhns: Fix wrong WQE data when QP wraps around") Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com> Signed-off-by: Nicolas Morey <nmorey@suse.com>
1 parent 8dd1696 commit 7ac4304

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

providers/hns/hns_roce_u_hw_v2.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2033,6 +2033,7 @@ init_rc_wqe(struct hns_roce_qp *qp, uint64_t wr_id, unsigned int opcode)
20332033
wqe_idx = qp->sq.head & (qp->sq.wqe_cnt - 1);
20342034
wqe = get_send_wqe(qp, wqe_idx);
20352035

2036+
wqe->byte_4 = 0;
20362037
hr_reg_write(wqe, RCWQE_OPCODE, opcode);
20372038
hr_reg_write_bool(wqe, RCWQE_CQE, send_flags & IBV_SEND_SIGNALED);
20382039
hr_reg_write_bool(wqe, RCWQE_FENCE, send_flags & IBV_SEND_FENCE);
@@ -2355,6 +2356,7 @@ init_ud_wqe(struct hns_roce_qp *qp, uint64_t wr_id, unsigned int opcode)
23552356
wqe_idx = qp->sq.head & (qp->sq.wqe_cnt - 1);
23562357
wqe = get_send_wqe(qp, wqe_idx);
23572358

2359+
wqe->rsv_opcode = 0;
23582360
hr_reg_write(wqe, UDWQE_OPCODE, opcode);
23592361
hr_reg_write_bool(wqe, UDWQE_CQE, send_flags & IBV_SEND_SIGNALED);
23602362
hr_reg_write_bool(wqe, UDWQE_SE, send_flags & IBV_SEND_SOLICITED);

0 commit comments

Comments
 (0)