aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/tcp.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@ghostprotocols.net>2005-08-09 23:07:35 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2005-08-29 18:41:44 -0400
commit6e04e02165a7209a71db553b7bc48d68421e5ebf (patch)
tree004157924013e6c099cacac59f39d3dd61f3e0e5 /include/net/tcp.h
parent2d8c4ce51903636ce0f60addc8134aa50ab8fa76 (diff)
[INET]: Move tcp_port_rover to inet_hashinfo
Also expose all of the tcp_hashinfo members, i.e. killing those tcp_ehash, etc macros, this will more clearly expose already generic functions and some that need just a bit of work to become generic, as we'll see in the upcoming changesets. Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/tcp.h')
-rw-r--r--include/net/tcp.h26
1 files changed, 7 insertions, 19 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 9eb8ff7c911e..99e47695d4b6 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -41,19 +41,7 @@
41#endif 41#endif
42#include <linux/seq_file.h> 42#include <linux/seq_file.h>
43 43
44extern struct inet_hashinfo tcp_hashinfo; 44extern struct inet_hashinfo tcp_hashinfo;
45#define tcp_ehash (tcp_hashinfo.ehash)
46#define tcp_bhash (tcp_hashinfo.bhash)
47#define tcp_ehash_size (tcp_hashinfo.ehash_size)
48#define tcp_bhash_size (tcp_hashinfo.bhash_size)
49#define tcp_listening_hash (tcp_hashinfo.listening_hash)
50#define tcp_lhash_lock (tcp_hashinfo.lhash_lock)
51#define tcp_lhash_users (tcp_hashinfo.lhash_users)
52#define tcp_lhash_wait (tcp_hashinfo.lhash_wait)
53#define tcp_portalloc_lock (tcp_hashinfo.portalloc_lock)
54#define tcp_bucket_cachep (tcp_hashinfo.bind_bucket_cachep)
55
56extern int tcp_port_rover;
57 45
58#if (BITS_PER_LONG == 64) 46#if (BITS_PER_LONG == 64)
59#define TCP_ADDRCMP_ALIGN_BYTES 8 47#define TCP_ADDRCMP_ALIGN_BYTES 8
@@ -1463,21 +1451,21 @@ extern void tcp_listen_wlock(void);
1463 1451
1464/* - We may sleep inside this lock. 1452/* - We may sleep inside this lock.
1465 * - If sleeping is not required (or called from BH), 1453 * - If sleeping is not required (or called from BH),
1466 * use plain read_(un)lock(&tcp_lhash_lock). 1454 * use plain read_(un)lock(&inet_hashinfo.lhash_lock).
1467 */ 1455 */
1468 1456
1469static inline void tcp_listen_lock(void) 1457static inline void tcp_listen_lock(void)
1470{ 1458{
1471 /* read_lock synchronizes to candidates to writers */ 1459 /* read_lock synchronizes to candidates to writers */
1472 read_lock(&tcp_lhash_lock); 1460 read_lock(&tcp_hashinfo.lhash_lock);
1473 atomic_inc(&tcp_lhash_users); 1461 atomic_inc(&tcp_hashinfo.lhash_users);
1474 read_unlock(&tcp_lhash_lock); 1462 read_unlock(&tcp_hashinfo.lhash_lock);
1475} 1463}
1476 1464
1477static inline void tcp_listen_unlock(void) 1465static inline void tcp_listen_unlock(void)
1478{ 1466{
1479 if (atomic_dec_and_test(&tcp_lhash_users)) 1467 if (atomic_dec_and_test(&tcp_hashinfo.lhash_users))
1480 wake_up(&tcp_lhash_wait); 1468 wake_up(&tcp_hashinfo.lhash_wait);
1481} 1469}
1482 1470
1483static inline int keepalive_intvl_when(const struct tcp_sock *tp) 1471static inline int keepalive_intvl_when(const struct tcp_sock *tp)