1 Star 0 Fork 52

tianx/rdma-core

forked from src-openEuler/rdma-core 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0040-libhns-Fix-memory-leakage-when-DCA-is-enabled.patch 1.21 KB
一键复制 编辑 原始数据 按行查看 历史
Xinghai Cen 提交于 2025-01-17 16:43 +08:00 . libhns: Fix missing fields for SRQ WC
From af20dd32df73ff72d35a430a5fb87ac42d70cdf4 Mon Sep 17 00:00:00 2001
From: wenglianfa <wenglianfa@huawei.com>
Date: Thu, 25 Jul 2024 11:06:01 +0800
Subject: [PATCH] libhns: Fix memory leakage when DCA is enabled
driver inclusion
category: feature
bugzilla: https://gitee.com/src-openeuler/rdma-core/issues/IB66RT
------------------------------------------------------------------
After DCA is enabled and a QP is created, the memory block
applied for DCA is not free when the QP is destroyed. Here
fix it.
Fixes: 2783884a97e7 ("libhns: Add support for attaching QP's WQE buffer")
Signed-off-by: wenglianfa <wenglianfa@huawei.com>
Signed-off-by: Xinghai Cen <cenxinghai@h-partners.com>
---
providers/hns/hns_roce_u_verbs.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/providers/hns/hns_roce_u_verbs.c b/providers/hns/hns_roce_u_verbs.c
index e30880c..c733b21 100644
--- a/providers/hns/hns_roce_u_verbs.c
+++ b/providers/hns/hns_roce_u_verbs.c
@@ -1357,7 +1357,8 @@ static void qp_free_wqe(struct hns_roce_qp *qp)
if (qp->rq.wqe_cnt)
free(qp->rq.wrid);
- hns_roce_free_buf(&qp->buf);
+ else
+ hns_roce_free_buf(&qp->buf);
}
static int qp_alloc_wqe(struct ibv_qp_init_attr_ex *attr,
--
2.33.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/OGman/rdma-core.git
git@gitee.com:OGman/rdma-core.git
OGman
rdma-core
rdma-core
master

搜索帮助