diff options
author | Stephan Brunner <s.brunner@stephan-brunner.net> | 2022-11-01 09:51:14 +0100 |
---|---|---|
committer | Stephan Brunner <s.brunner@stephan-brunner.net> | 2022-11-01 09:51:34 +0100 |
commit | ffe3a1337c1380a5b79651b34037c6c9f66b9ea1 (patch) | |
tree | 077d1e424913b5a55e621a842215baea1739535c /accel-pppd/include | |
parent | f4a22056a221d69bf8d1aaa8eca39f276b52431d (diff) | |
download | accel-ppp-ffe3a1337c1380a5b79651b34037c6c9f66b9ea1.tar.gz accel-ppp-ffe3a1337c1380a5b79651b34037c6c9f66b9ea1.zip |
Use 64-bit interface statistics rather than doing custom 32-bit overflow handling.
When a link has a relatively high throughput, the 32-bit packet and byte counters could overflow multiple times between accounting runs.
To accommodate this limitation, directly use 64-bit interface statistics.
This also gets rid of the internal giga-word counters.
Diffstat (limited to 'accel-pppd/include')
-rw-r--r-- | accel-pppd/include/ap_session.h | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/accel-pppd/include/ap_session.h b/accel-pppd/include/ap_session.h index 12277185..629b58ee 100644 --- a/accel-pppd/include/ap_session.h +++ b/accel-pppd/include/ap_session.h @@ -110,14 +110,12 @@ struct ap_session int session_timeout; struct triton_timer_t timer; - uint32_t acct_rx_bytes; - uint32_t acct_tx_bytes; - uint32_t acct_input_gigawords; - uint32_t acct_output_gigawords; - uint32_t acct_rx_packets_i; - uint32_t acct_tx_packets_i; - uint32_t acct_rx_bytes_i; - uint32_t acct_tx_bytes_i; + uint64_t acct_rx_bytes; + uint64_t acct_tx_bytes; + uint64_t acct_rx_packets_i; + uint64_t acct_tx_packets_i; + uint64_t acct_rx_bytes_i; + uint64_t acct_tx_bytes_i; int acct_start; }; @@ -156,7 +154,7 @@ int ap_session_rename(struct ap_session *ses, const char *ifname, int len); int ap_session_vrf(struct ap_session *ses, const char *vrf_name, int len); #endif -int ap_session_read_stats(struct ap_session *ses, struct rtnl_link_stats *stats); +int ap_session_read_stats(struct ap_session *ses, struct rtnl_link_stats64 *stats); int ap_shutdown_soft(void (*cb)(void), int term); |