1 Star 0 Fork 32

hantwofish/gazelle_1

forked from src-openEuler/gazelle 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0200-cfg-del-unnecessary-logs.patch 3.20 KB
一键复制 编辑 原始数据 按行查看 历史
From b83a8ba5bb2f7f689cbdb404d3352bd039def160 Mon Sep 17 00:00:00 2001
From: yangchen <yangchen145@huawei.com>
Date: Thu, 20 Jun 2024 16:58:38 +0800
Subject: [PATCH] cfg: del unnecessary logs
---
src/lstack/core/lstack_cfg.c | 24 ++----------------------
1 file changed, 2 insertions(+), 22 deletions(-)
diff --git a/src/lstack/core/lstack_cfg.c b/src/lstack/core/lstack_cfg.c
index a1afe70..a5918f1 100644
--- a/src/lstack/core/lstack_cfg.c
+++ b/src/lstack/core/lstack_cfg.c
@@ -100,7 +100,7 @@ static int32_t parse_flow_bifurcation(void);
} \
int32_t _val = config_setting_get_int(_config_arg); \
if (_val < (_min_val) || _val > (_max_val)) { \
- LSTACK_PRE_LOG(LSTACK_ERR, "cfg %s %d invaild, range is [%d, %d].\n", \
+ LSTACK_PRE_LOG(LSTACK_ERR, "cfg %s %d invalid, range is [%d, %d].\n", \
(_arg_string), _val, (_min_val), (_max_val)); \
(_ret) = -EINVAL; \
break; \
@@ -1196,7 +1196,7 @@ static int parse_tuple_filter(void)
return 0;
}
if (g_config_params.use_ltran || g_config_params.listen_shadow) {
- LSTACK_LOG(ERR, LSTACK, "tuple filter and (ltran or listen_shadow) cannot be enabled at the same time\n");
+ LSTACK_LOG(ERR, LSTACK, "tuple filter and (ltran or listen_shadow) cannot be enabled at the same time\n");
return -EINVAL;
}
@@ -1356,10 +1356,6 @@ static int32_t parse_nic_vlan_mode(void)
{
int32_t ret;
PARSE_ARG(g_config_params.nic.vlan_mode, "nic_vlan_mode", -1, -1, 4094, ret);
- if (ret != 0) {
- LSTACK_PRE_LOG(LSTACK_ERR, "cfg: invalid vlan mode value %d ret=%d. only support -1~4094\n", \
- g_config_params.nic.vlan_mode, ret);
- }
return ret;
}
@@ -1367,10 +1363,6 @@ static int32_t parse_defaule_nonblock_mode(void)
{
int32_t ret;
PARSE_ARG(g_config_params.nonblock_mode, "nonblock_mode", 1, 0, 1, ret);
- if (ret != 0) {
- LSTACK_PRE_LOG(LSTACK_ERR, "cfg: invalid nonblock mode value %d. only support 0 or 1\n", \
- g_config_params.nonblock_mode);
- }
return ret;
}
@@ -1378,10 +1370,6 @@ static int32_t parse_rpc_msg_max(void)
{
int32_t ret;
PARSE_ARG(g_config_params.rpc_msg_max, "rpc_msg_max", 4096, 1, 8192, ret);
- if (ret != 0) {
- LSTACK_PRE_LOG(LSTACK_ERR, "cfg: invalid rpc msg max value %d ret=%d. only support 1~8192\n",
- g_config_params.rpc_msg_max, ret);
- }
return ret;
}
@@ -1389,10 +1377,6 @@ static int32_t parse_send_cache_mode(void)
{
int32_t ret;
PARSE_ARG(g_config_params.send_cache_mode, "send_cache_mode", 0, 0, 1, ret);
- if (ret != 0) {
- LSTACK_PRE_LOG(LSTACK_ERR, "cfg: invalid send cache mode value %d. only support 0 or 1\n",
- g_config_params.send_cache_mode);
- }
return ret;
}
@@ -1400,9 +1384,5 @@ static int32_t parse_flow_bifurcation(void)
{
int32_t ret;
PARSE_ARG(g_config_params.flow_bifurcation, "flow_bifurcation", 0, 0, 1, ret);
- if (ret != 0) {
- LSTACK_PRE_LOG(LSTACK_ERR, "cfg: invalid flow_bifurcation value %d. only support 0 or 1\n",
- g_config_params.flow_bifurcation);
- }
return ret;
}
--
2.33.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/hantwofish/gazelle_1.git
git@gitee.com:hantwofish/gazelle_1.git
hantwofish
gazelle_1
gazelle_1
master

搜索帮助