From f9872991239cc4ddcd9b3c706cf135cdbea28a48 Mon Sep 17 00:00:00 2001 From: ningjin 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