Hi,
Does using 64 bit for timer in tcpcb require this?
ok?
Index: sys/netinet/tcp.h
===================================================================
RCS file: /cvs/src/sys/netinet/tcp.h,v
retrieving revision 1.24
diff -u -p -r1.24 tcp.h
--- sys/netinet/tcp.h 19 May 2023 01:04:39 -0000 1.24
+++ sys/netinet/tcp.h 7 Jul 2023 08:33:26 -0000
@@ -194,9 +194,9 @@ struct tcp_info {
uint32_t tcpi_snd_wl2;
uint32_t tcpi_snd_max;
uint32_t tcpi_ts_recent;
- uint32_t tcpi_ts_recent_age;
+ uint64_t tcpi_ts_recent_age;
uint32_t tcpi_rfbuf_cnt;
- uint32_t tcpi_rfbuf_ts;
+ uint64_t tcpi_rfbuf_ts;
uint32_t tcpi_so_rcv_sb_cc;
uint32_t tcpi_so_rcv_sb_hiwat;
uint32_t tcpi_so_rcv_sb_lowat;
Index: usr.bin/tcpbench/tcpbench.c
===================================================================
RCS file: /cvs/src/usr.bin/tcpbench/tcpbench.c,v
retrieving revision 1.69
diff -u -p -r1.69 tcpbench.c
--- usr.bin/tcpbench/tcpbench.c 22 May 2023 12:53:04 -0000 1.69
+++ usr.bin/tcpbench/tcpbench.c 7 Jul 2023 08:33:26 -0000
@@ -51,6 +51,7 @@
#include <poll.h>
#include <paths.h>
#include <math.h>
+#include <inttypes.h>
#define DEFAULT_PORT "12345"
#define DEFAULT_STATS_INTERVAL 1000 /* ms */
@@ -411,7 +412,7 @@ tcp_stats_display(unsigned long long tot
P(tcpi, rcv_up, "%u")
P(tcpi, rcv_wscale, "%hhu")
P(tcpi, rfbuf_cnt, "%u")
- P(tcpi, rfbuf_ts, "%u")
+ P(tcpi, rfbuf_ts, "%" PRIu64)
P(tcpi, rtt, "%u")
P(tcpi, rttmin, "%u")
P(tcpi, rttvar, "%u")
@@ -436,7 +437,7 @@ tcp_stats_display(unsigned long long tot
P(tcpi, so_snd_sb_lowat, "%u")
P(tcpi, so_snd_sb_wat, "%u")
P(tcpi, ts_recent, "%u")
- P(tcpi, ts_recent_age, "%u")
+ P(tcpi, ts_recent_age, "%" PRIu64)
#undef S
#undef P
}