代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/gazelle 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From cc9db5e298dab1c1bac927464538ba51da07d9c6 Mon Sep 17 00:00:00 2001
From: wu-changsheng <wuchangsheng2@huawei.com>
Date: Sat, 8 Oct 2022 10:55:05 +0800
Subject: [PATCH 14/21] support dpdk dynamic memory
---
src/lstack/core/lstack_cfg.c | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/src/lstack/core/lstack_cfg.c b/src/lstack/core/lstack_cfg.c
index b6a517b..19a5b30 100644
--- a/src/lstack/core/lstack_cfg.c
+++ b/src/lstack/core/lstack_cfg.c
@@ -192,7 +192,6 @@ static int32_t parse_devices(void)
static int32_t get_param_idx(int32_t argc, char **argv, const char *param)
{
- int32_t ret;
int32_t idx;
if ((argc <= 0) || (argv == NULL) || (param == NULL)) {
@@ -200,8 +199,7 @@ static int32_t get_param_idx(int32_t argc, char **argv, const char *param)
}
for (idx = 0; idx < argc; ++idx) {
- ret = strncmp(argv[idx], param, strlen(param));
- if (ret == 0) {
+ if (strncmp(argv[idx], param, strlen(param)) == 0) {
return idx;
}
}
@@ -249,6 +247,7 @@ static int32_t parse_stack_cpu_number(void)
if (args == NULL) {
return -EINVAL;
}
+
if (!have_corelist_arg(g_config_params.dpdk_argc, g_config_params.dpdk_argv)) {
int32_t idx = get_param_idx(g_config_params.dpdk_argc, g_config_params.dpdk_argv, OPT_BIND_CORELIST);
if (idx < 0) {
@@ -465,12 +464,15 @@ static int32_t turn_args_to_config(int32_t argc, char **argv)
// OPT_SOCKET_MEM
idx = get_param_idx(argc, argv, OPT_SOCKET_MEM);
if ((idx < 0) || (idx + 1 >= argc)) {
- LSTACK_LOG(ERR, LSTACK, "Cannot find param %s\n", OPT_SOCKET_MEM);
- return idx;
- }
- ret = gazelle_parse_socket_mem(argv[idx + 1], &g_config_params.sec_attach_arg);
- if (ret < 0) {
- return ret;
+ if (use_ltran()) {
+ LSTACK_LOG(ERR, LSTACK, "Cannot find param %s\n", OPT_SOCKET_MEM);
+ return idx;
+ }
+ } else {
+ ret = gazelle_parse_socket_mem(argv[idx + 1], &g_config_params.sec_attach_arg);
+ if (ret < 0) {
+ return ret;
+ }
}
// OPT_BASE_VIRTADDR
--
2.23.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。