Page MenuHomeFreeBSD

D7066.id18088.diff
No OneTemporary

D7066.id18088.diff

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

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)

Event Timeline