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/ppp | |
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/ppp')
-rw-r--r-- | accel-pppd/ppp/ppp_lcp.c | 2 | ||||
-rw-r--r-- | accel-pppd/ppp/ppp_lcp.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/accel-pppd/ppp/ppp_lcp.c b/accel-pppd/ppp/ppp_lcp.c index fdbb3181..10babec8 100644 --- a/accel-pppd/ppp/ppp_lcp.c +++ b/accel-pppd/ppp/ppp_lcp.c @@ -621,7 +621,7 @@ static void send_echo_reply(struct ppp_lcp_t *lcp) static void send_echo_request(struct triton_timer_t *t) { struct ppp_lcp_t *lcp = container_of(t, typeof(*lcp), echo_timer); - struct rtnl_link_stats stats; + struct rtnl_link_stats64 stats; struct lcp_echo_req { struct lcp_hdr_t hdr; uint32_t magic; diff --git a/accel-pppd/ppp/ppp_lcp.h b/accel-pppd/ppp/ppp_lcp.h index 39693d43..9b90e085 100644 --- a/accel-pppd/ppp/ppp_lcp.h +++ b/accel-pppd/ppp/ppp_lcp.h @@ -122,7 +122,7 @@ struct ppp_lcp_t struct triton_timer_t echo_timer; int echo_sent; int magic; - unsigned long last_ipackets; + uint64_t last_ipackets; time_t last_echo_ts; struct list_head ropt_list; // last received ConfReq |