diff options
author | Arnaldo Carvalho de Melo <acme@ghostprotocols.net> | 2005-08-09 22:59:44 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2005-08-29 18:38:32 -0400 |
commit | 0f7ff9274e72fd254fbd1ab117bbc1db6e7cdb34 (patch) | |
tree | 95736729a2f5302666604c4287a2af97ececd734 /net/ipv4/tcp.c | |
parent | 304a16180fb6d2b153b45f6fbbcec1fa814496e5 (diff) |
[INET]: Just rename the TCP hashtable functions/structs to inet_
This is to break down the complexity of the series of patches,
making it very clear that this one just does:
1. renames tcp_ prefixed hashtable functions and data structures that
were already mostly generic to inet_ to share it with DCCP and
other INET transport protocols.
2. Removes not used functions (__tb_head & tb_head)
3. Removes some leftover prototypes in the headers (tcp_bucket_unlock &
tcp_v4_build_header)
Next changesets will move tcp_sk(sk)->bind_hash to inet_sock so that we can
make functions such as tcp_inherit_port, __tcp_inherit_port, tcp_v4_get_port,
__tcp_put_port, generic and get others like tcp_destroy_sock closer to generic
(tcp_orphan_count will go to sk->sk_prot to allow this).
Eventually most of these functions will be used passing the transport protocol
inet_hashinfo structure.
Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp.c')
-rw-r--r-- | net/ipv4/tcp.c | 15 |
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; | |||
272 | DEFINE_SNMP_STAT(struct tcp_mib, tcp_statistics); | 272 | DEFINE_SNMP_STAT(struct tcp_mib, tcp_statistics); |
273 | 273 | ||
274 | kmem_cache_t *tcp_bucket_cachep; | 274 | kmem_cache_t *tcp_bucket_cachep; |
275 | |||
276 | EXPORT_SYMBOL_GPL(tcp_bucket_cachep); | ||
277 | |||
275 | kmem_cache_t *tcp_timewait_cachep; | 278 | kmem_cache_t *tcp_timewait_cachep; |
276 | 279 | ||
277 | atomic_t tcp_orphan_count = ATOMIC_INIT(0); | 280 | atomic_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) { |