diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2015-04-12 04:27:19 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2015-04-12 04:27:19 +0200 |
commit | 39c853ebfe169f187a760b34f9cbf54751bfce00 (patch) | |
tree | 2a5a741d0cff7d4f90998b31b32ff80cfccd0369 /include/net/ndisc.h | |
parent | sg_start_req(): use import_iovec() (diff) | |
parent | new helper: msg_data_left() (diff) | |
download | linux-39c853ebfe169f187a760b34f9cbf54751bfce00.tar.xz linux-39c853ebfe169f187a760b34f9cbf54751bfce00.zip |
Merge branch 'for-davem' into for-next
Diffstat (limited to 'include/net/ndisc.h')
-rw-r--r-- | include/net/ndisc.h | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/include/net/ndisc.h b/include/net/ndisc.h index 6bbda34d5e59..b3a7751251b4 100644 --- a/include/net/ndisc.h +++ b/include/net/ndisc.h @@ -156,24 +156,7 @@ static inline u32 ndisc_hashfn(const void *pkey, const struct net_device *dev, _ static inline struct neighbour *__ipv6_neigh_lookup_noref(struct net_device *dev, const void *pkey) { - struct neigh_hash_table *nht; - const u32 *p32 = pkey; - struct neighbour *n; - u32 hash_val; - - nht = rcu_dereference_bh(nd_tbl.nht); - hash_val = ndisc_hashfn(pkey, dev, nht->hash_rnd) >> (32 - nht->hash_shift); - for (n = rcu_dereference_bh(nht->hash_buckets[hash_val]); - n != NULL; - n = rcu_dereference_bh(n->next)) { - u32 *n32 = (u32 *) n->primary_key; - if (n->dev == dev && - ((n32[0] ^ p32[0]) | (n32[1] ^ p32[1]) | - (n32[2] ^ p32[2]) | (n32[3] ^ p32[3])) == 0) - return n; - } - - return NULL; + return ___neigh_lookup_noref(&nd_tbl, neigh_key_eq128, ndisc_hashfn, pkey, dev); } static inline struct neighbour *__ipv6_neigh_lookup(struct net_device *dev, const void *pkey) |