Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 90601
b: refs/heads/master
c: 1294fc4
h: refs/heads/master
i:
  90599: 1ad0847
v: v3
  • Loading branch information
Stephen Hemminger authored and David S. Miller committed Apr 10, 2008
1 parent 3443261 commit 9d6ff23
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5969f71d57928511b9cd8744aaf1ed9bc5e88ea2
refs/heads/master: 1294fc4a4868d7e83ff749597fbf4e9d5f4d1aa0
10 changes: 4 additions & 6 deletions trunk/net/ipv4/route.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,16 +259,14 @@ static DEFINE_PER_CPU(struct rt_cache_stat, rt_cache_stat);
#define RT_CACHE_STAT_INC(field) \
(__raw_get_cpu_var(rt_cache_stat).field++)

static unsigned int rt_hash_code(u32 daddr, u32 saddr)
static inline unsigned int rt_hash(__be32 daddr, __be32 saddr, int idx)
{
return jhash_2words(daddr, saddr, atomic_read(&rt_genid))
return jhash_3words((__force u32)(__be32)(daddr),
(__force u32)(__be32)(saddr),
idx, atomic_read(&rt_genid))
& rt_hash_mask;
}

#define rt_hash(daddr, saddr, idx) \
rt_hash_code((__force u32)(__be32)(daddr),\
(__force u32)(__be32)(saddr) ^ ((idx) << 5))

#ifdef CONFIG_PROC_FS
struct rt_cache_iter_state {
struct seq_net_private p;
Expand Down

0 comments on commit 9d6ff23

Please sign in to comment.