Commit 8e022ee6 authored by YOSHIFUJI Hideaki / 吉藤英明's avatar YOSHIFUJI Hideaki / 吉藤英明 Committed by David S. Miller

ndisc: Remove tbl argument for __ipv6_neigh_lookup().

We can refer to nd_tbl directly.
Signed-off-by: default avatarYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7ff74a59
...@@ -148,7 +148,7 @@ static inline u32 ndisc_hashfn(const void *pkey, const struct net_device *dev, _ ...@@ -148,7 +148,7 @@ static inline u32 ndisc_hashfn(const void *pkey, const struct net_device *dev, _
(p32[3] * hash_rnd[3])); (p32[3] * hash_rnd[3]));
} }
static inline struct neighbour *__ipv6_neigh_lookup(struct neigh_table *tbl, struct net_device *dev, const void *pkey) static inline struct neighbour *__ipv6_neigh_lookup(struct net_device *dev, const void *pkey)
{ {
struct neigh_hash_table *nht; struct neigh_hash_table *nht;
const u32 *p32 = pkey; const u32 *p32 = pkey;
...@@ -156,7 +156,7 @@ static inline struct neighbour *__ipv6_neigh_lookup(struct neigh_table *tbl, str ...@@ -156,7 +156,7 @@ static inline struct neighbour *__ipv6_neigh_lookup(struct neigh_table *tbl, str
u32 hash_val; u32 hash_val;
rcu_read_lock_bh(); rcu_read_lock_bh();
nht = rcu_dereference_bh(tbl->nht); nht = rcu_dereference_bh(nd_tbl.nht);
hash_val = ndisc_hashfn(pkey, dev, nht->hash_rnd) >> (32 - nht->hash_shift); hash_val = ndisc_hashfn(pkey, dev, nht->hash_rnd) >> (32 - nht->hash_shift);
for (n = rcu_dereference_bh(nht->hash_buckets[hash_val]); for (n = rcu_dereference_bh(nht->hash_buckets[hash_val]);
n != NULL; n != NULL;
......
...@@ -145,7 +145,7 @@ static struct neighbour *ip6_neigh_lookup(const struct dst_entry *dst, ...@@ -145,7 +145,7 @@ static struct neighbour *ip6_neigh_lookup(const struct dst_entry *dst,
struct neighbour *n; struct neighbour *n;
daddr = choose_neigh_daddr(rt, skb, daddr); daddr = choose_neigh_daddr(rt, skb, daddr);
n = __ipv6_neigh_lookup(&nd_tbl, dst->dev, daddr); n = __ipv6_neigh_lookup(dst->dev, daddr);
if (n) if (n)
return n; return n;
return neigh_create(&nd_tbl, daddr, dst->dev); return neigh_create(&nd_tbl, daddr, dst->dev);
...@@ -153,7 +153,7 @@ static struct neighbour *ip6_neigh_lookup(const struct dst_entry *dst, ...@@ -153,7 +153,7 @@ static struct neighbour *ip6_neigh_lookup(const struct dst_entry *dst,
static int rt6_bind_neighbour(struct rt6_info *rt, struct net_device *dev) static int rt6_bind_neighbour(struct rt6_info *rt, struct net_device *dev)
{ {
struct neighbour *n = __ipv6_neigh_lookup(&nd_tbl, dev, &rt->rt6i_gateway); struct neighbour *n = __ipv6_neigh_lookup(dev, &rt->rt6i_gateway);
if (!n) { if (!n) {
n = neigh_create(&nd_tbl, &rt->rt6i_gateway, dev); n = neigh_create(&nd_tbl, &rt->rt6i_gateway, dev);
if (IS_ERR(n)) if (IS_ERR(n))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment