代码拉取完成,页面将自动刷新
From 259092f39041968a07b395c43ed9cd26250215d9 Mon Sep 17 00:00:00 2001
From: hantwofish <hankangkang5@huawei.com>
Date: Tue, 18 Jun 2024 11:29:58 +0800
Subject: [PATCH] [virtio]: flow_bifurcation switch
---
src/lstack/core/lstack_cfg.c | 12 ++++++++++++
src/lstack/include/lstack_cfg.h | 1 +
2 files changed, 13 insertions(+)
diff --git a/src/lstack/core/lstack_cfg.c b/src/lstack/core/lstack_cfg.c
index 56f290e..f0c5f4f 100644
--- a/src/lstack/core/lstack_cfg.c
+++ b/src/lstack/core/lstack_cfg.c
@@ -86,6 +86,7 @@ static int32_t parse_nic_vlan_mode(void);
static int32_t parse_defaule_nonblock_mode(void);
static int32_t parse_rpc_msg_max(void);
static int32_t parse_send_cache_mode(void);
+static int32_t parse_flow_bifurcation(void);
#define PARSE_ARG(_arg, _arg_string, _default_val, _min_val, _max_val, _ret) \
do { \
@@ -152,6 +153,7 @@ static struct config_vector_t g_config_tbl[] = {
{ "nonblock_mode", parse_defaule_nonblock_mode },
{ "rpc_msg_max", parse_rpc_msg_max },
{ "send_cache_mode", parse_send_cache_mode },
+ { "flow_bifurcation", parse_flow_bifurcation},
{ NULL, NULL }
};
@@ -1393,3 +1395,13 @@ static int32_t parse_send_cache_mode(void)
return ret;
}
+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;
+}
diff --git a/src/lstack/include/lstack_cfg.h b/src/lstack/include/lstack_cfg.h
index b9721ff..9649d73 100644
--- a/src/lstack/include/lstack_cfg.h
+++ b/src/lstack/include/lstack_cfg.h
@@ -122,6 +122,7 @@ struct cfg_params {
bool nonblock_mode;
uint32_t rpc_msg_max;
bool send_cache_mode;
+ bool flow_bifurcation;
};
struct cfg_params *get_global_cfg_params(void);
--
2.33.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。