34 lines
1.1 KiB
Diff
34 lines
1.1 KiB
Diff
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
|
|
|