From 36e4a622505cd329910b188a941764c3c9c9f3a7 Mon Sep 17 00:00:00 2001 From: Xuan Zhuo Date: Thu, 4 Jun 2020 11:08:27 +0800 Subject: [PATCH 1727/2944] alinux: tcp_rt module: change the _tcp_rt_stats item type to u64 to #27804112 _tcp_rt_stats is used to save the values returned from tcp_rt_stats. These values were originally 64-bit, and now stored in u32, some larger variables will overflow, so they are modified to 64-bit. Signed-off-by: Xuan Zhuo Acked-by: Dust Li Reviewed-by: Ya Zhao Reviewed-by: Cambda Zhu --- net/ipv4/tcp_rt/output.c | 2 +- net/ipv4/tcp_rt/tcp_rt.h | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/net/ipv4/tcp_rt/output.c b/net/ipv4/tcp_rt/output.c index 55a9a46..337875e 100644 --- a/net/ipv4/tcp_rt/output.c +++ b/net/ipv4/tcp_rt/output.c @@ -333,7 +333,7 @@ void tcp_rt_timer_output(int index, int port, char *flag) } size = snprintf(buf, sizeof(buf), - "%llu all %s%u %u %u %u %u %u %u %u %u %u\n", + "%llu all %s%u %llu %llu %llu %llu %llu %llu %llu %llu %llu\n", ktime_get_real_seconds(), flag, port, avg.rt, avg.server_time, avg.drop, avg.rtt, avg.fail, avg.bytes, avg.upload_time, avg.upload_data, t.number); diff --git a/net/ipv4/tcp_rt/tcp_rt.h b/net/ipv4/tcp_rt/tcp_rt.h index 6414aca..fa48820 100644 --- a/net/ipv4/tcp_rt/tcp_rt.h +++ b/net/ipv4/tcp_rt/tcp_rt.h @@ -95,17 +95,17 @@ struct tcp_rt_stats { }; struct _tcp_rt_stats { - u32 rt; - u32 number; - u32 drop; - u32 bytes; - u32 server_time; - u32 fail; - u32 packets; - u32 rtt; - u32 upload_time; - u32 upload_data; - u32 con_num; + u64 rt; + u64 number; + u64 drop; + u64 bytes; + u64 server_time; + u64 fail; + u64 packets; + u64 rtt; + u64 upload_time; + u64 upload_data; + u64 con_num; }; int tcp_rt_output_init(int log_buf_num, int stats_buf_num, -- 1.8.3.1