summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_hostcache.c
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2004-08-16 18:32:07 +0000
committerrwatson <rwatson@FreeBSD.org>2004-08-16 18:32:07 +0000
commit87aa99bbbbf620c4ce98996d472fdae45f077eae (patch)
tree6046e1d576e7bbc883254e0b133fbd6b383544f2 /sys/netinet/tcp_hostcache.c
parentcc3f0b4929d2de551332227291984a04e5758213 (diff)
downloadFreeBSD-src-87aa99bbbbf620c4ce98996d472fdae45f077eae.zip
FreeBSD-src-87aa99bbbbf620c4ce98996d472fdae45f077eae.tar.gz
White space cleanup for netinet before branch:
- Trailing tab/space cleanup - Remove spurious spaces between or before tabs This change avoids touching files that Andre likely has in his working set for PFIL hooks changes for IPFW/DUMMYNET. Approved by: re (scottl) Submitted by: Xin LI <delphij@frontfree.net>
Diffstat (limited to 'sys/netinet/tcp_hostcache.c')
-rw-r--r--sys/netinet/tcp_hostcache.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/sys/netinet/tcp_hostcache.c b/sys/netinet/tcp_hostcache.c
index ab9b00a..bebd51f 100644
--- a/sys/netinet/tcp_hostcache.c
+++ b/sys/netinet/tcp_hostcache.c
@@ -182,11 +182,11 @@ SYSCTL_PROC(_net_inet_tcp_hostcache, OID_AUTO, list,
static MALLOC_DEFINE(M_HOSTCACHE, "hostcache", "TCP hostcache");
#define HOSTCACHE_HASH(ip) \
- (((ip)->s_addr ^ ((ip)->s_addr >> 7) ^ ((ip)->s_addr >> 17)) & \
+ (((ip)->s_addr ^ ((ip)->s_addr >> 7) ^ ((ip)->s_addr >> 17)) & \
tcp_hostcache.hashmask)
/* XXX: What is the recommended hash to get good entropy for IPv6 addresses? */
-#define HOSTCACHE_HASH6(ip6) \
+#define HOSTCACHE_HASH6(ip6) \
(((ip6)->s6_addr32[0] ^ \
(ip6)->s6_addr32[1] ^ \
(ip6)->s6_addr32[2] ^ \
@@ -211,16 +211,16 @@ tcp_hc_init(void)
tcp_hostcache.hashsize * tcp_hostcache.bucket_limit;
tcp_hostcache.expire = TCP_HOSTCACHE_EXPIRE;
- TUNABLE_INT_FETCH("net.inet.tcp.hostcache.hashsize",
+ TUNABLE_INT_FETCH("net.inet.tcp.hostcache.hashsize",
&tcp_hostcache.hashsize);
- TUNABLE_INT_FETCH("net.inet.tcp.hostcache.cachelimit",
+ TUNABLE_INT_FETCH("net.inet.tcp.hostcache.cachelimit",
&tcp_hostcache.cache_limit);
- TUNABLE_INT_FETCH("net.inet.tcp.hostcache.bucketlimit",
+ TUNABLE_INT_FETCH("net.inet.tcp.hostcache.bucketlimit",
&tcp_hostcache.bucket_limit);
if (!powerof2(tcp_hostcache.hashsize)) {
- printf("WARNING: hostcache hash size is not a power of 2.\n");
+ printf("WARNING: hostcache hash size is not a power of 2.\n");
tcp_hostcache.hashsize = 512; /* safe default */
- }
+ }
tcp_hostcache.hashmask = tcp_hostcache.hashsize - 1;
/*
@@ -311,7 +311,7 @@ tcp_hc_lookup(struct in_conninfo *inc)
/*
* Internal function: insert an entry into the hostcache or return NULL
* if unable to allocate a new one.
- *
+ *
* If an entry has been returned, the caller becomes responsible for
* unlocking the bucket row after he is done reading/modifying the entry.
*/
@@ -545,7 +545,7 @@ tcp_hc_update(struct in_conninfo *inc, struct hc_metrics_lite *hcml)
}
if (hcml->rmx_rttvar != 0) {
if (hc_entry->rmx_rttvar == 0)
- hc_entry->rmx_rttvar = hcml->rmx_rttvar;
+ hc_entry->rmx_rttvar = hcml->rmx_rttvar;
else
hc_entry->rmx_rttvar =
(hc_entry->rmx_rttvar + hcml->rmx_rttvar) / 2;
@@ -581,8 +581,8 @@ tcp_hc_update(struct in_conninfo *inc, struct hc_metrics_lite *hcml)
else
hc_entry->rmx_sendpipe =
(hc_entry->rmx_sendpipe + hcml->rmx_sendpipe) /2;
- /* tcpstat.tcps_cachedsendpipe++; */
- }
+ /* tcpstat.tcps_cachedsendpipe++; */
+ }
if (hcml->rmx_recvpipe != 0) {
if (hc_entry->rmx_recvpipe == 0)
hc_entry->rmx_recvpipe = hcml->rmx_recvpipe;
OpenPOWER on IntegriCloud