Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151659454
D7066.id18088.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
D7066.id18088.diff
View Options
Index: sys/netinet/tcp_hostcache.h
===================================================================
--- sys/netinet/tcp_hostcache.h
+++ sys/netinet/tcp_hostcache.h
@@ -58,8 +58,8 @@
uint32_t rmx_rtt; /* estimated round trip time */
uint32_t rmx_rttvar; /* estimated rtt variance */
uint32_t rmx_cwnd; /* congestion window */
- u_long rmx_sendpipe; /* outbound delay-bandwidth product */
- u_long rmx_recvpipe; /* inbound delay-bandwidth product */
+ uint32_t rmx_sendpipe; /* outbound delay-bandwidth product */
+ uint32_t rmx_recvpipe; /* inbound delay-bandwidth product */
/* TCP hostcache internal data */
int rmx_expire; /* lifetime for object */
u_long rmx_hits; /* number of hits */
Index: sys/netinet/tcp_hostcache.c
===================================================================
--- sys/netinet/tcp_hostcache.c
+++ sys/netinet/tcp_hostcache.c
@@ -567,7 +567,8 @@
hc_entry->rmx_sendpipe = hcml->rmx_sendpipe;
else
hc_entry->rmx_sendpipe =
- (hc_entry->rmx_sendpipe + hcml->rmx_sendpipe) /2;
+ ((uint64_t)hc_entry->rmx_sendpipe +
+ (uint64_t)hcml->rmx_sendpipe) /2;
/* TCPSTAT_INC(tcps_cachedsendpipe); */
}
if (hcml->rmx_recvpipe != 0) {
@@ -575,7 +576,8 @@
hc_entry->rmx_recvpipe = hcml->rmx_recvpipe;
else
hc_entry->rmx_recvpipe =
- (hc_entry->rmx_recvpipe + hcml->rmx_recvpipe) /2;
+ ((uint64_t)hc_entry->rmx_recvpipe +
+ (uint64_t)hcml->rmx_recvpipe) /2;
/* TCPSTAT_INC(tcps_cachedrecvpipe); */
}
@@ -612,7 +614,7 @@
TAILQ_FOREACH(hc_entry, &V_tcp_hostcache.hashbase[i].hch_bucket,
rmx_q) {
sbuf_printf(&sb,
- "%-15s %5u %8u %6lums %6lums %8u %8lu %8lu %4lu "
+ "%-15s %5u %8u %6lums %6lums %8u %8u %8u %4lu "
"%4lu %4i\n",
hc_entry->ip4.s_addr ? inet_ntoa(hc_entry->ip4) :
#ifdef INET6
Index: sys/netinet/tcp_var.h
===================================================================
--- sys/netinet/tcp_var.h
+++ sys/netinet/tcp_var.h
@@ -407,8 +407,8 @@
uint32_t rmx_rtt; /* estimated round trip time */
uint32_t rmx_rttvar; /* estimated rtt variance */
uint32_t rmx_cwnd; /* congestion window */
- u_long rmx_sendpipe; /* outbound delay-bandwidth product */
- u_long rmx_recvpipe; /* inbound delay-bandwidth product */
+ uint32_t rmx_sendpipe; /* outbound delay-bandwidth product */
+ uint32_t rmx_recvpipe; /* inbound delay-bandwidth product */
};
/*
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Apr 10, 8:19 PM (15 h, 59 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31243336
Default Alt Text
D7066.id18088.diff (2 KB)
Attached To
Mode
D7066: FFL: Convert hostcache rmx_sendpipe and rmx_recvpipe from u_long to uint32_t
Attached
Detach File
Event Timeline
Log In to Comment