2 Star 0 Fork 32

我们17走/gazelle

forked from src-openEuler/gazelle 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0061-add-tcp-faste-timer-cnt.patch 3.01 KB
一键复制 编辑 原始数据 按行查看 历史
yinbin6 提交于 2023-11-29 15:01 . sync support vlan offload
From 4098ba1fbc9f382d0f9d6b6b071d7ed9a2682cfc Mon Sep 17 00:00:00 2001
From: hantwofish <hankangkang5@hauwei.com>
Date: Fri, 24 Nov 2023 14:19:16 +0800
Subject: [PATCH] add tcp faste timer cnt
---
src/common/gazelle_dfx_msg.h | 3 +++
src/ltran/ltran_dfx.c | 28 ++++++++++++++++++----------
2 files changed, 21 insertions(+), 10 deletions(-)
diff --git a/src/common/gazelle_dfx_msg.h b/src/common/gazelle_dfx_msg.h
index 93fe3df..8071108 100644
--- a/src/common/gazelle_dfx_msg.h
+++ b/src/common/gazelle_dfx_msg.h
@@ -117,6 +117,9 @@ struct gazelle_stat_lstack_snmp {
uint32_t tcp_in_seg;
uint32_t tcp_in_err;
uint32_t tcp_out_rst;
+ uint32_t tcp_fin_ack_cnt;
+ uint32_t tcp_delay_ack_cnt;
+ uint32_t tcp_refused_cnt;
/* UDP */
uint32_t udp_in_datagrams;
diff --git a/src/ltran/ltran_dfx.c b/src/ltran/ltran_dfx.c
index 582a4b7..98e23dc 100644
--- a/src/ltran/ltran_dfx.c
+++ b/src/ltran/ltran_dfx.c
@@ -825,6 +825,22 @@ static void gazelle_print_lstack_stat_rate(void *buf, const struct gazelle_stat_
} while (true);
}
+static void gazelle_print_lstack_tcp_stat(const struct gazelle_stat_lstack_snmp *snmp)
+{
+ printf("tcp_act_open: %u\n", snmp->tcp_act_open);
+ printf("tcp_passive_open: %u\n", snmp->tcp_passive_open);
+ printf("tcp_attempt_fail: %u\n", snmp->tcp_attempt_fail);
+ printf("tcp_estab_rst: %u\n", snmp->tcp_estab_rst);
+ printf("tcp_out_seg: %u\n", snmp->tcp_out_seg);
+ printf("tcp_retran_seg: %u\n", snmp->tcp_retran_seg);
+ printf("tcp_in_seg: %u\n", snmp->tcp_in_seg);
+ printf("tcp_in_err: %u\n", snmp->tcp_in_err);
+ printf("tcp_out_rst: %u\n", snmp->tcp_out_rst);
+ printf("tcp_fin_ack_cnt: %u\n", snmp->tcp_fin_ack_cnt);
+ printf("tcp_delay_ack_cnt: %u\n", snmp->tcp_delay_ack_cnt);
+ printf("tcp_refused_cnt: %u\n", snmp->tcp_refused_cnt);
+}
+
static void gazelle_print_lstack_stat_snmp_core(const struct gazelle_stack_dfx_data *stat,
const struct gazelle_stat_lstack_snmp *snmp)
{
@@ -850,16 +866,8 @@ static void gazelle_print_lstack_stat_snmp_core(const struct gazelle_stack_dfx_d
printf("udp_no_ports: %u\n", snmp->udp_no_ports);
printf("udp_in_errors: %u\n", snmp->udp_in_errors);
printf("udp_out_datagrams: %u\n", snmp->udp_out_datagrams);
-
- printf("tcp_act_open: %u\n", snmp->tcp_act_open);
- printf("tcp_passive_open: %u\n", snmp->tcp_passive_open);
- printf("tcp_attempt_fail: %u\n", snmp->tcp_attempt_fail);
- printf("tcp_estab_rst: %u\n", snmp->tcp_estab_rst);
- printf("tcp_out_seg: %u\n", snmp->tcp_out_seg);
- printf("tcp_retran_seg: %u\n", snmp->tcp_retran_seg);
- printf("tcp_in_seg: %u\n", snmp->tcp_in_seg);
- printf("tcp_in_err: %u\n", snmp->tcp_in_err);
- printf("tcp_out_rst: %u\n", snmp->tcp_out_rst);
+
+ gazelle_print_lstack_tcp_stat(snmp);
printf("icmp_in_msgs: %u\n", snmp->icmp_in_msgs);
printf("icmp_in_errors: %u\n", snmp->icmp_in_errors);
--
2.27.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/together17/gazelle.git
git@gitee.com:together17/gazelle.git
together17
gazelle
gazelle
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385