1 Star 0 Fork 75

sky/dpdk

forked from src-openEuler/dpdk 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0009-dpdk-fix-error-in-clearing-secondary-process-memseg-lists.patch 1.07 KB
一键复制 编辑 原始数据 按行查看 历史
吴昌盛 提交于 2021-12-25 17:37 . add gazelle support
From 9a4c67c47896fb9aa0fd8935813f2016b543a9df Mon Sep 17 00:00:00 2001
From: Changsheng Wu <wuchangsheng2@huawei.com>
Date: Sat, 18 Dec 2021 16:45:51 +0800
Subject: [PATCH]
huawei-0008-dpdk-fix-error-in-clearing-secondary-process-memseg-lists
---
lib/eal/common/eal_common_fbarray.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/lib/eal/common/eal_common_fbarray.c b/lib/eal/common/eal_common_fbarray.c
index 9c125c104c..d4a4cea7c1 100644
--- a/lib/eal/common/eal_common_fbarray.c
+++ b/lib/eal/common/eal_common_fbarray.c
@@ -1102,7 +1102,7 @@ int
rte_sec_fbarray_destroy(struct rte_fbarray *arr,
const int sec_idx)
{
- int fd, ret;
+ int fd;
char path[PATH_MAX];
if (arr == NULL) {
@@ -1128,15 +1128,13 @@ rte_sec_fbarray_destroy(struct rte_fbarray *arr,
if (flock(fd, LOCK_EX | LOCK_NB)) {
RTE_LOG(DEBUG, EAL, "Cannot destroy fbarray - another process is using it\n");
rte_errno = EBUSY;
- ret = -1;
} else {
- ret = 0;
unlink(path);
memset(arr, 0, sizeof(*arr));
}
close(fd);
- return ret;
+ return 0;
}
void *
--
2.27.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/nlgwcy/dpdk.git
git@gitee.com:nlgwcy/dpdk.git
nlgwcy
dpdk
dpdk
master

搜索帮助