1 Star 0 Fork 32

jinag12/gazelle_1

forked from src-openEuler/gazelle 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0138-fix-coreddump-when-stack-setup-failed-in-rtc-mode.patch 2.01 KB
一键复制 编辑 原始数据 按行查看 历史
From 52fafeafd51ed5363081064076dff4ed276a99c1 Mon Sep 17 00:00:00 2001
From: jiangheng <jiangheng14@huawei.com>
Date: Thu, 22 Feb 2024 21:22:44 +0800
Subject: [PATCH] fix coreddump when stack setup failed in rtc mode
---
src/lstack/api/lstack_rtc_api.c | 6 +++---
src/lstack/core/lstack_init.c | 11 +++++------
2 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/src/lstack/api/lstack_rtc_api.c b/src/lstack/api/lstack_rtc_api.c
index d29e51e..2e10e30 100644
--- a/src/lstack/api/lstack_rtc_api.c
+++ b/src/lstack/api/lstack_rtc_api.c
@@ -45,7 +45,7 @@ int rtc_socket(int domain, int type, int protocol)
int ret;
if (stack_setup_app_thread() < 0) {
- LSTACK_EXIT(1, "stack_setup_app_thread failed!\n");
+ exit(1);
}
/* need call stack thread init function */
@@ -74,7 +74,7 @@ int rtc_shutdown(int fd, int how)
int rtc_epoll_create(int flags)
{
if (stack_setup_app_thread() < 0) {
- LSTACK_EXIT(1, "stack_setup_app_thread failed!\n");
+ exit(1);
}
return lstack_epoll_create(flags);
@@ -83,7 +83,7 @@ int rtc_epoll_create(int flags)
int rtc_epoll_create1(int flags)
{
if (stack_setup_app_thread() < 0) {
- LSTACK_EXIT(1, "stack_setup_app_thread failed!\n");
+ exit(1);
}
return lstack_epoll_create1(flags);
diff --git a/src/lstack/core/lstack_init.c b/src/lstack/core/lstack_init.c
index 31fd91d..bd9ba8a 100644
--- a/src/lstack/core/lstack_init.c
+++ b/src/lstack/core/lstack_init.c
@@ -109,12 +109,11 @@ static int32_t check_process_conflict(void)
void gazelle_exit(void)
{
- if (!get_global_cfg_params()->stack_mode_rtc) {
- wrap_api_set_dummy();
- /* 1: wait until app thread call send functio complete */
- sleep(1);
- stack_group_exit();
- }
+ wrap_api_set_dummy();
+ /* 1: wait until app thread call send functio complete */
+ sleep(1);
+ stack_group_exit();
+
if (!use_ltran()) {
#if RTE_VERSION < RTE_VERSION_NUM(23, 11, 0, 0)
dpdk_kni_release();
--
2.27.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/jiangheng12/gazelle_1.git
git@gitee.com:jiangheng12/gazelle_1.git
jiangheng12
gazelle_1
gazelle_1
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385