route.c (7db74a4780cf9cc6b2ea97582cdc8031d5f22ccd) route.c (dbd2915ce87e811165da0717f8e159276ebb803e)
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 $

--- 227 unchanged lines hidden (view full) ---

236#endif
237
238static struct rt_hash_bucket *rt_hash_table;
239static unsigned rt_hash_mask;
240static int rt_hash_log;
241static unsigned int rt_hash_rnd;
242
243static DEFINE_PER_CPU(struct rt_cache_stat, rt_cache_stat);
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 $

--- 227 unchanged lines hidden (view full) ---

236#endif
237
238static struct rt_hash_bucket *rt_hash_table;
239static unsigned rt_hash_mask;
240static int rt_hash_log;
241static unsigned int rt_hash_rnd;
242
243static DEFINE_PER_CPU(struct rt_cache_stat, rt_cache_stat);
244#define RT_CACHE_STAT_INC(field) (__get_cpu_var(rt_cache_stat).field++)
244#define RT_CACHE_STAT_INC(field) \
245 (per_cpu(rt_cache_stat, raw_smp_processor_id()).field++)
245
246static int rt_intern_hash(unsigned hash, struct rtable *rth,
247 struct rtable **res);
248
249static unsigned int rt_hash_code(u32 daddr, u32 saddr, u8 tos)
250{
251 return (jhash_3words(daddr, saddr, (u32) tos, rt_hash_rnd)
252 & rt_hash_mask);

--- 2954 unchanged lines hidden ---
246
247static int rt_intern_hash(unsigned hash, struct rtable *rth,
248 struct rtable **res);
249
250static unsigned int rt_hash_code(u32 daddr, u32 saddr, u8 tos)
251{
252 return (jhash_3words(daddr, saddr, (u32) tos, rt_hash_rnd)
253 & rt_hash_mask);

--- 2954 unchanged lines hidden ---