diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-09 11:01:37 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-09 11:01:37 -0500 |
commit | f049274b012fd3b50113f194bfbbcbc3143d0da3 (patch) | |
tree | 15ef947c1959da3196d8dbc524b435972f6d37f7 /include/net/inet_hashtables.h | |
parent | b37df85960a34dd96d0a4695c650f7972ef56c30 (diff) | |
parent | 1539b98b561754252dd520b98fa03a688a4f81b5 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (79 commits)
[IPX]: Fix NULL pointer dereference on ipx unload
[ATM]: atmarp.h needs to always include linux/types.h
[NET]: Fix net/socket.c warnings.
[NET]: cleanup sock_from_file()
[NET]: change layout of ehash table
[S390]: Add AF_IUCV socket support
[S390]: Adapt special message interface to new IUCV API
[S390]: Adapt netiucv driver to new IUCV API
[S390]: Adapt vmlogrdr driver to new IUCV API
[S390]: Adapt monreader driver to new IUCV API
[S390]: Rewrite of the IUCV base code, part 2
[S390]: Rewrite of the IUCV base code, part 1
[X.25]: Adds /proc/net/x25/forward to view active forwarded calls.
[X.25]: Adds /proc/sys/net/x25/x25_forward to control forwarding.
[X.25]: Add call forwarding
[XFRM]: xfrm_migrate() needs exporting to modules.
[PFKEYV2]: CONFIG_NET_KEY_MIGRATE option
[PFKEYV2]: Extension for dynamic update of endpoint address(es)
[XFRM]: CONFIG_XFRM_MIGRATE option
[XFRM]: User interface for handling XFRM_MSG_MIGRATE
...
Diffstat (limited to 'include/net/inet_hashtables.h')
-rw-r--r-- | include/net/inet_hashtables.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/net/inet_hashtables.h b/include/net/inet_hashtables.h index 34cc76e3ddb4..d27ee8c0da3f 100644 --- a/include/net/inet_hashtables.h +++ b/include/net/inet_hashtables.h | |||
@@ -34,12 +34,13 @@ | |||
34 | #include <asm/byteorder.h> | 34 | #include <asm/byteorder.h> |
35 | 35 | ||
36 | /* This is for all connections with a full identity, no wildcards. | 36 | /* This is for all connections with a full identity, no wildcards. |
37 | * New scheme, half the table is for TIME_WAIT, the other half is | 37 | * One chain is dedicated to TIME_WAIT sockets. |
38 | * for the rest. I'll experiment with dynamic table growth later. | 38 | * I'll experiment with dynamic table growth later. |
39 | */ | 39 | */ |
40 | struct inet_ehash_bucket { | 40 | struct inet_ehash_bucket { |
41 | rwlock_t lock; | 41 | rwlock_t lock; |
42 | struct hlist_head chain; | 42 | struct hlist_head chain; |
43 | struct hlist_head twchain; | ||
43 | }; | 44 | }; |
44 | 45 | ||
45 | /* There are a few simple rules, which allow for local port reuse by | 46 | /* There are a few simple rules, which allow for local port reuse by |
@@ -97,8 +98,7 @@ struct inet_hashinfo { | |||
97 | * | 98 | * |
98 | * TCP_ESTABLISHED <= sk->sk_state < TCP_CLOSE | 99 | * TCP_ESTABLISHED <= sk->sk_state < TCP_CLOSE |
99 | * | 100 | * |
100 | * First half of the table is for sockets not in TIME_WAIT, second half | 101 | * TIME_WAIT sockets use a separate chain (twchain). |
101 | * is for TIME_WAIT sockets only. | ||
102 | */ | 102 | */ |
103 | struct inet_ehash_bucket *ehash; | 103 | struct inet_ehash_bucket *ehash; |
104 | 104 | ||
@@ -369,7 +369,7 @@ static inline struct sock * | |||
369 | } | 369 | } |
370 | 370 | ||
371 | /* Must check for a TIME_WAIT'er before going to listener hash. */ | 371 | /* Must check for a TIME_WAIT'er before going to listener hash. */ |
372 | sk_for_each(sk, node, &(head + hashinfo->ehash_size)->chain) { | 372 | sk_for_each(sk, node, &head->twchain) { |
373 | if (INET_TW_MATCH(sk, hash, acookie, saddr, daddr, ports, dif)) | 373 | if (INET_TW_MATCH(sk, hash, acookie, saddr, daddr, ports, dif)) |
374 | goto hit; | 374 | goto hit; |
375 | } | 375 | } |