47 lines
1.5 KiB
Diff
47 lines
1.5 KiB
Diff
|
|
From 22beeec9a0d8272fc4db60275ee4eee890068102 Mon Sep 17 00:00:00 2001
|
||
|
|
From: Luoyouming <luoyouming@huawei.com>
|
||
|
|
Date: Tue, 11 Oct 2022 10:21:24 +0800
|
||
|
|
Subject: [PATCH v4 08/10] libhns: RQ inline support wc_x_poll_cq interface
|
||
|
|
|
||
|
|
RQ inline support user use wc_x_poll_cq get data.
|
||
|
|
|
||
|
|
Signed-off-by: Luoyouming <luoyouming@huawei.com>
|
||
|
|
Reviewed-by: Yangyang Li <liyangyang20@huawei.com>
|
||
|
|
---
|
||
|
|
providers/hns/hns_roce_u_hw_v2.c | 9 +++++++--
|
||
|
|
1 file changed, 7 insertions(+), 2 deletions(-)
|
||
|
|
|
||
|
|
diff --git a/providers/hns/hns_roce_u_hw_v2.c b/providers/hns/hns_roce_u_hw_v2.c
|
||
|
|
index b37ea92..25d8861 100644
|
||
|
|
--- a/providers/hns/hns_roce_u_hw_v2.c
|
||
|
|
+++ b/providers/hns/hns_roce_u_hw_v2.c
|
||
|
|
@@ -561,10 +561,15 @@ static void cqe_proc_srq(struct hns_roce_srq *srq, uint32_t wqe_idx,
|
||
|
|
hns_roce_free_srq_wqe(srq, wqe_idx);
|
||
|
|
}
|
||
|
|
|
||
|
|
-static void cqe_proc_rq(struct hns_roce_wq *wq, struct hns_roce_cq *cq)
|
||
|
|
+static void cqe_proc_rq(struct hns_roce_qp *hr_qp, struct hns_roce_cq *cq)
|
||
|
|
{
|
||
|
|
+ struct hns_roce_wq *wq = &hr_qp->rq;
|
||
|
|
+
|
||
|
|
cq->verbs_cq.cq_ex.wr_id = wq->wrid[wq->tail & (wq->wqe_cnt - 1)];
|
||
|
|
++wq->tail;
|
||
|
|
+
|
||
|
|
+ if (hr_reg_read(cq->cqe, CQE_RQ_INLINE))
|
||
|
|
+ handle_recv_rq_inl(cq->cqe, hr_qp);
|
||
|
|
}
|
||
|
|
|
||
|
|
static int cqe_proc_wq(struct hns_roce_context *ctx, struct hns_roce_qp *qp,
|
||
|
|
@@ -584,7 +589,7 @@ static int cqe_proc_wq(struct hns_roce_context *ctx, struct hns_roce_qp *qp,
|
||
|
|
if (srq)
|
||
|
|
cqe_proc_srq(srq, wqe_idx, cq);
|
||
|
|
else
|
||
|
|
- cqe_proc_rq(&qp->rq, cq);
|
||
|
|
+ cqe_proc_rq(qp, cq);
|
||
|
|
}
|
||
|
|
|
||
|
|
return 0;
|
||
|
|
--
|
||
|
|
2.30.0
|
||
|
|
|