代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/gazelle 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From c4e5033d44b4e6ff5a2b35e0087a26539bd9d785 Mon Sep 17 00:00:00 2001
From: Honggang LI <honggangli@163.com>
Date: Mon, 13 Nov 2023 09:35:57 +0800
Subject: [PATCH] Fix coredump issue and skip rte_pdump_init for secondary
process
Signed-off-by: Honggang LI <honggangli@163.com>
---
src/lstack/core/lstack_dpdk.c | 14 ++++++++------
src/lstack/core/lstack_lwip.c | 2 +-
2 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/src/lstack/core/lstack_dpdk.c b/src/lstack/core/lstack_dpdk.c
index 1a5b568..5fc641e 100644
--- a/src/lstack/core/lstack_dpdk.c
+++ b/src/lstack/core/lstack_dpdk.c
@@ -125,12 +125,14 @@ int32_t dpdk_eal_init(void)
LSTACK_PRE_LOG(LSTACK_INFO, "dpdk_eal_init success\n");
}
- ret = rte_pdump_init();
- if (ret < 0) {
- LSTACK_PRE_LOG(LSTACK_ERR, "rte_pdump_init failed init, rte_errno %d\n", rte_errno);
- /* We do not care whether the pdump is successfully loaded. So, just print an alarm. */
- } else {
- LSTACK_PRE_LOG(LSTACK_INFO, "rte_pdump_init success\n");
+ if (get_global_cfg_params()->is_primary) {
+ ret = rte_pdump_init();
+ if (ret < 0) {
+ LSTACK_PRE_LOG(LSTACK_ERR, "rte_pdump_init failed init, rte_errno %d\n", rte_errno);
+ /* We do not care whether the pdump is successfully loaded. So, just print an alarm. */
+ } else {
+ LSTACK_PRE_LOG(LSTACK_INFO, "rte_pdump_init success\n");
+ }
}
return ret;
diff --git a/src/lstack/core/lstack_lwip.c b/src/lstack/core/lstack_lwip.c
index cdb0089..a2b02df 100644
--- a/src/lstack/core/lstack_lwip.c
+++ b/src/lstack/core/lstack_lwip.c
@@ -1216,7 +1216,7 @@ uint32_t do_lwip_get_conntable(struct gazelle_stat_lstack_conn_info *conn,
conn[conn_num].l_port = pcbl->local_port;
conn[conn_num].tcp_sub_state = pcbl->state;
struct netconn *netconn = (struct netconn *)pcbl->callback_arg;
- conn[conn_num].fd = netconn->socket;
+ conn[conn_num].fd = netconn != NULL ? netconn->socket : -1;
if (netconn != NULL && netconn->acceptmbox != NULL) {
conn[conn_num].recv_cnt = rte_ring_count(netconn->acceptmbox->ring);
}
--
2.23.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。