1 Star 0 Fork 32

吴昌盛/gazelle-tar

forked from src-openEuler/gazelle 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0012-fix-dfx-info-show.patch 2.02 KB
一键复制 编辑 原始数据 按行查看 历史
jinag12 提交于 2022-03-16 22:23 . fix gazelle test issue
From 5d5268f64f4bd9b3fcdc2aad3d0d2f24c307351a Mon Sep 17 00:00:00 2001
From: wuchangsheng <wuchangsheng2@huawei.com>
Date: Wed, 9 Mar 2022 19:26:51 +0800
Subject: [PATCH 12/34] fix dfx info show
---
src/lstack/core/lstack_lwip.c | 12 ++++++------
src/ltran/ltran_dfx.c | 2 +-
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/lstack/core/lstack_lwip.c b/src/lstack/core/lstack_lwip.c
index 3b97bb8..8de032f 100644
--- a/src/lstack/core/lstack_lwip.c
+++ b/src/lstack/core/lstack_lwip.c
@@ -667,6 +667,12 @@ void get_lwip_conntable(struct rpc_msg *msg)
conn_num++;
}
+ for (pcb = tcp_tw_pcbs; pcb != NULL && conn_num < max_num; pcb = pcb->next) {
+ conn[conn_num].state = TIME_WAIT_LIST;
+ copy_pcb_to_conn(conn + conn_num, pcb);
+ conn_num++;
+ }
+
for (struct tcp_pcb_listen *pcbl = tcp_listen_pcbs.listen_pcbs; pcbl != NULL && conn_num < max_num;
pcbl = pcbl->next) {
conn[conn_num].state = LISTEN_LIST;
@@ -680,12 +686,6 @@ void get_lwip_conntable(struct rpc_msg *msg)
conn_num++;
}
- for (pcb = tcp_tw_pcbs; pcb != NULL && conn_num < max_num; pcb = pcb->next) {
- conn[conn_num].state = TIME_WAIT_LIST;
- copy_pcb_to_conn(conn + conn_num, pcb);
- conn_num++;
- }
-
msg->result = conn_num;
}
diff --git a/src/ltran/ltran_dfx.c b/src/ltran/ltran_dfx.c
index 381d30d..2a268f7 100644
--- a/src/ltran/ltran_dfx.c
+++ b/src/ltran/ltran_dfx.c
@@ -879,7 +879,7 @@ static void gazelle_print_lstack_stat_conn(void *buf, const struct gazelle_stat_
do {
printf("\n------ stack tid: %6u ------\n", stat->tid);
printf("No. Proto recv_cnt recv_ring in_send send_ring Local Address"
- " Foreign Address State\n");
+ " Foreign Address State\n");
unread_pkts = 0;
for (i = 0; i < conn->conn_num && i < GAZELLE_LSTACK_MAX_CONN; i++) {
struct gazelle_stat_lstack_conn_info *conn_info = &conn->conn_list[i];
--
1.8.3.1
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/wu-changsheng/gazelle-tar.git
git@gitee.com:wu-changsheng/gazelle-tar.git
wu-changsheng
gazelle-tar
gazelle-tar
master

搜索帮助