aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/tcp.c')
-rw-r--r--net/ipv4/tcp.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 20159a3dafb3..1ec03db7dcd9 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -272,6 +272,9 @@ int sysctl_tcp_fin_timeout = TCP_FIN_TIMEOUT;
272DEFINE_SNMP_STAT(struct tcp_mib, tcp_statistics); 272DEFINE_SNMP_STAT(struct tcp_mib, tcp_statistics);
273 273
274kmem_cache_t *tcp_bucket_cachep; 274kmem_cache_t *tcp_bucket_cachep;
275
276EXPORT_SYMBOL_GPL(tcp_bucket_cachep);
277
275kmem_cache_t *tcp_timewait_cachep; 278kmem_cache_t *tcp_timewait_cachep;
276 279
277atomic_t tcp_orphan_count = ATOMIC_INIT(0); 280atomic_t tcp_orphan_count = ATOMIC_INIT(0);
@@ -2259,7 +2262,7 @@ void __init tcp_init(void)
2259 sizeof(skb->cb)); 2262 sizeof(skb->cb));
2260 2263
2261 tcp_bucket_cachep = kmem_cache_create("tcp_bind_bucket", 2264 tcp_bucket_cachep = kmem_cache_create("tcp_bind_bucket",
2262 sizeof(struct tcp_bind_bucket), 2265 sizeof(struct inet_bind_bucket),
2263 0, SLAB_HWCACHE_ALIGN, 2266 0, SLAB_HWCACHE_ALIGN,
2264 NULL, NULL); 2267 NULL, NULL);
2265 if (!tcp_bucket_cachep) 2268 if (!tcp_bucket_cachep)
@@ -2277,9 +2280,9 @@ void __init tcp_init(void)
2277 * 2280 *
2278 * The methodology is similar to that of the buffer cache. 2281 * The methodology is similar to that of the buffer cache.
2279 */ 2282 */
2280 tcp_ehash = (struct tcp_ehash_bucket *) 2283 tcp_ehash =
2281 alloc_large_system_hash("TCP established", 2284 alloc_large_system_hash("TCP established",
2282 sizeof(struct tcp_ehash_bucket), 2285 sizeof(struct inet_ehash_bucket),
2283 thash_entries, 2286 thash_entries,
2284 (num_physpages >= 128 * 1024) ? 2287 (num_physpages >= 128 * 1024) ?
2285 (25 - PAGE_SHIFT) : 2288 (25 - PAGE_SHIFT) :
@@ -2294,9 +2297,9 @@ void __init tcp_init(void)
2294 INIT_HLIST_HEAD(&tcp_ehash[i].chain); 2297 INIT_HLIST_HEAD(&tcp_ehash[i].chain);
2295 } 2298 }
2296 2299
2297 tcp_bhash = (struct tcp_bind_hashbucket *) 2300 tcp_bhash =
2298 alloc_large_system_hash("TCP bind", 2301 alloc_large_system_hash("TCP bind",
2299 sizeof(struct tcp_bind_hashbucket), 2302 sizeof(struct inet_bind_hashbucket),
2300 tcp_ehash_size, 2303 tcp_ehash_size,
2301 (num_physpages >= 128 * 1024) ? 2304 (num_physpages >= 128 * 1024) ?
2302 (25 - PAGE_SHIFT) : 2305 (25 - PAGE_SHIFT) :
@@ -2315,7 +2318,7 @@ void __init tcp_init(void)
2315 * on available memory. 2318 * on available memory.
2316 */ 2319 */
2317 for (order = 0; ((1 << order) << PAGE_SHIFT) < 2320 for (order = 0; ((1 << order) << PAGE_SHIFT) <
2318 (tcp_bhash_size * sizeof(struct tcp_bind_hashbucket)); 2321 (tcp_bhash_size * sizeof(struct inet_bind_hashbucket));
2319 order++) 2322 order++)
2320 ; 2323 ;
2321 if (order >= 4) { 2324 if (order >= 4) {