gazelle/0305-cfg-notify-that-it-s-unsupported-when-stack_num-1.patch
yinbin6 b0d5ff21f3 sync cfg: notify that it's unsupported, when stack_num > 1
(cherry picked from commit b1760d0d313fd266303f70595be2f6e2f38a5c68)
2024-12-11 17:39:53 +08:00

33 lines
910 B
Diff

From e03be16e5deab1f8cdaf1ec6b6097184c643063d Mon Sep 17 00:00:00 2001
From: yangchen <yangchen145@huawei.com>
Date: Wed, 11 Dec 2024 10:50:39 +0800
Subject: [PATCH] cfg: notify that it's unsupported, when stack_num > 1
---
src/lstack/core/lstack_cfg.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/lstack/core/lstack_cfg.c b/src/lstack/core/lstack_cfg.c
index 7545726..48408d1 100644
--- a/src/lstack/core/lstack_cfg.c
+++ b/src/lstack/core/lstack_cfg.c
@@ -509,6 +509,15 @@ static int32_t parse_stack_num(void)
{
int32_t ret;
PARSE_ARG(g_config_params.stack_num, "stack_num", 0, 0, 320, ret);
+ if (ret != 0) {
+ return ret;
+ }
+
+ if (g_config_params.stack_num > 1) {
+ LSTACK_LOG(ERR, LSTACK, "Multi stacks bound to numa are not supported currently. Please set stack_num <= 1.\n");
+ return -EINVAL;
+ }
+
return ret;
}
--
2.33.0