代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/gazelle 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 8f81630296d5d305613a1a766a7a2fbc4690df79 Mon Sep 17 00:00:00 2001
From: compile_success <980965867@qq.com>
Date: Mon, 26 Jun 2023 08:45:51 +0000
Subject: [PATCH] fix core dump when slave mac failed
---
src/lstack/core/lstack_dpdk.c | 37 +++++++++++++++++++++++++++++++++--
1 file changed, 35 insertions(+), 2 deletions(-)
diff --git a/src/lstack/core/lstack_dpdk.c b/src/lstack/core/lstack_dpdk.c
index f865d55..f6cabf8 100644
--- a/src/lstack/core/lstack_dpdk.c
+++ b/src/lstack/core/lstack_dpdk.c
@@ -495,13 +495,32 @@ int32_t dpdk_ethdev_init(int port_id, bool bond_port)
for (int i = 0; i < slave_num; i++) {
ret = dpdk_ethdev_init(slave_port_id[i], 0);
if (ret != 0) {
- LSTACK_LOG(ERR, LSTACK, "dpdk_ethdev_init failed\n");
+ LSTACK_LOG(ERR, LSTACK, "dpdk_ethdev_init failed ret = %d\n", ret);
return -1;
}
ret = rte_eth_promiscuous_enable(slave_port_id[i]);
- rte_eth_allmulticast_enable(slave_port_id[i]);
+ if (ret != 0) {
+ LSTACK_LOG(ERR, LSTACK, "dpdk slave enable promiscuous failed ret = %d\n", ret);
+ return -1;
+ }
+
+ ret = rte_eth_allmulticast_enable(slave_port_id[i]);
+ if (ret != 0) {
+ LSTACK_LOG(ERR, LSTACK, "dpdk slave enable allmulticast failed ret = %d\n", ret);
+ return -1;
+ }
+
ret = rte_eth_bond_slave_add(port_id, slave_port_id[i]);
+ if (ret != 0) {
+ LSTACK_LOG(ERR, LSTACK, "dpdk add slave port failed ret = %d\n", ret);
+ return -1;
+ }
+
ret = rte_eth_dev_start(slave_port_id[i]);
+ if (ret != 0) {
+ LSTACK_LOG(ERR, LSTACK, "dpdk start slave port failed ret = %d\n", ret);
+ return -1;
+ }
}
}
@@ -670,27 +689,41 @@ int32_t init_dpdk_ethdev(void)
}
ret = dpdk_ethdev_init(bond_port_id, 1);
+ if (ret != 0) {
+ LSTACK_LOG(ERR, LSTACK, "dpdk_ethdev_init failed ret = %d\n", ret);
+ return -1;
+ }
+
ret = rte_eth_bond_xmit_policy_set(bond_port_id, BALANCE_XMIT_POLICY_LAYER34);
if (ret < 0) {
+ LSTACK_LOG(ERR, LSTACK, "dpdk set bond xmit policy failed ret = %d\n", ret);
return -1;
}
ret = rte_eth_bond_8023ad_dedicated_queues_enable(bond_port_id);
if (ret < 0) {
+ LSTACK_LOG(ERR, LSTACK, "dpdk enable 8023 dedicated queues failed ret = %d\n", ret);
return -1;
}
ret = rte_eth_promiscuous_enable(bond_port_id);
if (ret < 0) {
+ LSTACK_LOG(ERR, LSTACK, "dpdk enable promiscuous failed ret = %d\n", ret);
return -1;
}
ret = rte_eth_allmulticast_enable(bond_port_id);
if (ret < 0) {
+ LSTACK_LOG(ERR, LSTACK, "dpdk enable allmulticast failed ret = %d\n", ret);
return -1;
}
ret = rte_eth_dev_start(bond_port_id);
+ if (ret < 0) {
+ LSTACK_LOG(ERR, LSTACK, "dpdk start bond port failed ret = %d\n", ret);
+ return -1;
+ }
+
/* 20: sleep for lacp ,this is a temp plan, it will be changed in future */
int wait_lacp = 20;
sleep(wait_lacp);
--
2.27.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。