代码拉取完成,页面将自动刷新
From 81b3494fbb9a6b346560220bf4b4dc10ae8f9881 Mon Sep 17 00:00:00 2001
From: hkk <hankangkang5@huawei.com>
Date: Wed, 24 Jul 2024 15:30:48 +0800
Subject: [PATCH] fix issue: create virtio_user based on bond4 main network
card
---
src/lstack/core/lstack_dpdk.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/src/lstack/core/lstack_dpdk.c b/src/lstack/core/lstack_dpdk.c
index e17242c..50fbdf6 100644
--- a/src/lstack/core/lstack_dpdk.c
+++ b/src/lstack/core/lstack_dpdk.c
@@ -798,6 +798,7 @@ int32_t init_dpdk_ethdev(void)
LSTACK_LOG(ERR, LSTACK, "bond device create failed, ret=%d\n", ret);
return -1;
}
+ port_id = rte_eth_bond_primary_get(get_protocol_stack_group()->port_id);
} else {
port_id = ethdev_port_id(cfg->mac_addr);
if (port_id < 0) {
@@ -818,8 +819,14 @@ int32_t init_dpdk_ethdev(void)
}
}
#endif
- if (get_global_cfg_params()->flow_bifurcation && virtio_port_create(port_id) != 0) {
- return -1;
+ if (cfg->flow_bifurcation) {
+ if (cfg->kni_switch) {
+ LSTACK_LOG(ERR, LSTACK, "flow_bifurcation and kni_switch cannot both be enabled, please check them\n");
+ return -1;
+ }
+ if (virtio_port_create(port_id) != 0) {
+ return -1;
+ }
}
return 0;
--
2.33.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。