1 Star 0 Fork 32

jinag12/gazelle_1

forked from src-openEuler/gazelle 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0180-change-gazelle_stat_lstack_proto-from-u16-to-u64.patch 3.86 KB
一键复制 编辑 原始数据 按行查看 历史
yinbin6 提交于 2024-05-24 16:06 . sync memary error: fix some memary error
From f9872991239cc4ddcd9b3c706cf135cdbea28a48 Mon Sep 17 00:00:00 2001
From: ningjin <ningjin@kylinos.cn>
Date: Tue, 21 May 2024 10:23:49 +0800
Subject: [PATCH] change gazelle_stat_lstack_proto from u16 to u64
---
src/common/gazelle_dfx_msg.h | 32 ++++++++++++++++----------------
src/ltran/ltran_dfx.c | 20 ++++++++++----------
2 files changed, 26 insertions(+), 26 deletions(-)
diff --git a/src/common/gazelle_dfx_msg.h b/src/common/gazelle_dfx_msg.h
index 9f88203..cad7978 100644
--- a/src/common/gazelle_dfx_msg.h
+++ b/src/common/gazelle_dfx_msg.h
@@ -204,22 +204,22 @@ struct gazelle_stat_lstack_snmp {
/* same as define in lwip/stats.h - struct stats_proto */
struct gazelle_stat_lstack_proto {
/* data */
- uint16_t xmit; /* Transmitted packets. */
- uint16_t recv; /* Received packets. */
- uint16_t tx_in; /* Transmitted in packets. */
- uint16_t tx_out; /* Transmitted out packets. */
- uint16_t rx_in; /* Received in packets. */
- uint16_t rx_out; /* Received out packets. */
- uint16_t fw; /* Forwarded packets. */
- uint16_t drop; /* Dropped packets. */
- uint16_t chkerr; /* Checksum error. */
- uint16_t lenerr; /* Invalid length error. */
- uint16_t memerr; /* Out of memory error. */
- uint16_t rterr; /* Routing error. */
- uint16_t proterr; /* Protocol error. */
- uint16_t opterr; /* Error in options. */
- uint16_t err; /* Misc error. */
- uint16_t cachehit;
+ uint64_t xmit; /* Transmitted packets. */
+ uint64_t recv; /* Received packets. */
+ uint64_t tx_in; /* Transmitted in packets. */
+ uint64_t tx_out; /* Transmitted out packets. */
+ uint64_t rx_in; /* Received in packets. */
+ uint64_t rx_out; /* Received out packets. */
+ uint64_t fw; /* Forwarded packets. */
+ uint64_t drop; /* Dropped packets. */
+ uint64_t chkerr; /* Checksum error. */
+ uint64_t lenerr; /* Invalid length error. */
+ uint64_t memerr; /* Out of memory error. */
+ uint64_t rterr; /* Routing error. */
+ uint64_t proterr; /* Protocol error. */
+ uint64_t opterr; /* Error in options. */
+ uint64_t err; /* Misc error. */
+ uint64_t cachehit;
};
diff --git a/src/ltran/ltran_dfx.c b/src/ltran/ltran_dfx.c
index aa08f25..319f7cd 100644
--- a/src/ltran/ltran_dfx.c
+++ b/src/ltran/ltran_dfx.c
@@ -1115,16 +1115,16 @@ static void gazelle_print_lstack_stat_proto_core(const struct gazelle_stack_dfx_
const struct gazelle_stat_lstack_proto *proto)
{
printf("\n------ stack tid: %6u ------\n", stat->tid);
- printf("tx_in: %u\n", proto->tx_in);
- printf("tx_out: %u\n", proto->tx_out);
- printf("rx_in: %u\n", proto->rx_in);
- printf("rx_out: %u\n", proto->rx_out);
- printf("fw: %u\n", proto->fw);
- printf("drop: %u\n", proto->drop);
- printf("chkerr: %u\n", proto->chkerr);
- printf("lenerr: %u\n", proto->lenerr);
- printf("memerr: %u\n", proto->memerr);
- printf("rterr: %u\n", proto->rterr);
+ printf("tx_in: %lu\n", proto->tx_in);
+ printf("tx_out: %lu\n", proto->tx_out);
+ printf("rx_in: %lu\n", proto->rx_in);
+ printf("rx_out: %lu\n", proto->rx_out);
+ printf("fw: %lu\n", proto->fw);
+ printf("drop: %lu\n", proto->drop);
+ printf("chkerr: %lu\n", proto->chkerr);
+ printf("lenerr: %lu\n", proto->lenerr);
+ printf("memerr: %lu\n", proto->memerr);
+ printf("rterr: %lu\n", proto->rterr);
}
static void gazelle_print_lstack_stat_snmp(void *buf, const struct gazelle_stat_msg_request *req_msg)
--
2.33.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/jiangheng12/gazelle_1.git
git@gitee.com:jiangheng12/gazelle_1.git
jiangheng12
gazelle_1
gazelle_1
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385