From b83a8ba5bb2f7f689cbdb404d3352bd039def160 Mon Sep 17 00:00:00 2001 From: yangchen 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