1 Star 0 Fork 46

zhangwenlong01/rdma-core

forked from src-openEuler/rdma-core 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0008-libhns-RQ-inline-support-wc_x_poll_cq-interface.patch 1.45 KB
一键复制 编辑 原始数据 按行查看 历史
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
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zhangwenlong01/rdma-core.git
git@gitee.com:zhangwenlong01/rdma-core.git
zhangwenlong01
rdma-core
rdma-core
master

搜索帮助