Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a49d761f authored by oulijun's avatar oulijun Committed by Doug Ledford
Browse files

RDMA/hns: Enable the cqe field of sqwqe of RC



When sig_type of qpc is non-selectable, all sq's wqes will produce
cqe and not depend on the cqe attribute of wqe. When sig_type of
qpc is selectable, The cqe attribute of wqe will decide whether to
produce the cqe.

Signed-off-by: default avatarLijun Ou <oulijun@huawei.com>
Signed-off-by: default avatarWei Hu (Xavier) <xavier.huwei@huawei.com>
Signed-off-by: default avatarShaobo Xu <xushaobo2@huawei.com>
Signed-off-by: default avatarYixian Liu <liuyixian@huawei.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent 492b2bd0
Loading
Loading
Loading
Loading
+3 −2
Original line number Original line Diff line number Diff line
@@ -117,6 +117,9 @@ static int hns_roce_v2_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
		roce_set_bit(rc_sq_wqe->byte_4, V2_RC_SEND_WQE_BYTE_4_SE_S,
		roce_set_bit(rc_sq_wqe->byte_4, V2_RC_SEND_WQE_BYTE_4_SE_S,
			    (wr->send_flags & IB_SEND_SOLICITED) ? 1 : 0);
			    (wr->send_flags & IB_SEND_SOLICITED) ? 1 : 0);


		roce_set_bit(rc_sq_wqe->byte_4, V2_RC_SEND_WQE_BYTE_4_CQE_S,
			    (wr->send_flags & IB_SEND_SIGNALED) ? 1 : 0);

		switch (wr->opcode) {
		switch (wr->opcode) {
		case IB_WR_RDMA_READ:
		case IB_WR_RDMA_READ:
			roce_set_field(rc_sq_wqe->byte_4,
			roce_set_field(rc_sq_wqe->byte_4,
@@ -198,8 +201,6 @@ static int hns_roce_v2_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
			break;
			break;
		}
		}


		roce_set_bit(rc_sq_wqe->byte_4, V2_RC_SEND_WQE_BYTE_4_CQE_S, 1);

		wqe += sizeof(struct hns_roce_v2_rc_send_wqe);
		wqe += sizeof(struct hns_roce_v2_rc_send_wqe);
		dseg = wqe;
		dseg = wqe;
		if (wr->send_flags & IB_SEND_INLINE && wr->num_sge) {
		if (wr->send_flags & IB_SEND_INLINE && wr->num_sge) {