Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F109855177
D7064.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D7064.diff
View Options
Index: sys/netinet/tcp_hostcache.h
===================================================================
--- sys/netinet/tcp_hostcache.h
+++ sys/netinet/tcp_hostcache.h
@@ -56,7 +56,7 @@
uint32_t rmx_mtu; /* MTU for this path */
uint32_t rmx_ssthresh; /* outbound gateway buffer limit */
uint32_t rmx_rtt; /* estimated round trip time */
- u_long rmx_rttvar; /* estimated rtt variance */
+ uint32_t rmx_rttvar; /* estimated rtt variance */
u_long rmx_cwnd; /* congestion window */
u_long rmx_sendpipe; /* outbound delay-bandwidth product */
u_long rmx_recvpipe; /* inbound delay-bandwidth product */
Index: sys/netinet/tcp_hostcache.c
===================================================================
--- sys/netinet/tcp_hostcache.c
+++ sys/netinet/tcp_hostcache.c
@@ -542,8 +542,8 @@
if (hc_entry->rmx_rttvar == 0)
hc_entry->rmx_rttvar = hcml->rmx_rttvar;
else
- hc_entry->rmx_rttvar =
- (hc_entry->rmx_rttvar + hcml->rmx_rttvar) / 2;
+ hc_entry->rmx_rttvar = ((uint64_t)hc_entry->rmx_rttvar +
+ (uint64_t)hcml->rmx_rttvar) / 2;
TCPSTAT_INC(tcps_cachedrttvar);
}
if (hcml->rmx_ssthresh != 0) {
@@ -624,7 +624,7 @@
hc_entry->rmx_ssthresh,
msec((u_long)hc_entry->rmx_rtt *
(RTM_RTTUNIT / (hz * TCP_RTT_SCALE))),
- msec(hc_entry->rmx_rttvar *
+ msec((u_long)hc_entry->rmx_rttvar *
(RTM_RTTUNIT / (hz * TCP_RTTVAR_SCALE))),
hc_entry->rmx_cwnd,
hc_entry->rmx_sendpipe,
Index: sys/netinet/tcp_var.h
===================================================================
--- sys/netinet/tcp_var.h
+++ sys/netinet/tcp_var.h
@@ -405,7 +405,7 @@
uint32_t rmx_mtu; /* MTU for this path */
uint32_t rmx_ssthresh; /* outbound gateway buffer limit */
uint32_t rmx_rtt; /* estimated round trip time */
- u_long rmx_rttvar; /* estimated rtt variance */
+ uint32_t rmx_rttvar; /* estimated rtt variance */
u_long rmx_cwnd; /* congestion window */
u_long rmx_sendpipe; /* outbound delay-bandwidth product */
u_long rmx_recvpipe; /* inbound delay-bandwidth product */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Feb 11, 9:39 AM (11 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16592757
Default Alt Text
D7064.diff (2 KB)
Attached To
Mode
D7064: FFL: Convert hostcache rmx_rttvar from u_long to uint32_t
Attached
Detach File
Event Timeline
Log In to Comment