Skip to content

Commit 754e098

Browse files
authored
Merge pull request #1652 from hginjgerx/fix
libhns: Minor fix and cleanup
2 parents 2671a14 + 19bd0c8 commit 754e098

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

providers/hns/hns_roce_u_hw_v2.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1370,6 +1370,9 @@ int hns_roce_u_v2_post_send(struct ibv_qp *ibvqp, struct ibv_send_wr *wr,
13701370
wqe = get_send_wqe(qp, wqe_idx);
13711371
qp->sq.wrid[wqe_idx] = wr->wr_id;
13721372

1373+
/* RC and UD share the same DirectWQE field layout */
1374+
((struct hns_roce_rc_sq_wqe *)wqe)->byte_4 = 0;
1375+
13731376
switch (ibvqp->qp_type) {
13741377
case IBV_QPT_XRC_SEND:
13751378
hr_reg_write(wqe, RCWQE_XRC_SRQN,
@@ -2196,7 +2199,6 @@ static void wr_set_sge_list_rc(struct ibv_qp_ex *ibv_qp, size_t num_sge,
21962199
return;
21972200
}
21982201

2199-
22002202
hr_reg_write(wqe, RCWQE_MSG_START_SGE_IDX,
22012203
qp->sge_info.start_idx & (qp->ex_sge.sge_cnt - 1));
22022204

0 commit comments

Comments
 (0)