37 lines
1.3 KiB
Diff
37 lines
1.3 KiB
Diff
From 0f3a61700b17bed0ed39c7c5433952b72dc82b84 Mon Sep 17 00:00:00 2001
|
|
From: jiangheng <jiangheng14@huawei.com>
|
|
Date: Wed, 20 Nov 2024 11:26:55 +0800
|
|
Subject: [PATCH] fix socket of control thread is overwirtten due to another
|
|
primary process start
|
|
|
|
---
|
|
src/lstack/core/lstack_init.c | 8 ++++----
|
|
1 file changed, 4 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/src/lstack/core/lstack_init.c b/src/lstack/core/lstack_init.c
|
|
index 276cdf8..29796ee 100644
|
|
--- a/src/lstack/core/lstack_init.c
|
|
+++ b/src/lstack/core/lstack_init.c
|
|
@@ -166,14 +166,14 @@ static void create_control_thread(void)
|
|
LSTACK_EXIT(1, "pthread_create failed ret=%d errno=%d\n", ret, errno);
|
|
}
|
|
} else {
|
|
- ret = pthread_create(&tid, NULL, (void *(*)(void *))control_server_thread, NULL);
|
|
- if (ret != 0) {
|
|
- LSTACK_EXIT(1, "pthread_create failed ret=%d errno=%d\n", ret, errno);
|
|
- }
|
|
ret = dpdk_eal_init();
|
|
if (ret < 0) {
|
|
LSTACK_EXIT(1, "dpdk_eal_init failed ret=%d errno=%d\n", ret, errno);
|
|
}
|
|
+ ret = pthread_create(&tid, NULL, (void *(*)(void *))control_server_thread, NULL);
|
|
+ if (ret != 0) {
|
|
+ LSTACK_EXIT(1, "pthread_create failed ret=%d errno=%d\n", ret, errno);
|
|
+ }
|
|
}
|
|
|
|
if (pthread_setname_np(tid, CONTROL_THREAD_NAME) != 0) {
|
|
--
|
|
2.33.0
|
|
|