From 5d5268f64f4bd9b3fcdc2aad3d0d2f24c307351a Mon Sep 17 00:00:00 2001 From: wuchangsheng 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