route.c (05668381140309088443bf5dc53add4104610fbb) | route.c (8a25d5debff2daee280e83e09d8c25d67c26a972) |
---|---|
1/* 2 * INET An implementation of the TCP/IP protocol suite for the LINUX 3 * operating system. INET is implemented using the BSD Socket 4 * interface as the means of communication with the user level. 5 * 6 * ROUTE - implementation of the IP router. 7 * 8 * Version: $Id: route.c,v 1.103 2002/01/12 07:44:09 davem Exp $ --- 191 unchanged lines hidden (view full) --- 200 * 3) Only readers acquire references to rtable entries, 201 * they do so with atomic increments and with the 202 * lock held. 203 */ 204 205struct rt_hash_bucket { 206 struct rtable *chain; 207}; | 1/* 2 * INET An implementation of the TCP/IP protocol suite for the LINUX 3 * operating system. INET is implemented using the BSD Socket 4 * interface as the means of communication with the user level. 5 * 6 * ROUTE - implementation of the IP router. 7 * 8 * Version: $Id: route.c,v 1.103 2002/01/12 07:44:09 davem Exp $ --- 191 unchanged lines hidden (view full) --- 200 * 3) Only readers acquire references to rtable entries, 201 * they do so with atomic increments and with the 202 * lock held. 203 */ 204 205struct rt_hash_bucket { 206 struct rtable *chain; 207}; |
208#if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK) | 208#if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK) || \ 209 defined(CONFIG_PROVE_LOCKING) |
209/* 210 * Instead of using one spinlock for each rt_hash_bucket, we use a table of spinlocks 211 * The size of this table is a power of two and depends on the number of CPUS. 212 */ 213#if NR_CPUS >= 32 214#define RT_HASH_LOCK_SZ 4096 215#elif NR_CPUS >= 16 216#define RT_HASH_LOCK_SZ 2048 --- 2984 unchanged lines hidden --- | 210/* 211 * Instead of using one spinlock for each rt_hash_bucket, we use a table of spinlocks 212 * The size of this table is a power of two and depends on the number of CPUS. 213 */ 214#if NR_CPUS >= 32 215#define RT_HASH_LOCK_SZ 4096 216#elif NR_CPUS >= 16 217#define RT_HASH_LOCK_SZ 2048 --- 2984 unchanged lines hidden --- |