20 Star 0 Fork 32

openEuler-RISC-V/gazelle

forked from src-openEuler/gazelle 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0181-move-control_client_thread-creation-after-control_in.patch 1.14 KB
一键复制 编辑 原始数据 按行查看 历史
From 400c9f494c2217cba4ca48af83c53f36663dc066 Mon Sep 17 00:00:00 2001
From: kircher <majun65@huawei.com>
Date: Tue, 10 Jan 2023 20:11:05 +0800
Subject: [PATCH] move control_client_thread creation after control_in and
dpdk_skip_nic_init
---
src/lstack/core/lstack_init.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/lstack/core/lstack_init.c b/src/lstack/core/lstack_init.c
index 6347ab1..477c5e2 100644
--- a/src/lstack/core/lstack_init.c
+++ b/src/lstack/core/lstack_init.c
@@ -223,11 +223,14 @@ static void create_control_thread(void)
pthread_t tid;
if (use_ltran()) {
- ret = pthread_create(&tid, NULL, (void *(*)(void *))control_client_thread, NULL);
+ /*
+ * The function call here should be in strict order.
+ */
dpdk_skip_nic_init();
if (control_init_client(false) != 0) {
LSTACK_EXIT(1, "control_init_client failed\n");
}
+ ret = pthread_create(&tid, NULL, (void *(*)(void *))control_client_thread, NULL);
} else {
ret = pthread_create(&tid, NULL, (void *(*)(void *))control_server_thread, NULL);
ret = dpdk_eal_init();
--
2.33.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/openeuler-risc-v/gazelle.git
git@gitee.com:openeuler-risc-v/gazelle.git
openeuler-risc-v
gazelle
gazelle
master

搜索帮助