From 4a363a699c4a8024054ca095f1b7818f8bd56ded Mon Sep 17 00:00:00 2001 From: Markus Gothe <markus.gothe@genexis.eu> Date: Thu, 14 Sep 2023 17:55:06 +0200 Subject: [PATCH] libethernet: Update RMON stats struct to 64-bits. These counters are exposed as 64-bit counters via ethmngr over UBUS since years: https://dev.iopsys.eu/hal/ethmngr/-/commit/b7135381aedf1bde6f7ab10b41be372a9bd7d155 However, the internal structure is 32-bits for reasons unknown. This commits fixes this issue. --- ethernet.h | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/ethernet.h b/ethernet.h index 36efa78..3f1dd4e 100644 --- a/ethernet.h +++ b/ethernet.h @@ -58,20 +58,20 @@ struct eth_rmon_stats { uint16_t vlanid; /* 0..4094 */ enum rmon_status status; struct { - uint32_t drop_events; - unsigned long bytes; - unsigned long packets; - unsigned long bcast_packets; - unsigned long mcast_packets; - uint32_t crc_err_packets; - uint32_t under_sz_packets; - uint32_t over_sz_packets; - unsigned long packets_64bytes; - unsigned long packets_65to127bytes; - unsigned long packets_128to255bytes; - unsigned long packets_256to511bytes; - unsigned long packets_512to1023bytes; - unsigned long packets_1024to1518bytes; + uint64_t drop_events; + uint64_t bytes; + uint64_t packets; + uint64_t bcast_packets; + uint64_t mcast_packets; + uint64_t crc_err_packets; + uint64_t under_sz_packets; + uint64_t over_sz_packets; + uint64_t packets_64bytes; + uint64_t packets_65to127bytes; + uint64_t packets_128to255bytes; + uint64_t packets_256to511bytes; + uint64_t packets_512to1023bytes; + uint64_t packets_1024to1518bytes; } tx, rx; }; -- GitLab