Page MenuHomeFreeBSD

D58408.diff
No OneTemporary

D58408.diff

diff --git a/sys/netinet/tcp_hostcache.c b/sys/netinet/tcp_hostcache.c
--- a/sys/netinet/tcp_hostcache.c
+++ b/sys/netinet/tcp_hostcache.c
@@ -112,7 +112,7 @@
uint32_t hc_recvpipe; /* inbound delay-bandwidth product */
/* TCP hostcache internal data */
int hc_expire; /* lifetime for object */
-#ifdef TCP_HC_COUNTERS
+#ifdef TCP_HC_COUNTERS
u_long hc_hits; /* number of hits */
u_long hc_updates; /* number of updates */
#endif
@@ -393,6 +393,9 @@
return;
}
+ hc_metrics_lite->version = 1;
+ memcpy(&hc_metrics_lite->ip4, &hc_entry->ip4, sizeof(hc_entry->ip4));
+ memcpy(&hc_metrics_lite->ip6, &hc_entry->ip6, sizeof(hc_entry->ip6));
hc_metrics_lite->hc_mtu = atomic_load_32(&hc_entry->hc_mtu);
hc_metrics_lite->hc_ssthresh = atomic_load_32(&hc_entry->hc_ssthresh);
hc_metrics_lite->hc_rtt = atomic_load_32(&hc_entry->hc_rtt);
@@ -400,6 +403,7 @@
hc_metrics_lite->hc_cwnd = atomic_load_32(&hc_entry->hc_cwnd);
hc_metrics_lite->hc_sendpipe = atomic_load_32(&hc_entry->hc_sendpipe);
hc_metrics_lite->hc_recvpipe = atomic_load_32(&hc_entry->hc_recvpipe);
+ hc_metrics_lite->hc_expire = atomic_load_32(&hc_entry->hc_expire);
smr_exit(V_tcp_hostcache.smr);
}
diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h
--- a/sys/netinet/tcp_var.h
+++ b/sys/netinet/tcp_var.h
@@ -907,6 +907,9 @@
#define TO_SYN 0x01 /* parse SYN-only options */
struct hc_metrics_lite { /* must stay in sync with hc_metrics */
+ int version; /* structure version 1 */
+ struct in_addr ip4; /* IP address */
+ struct in6_addr ip6; /* IP6 address */
uint32_t hc_mtu; /* MTU for this path */
uint32_t hc_ssthresh; /* outbound gateway buffer limit */
uint32_t hc_rtt; /* estimated round trip time */
@@ -914,6 +917,7 @@
uint32_t hc_cwnd; /* congestion window */
uint32_t hc_sendpipe; /* outbound delay-bandwidth product */
uint32_t hc_recvpipe; /* inbound delay-bandwidth product */
+ int hc_expire; /* lifetime for object */
};
#ifndef _NETINET_IN_PCB_H_

File Metadata

Mime Type
text/plain
Expires
Mon, Sep 7, 7:01 PM (8 h, 27 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
38481681
Default Alt Text
D58408.diff (1 KB)

Event Timeline