diff options
| author | Kuniyuki Iwashima <kuniyu@google.com> | 2026-09-02 20:36:50 +0000 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-09-04 15:02:58 -0700 |
| commit | df5f4f372de55e3f0ba24cc2c435e536b297d397 (patch) | |
| tree | efdc075eba7347f8eb3f356aad0a28db73ccc5f6 /include | |
| parent | 2430df635a59b2a06cc9b5e56da1372cfef7a1e9 (diff) | |
ipv6: Replace &nd_tbl with nd_table(net).
We will allocate per-netns neigh_table in net->neigh_tables[].
Let's replace &nd_tbl with nd_table(net).
Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>
Reviewed-by: Nikolay Aleksandrov <razor@blackwall.org>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Link: https://patch.msgid.link/20260902203722.926528-10-kuniyu@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/net/ndisc.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/include/net/ndisc.h b/include/net/ndisc.h index 8516c7ff6e92..96e3bb6e83af 100644 --- a/include/net/ndisc.h +++ b/include/net/ndisc.h @@ -363,7 +363,9 @@ 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) { - return ___neigh_lookup_noref(&nd_tbl, neigh_key_eq128, ndisc_hashfn, pkey, dev); + struct neigh_table *tbl = nd_table(dev_net(dev)); + + return ___neigh_lookup_noref(tbl, neigh_key_eq128, ndisc_hashfn, pkey, dev); } static inline struct neighbour *__ipv6_neigh_lookup(struct net_device *dev, const void *pkey) @@ -397,8 +399,11 @@ static inline struct neighbour *ip_neigh_gw6(struct net_device *dev, struct neighbour *neigh; neigh = __ipv6_neigh_lookup_noref(dev, addr); - if (unlikely(!neigh)) - neigh = __neigh_create(&nd_tbl, addr, dev, false); + if (unlikely(!neigh)) { + struct neigh_table *tbl = nd_table(dev_net(dev)); + + neigh = __neigh_create(tbl, addr, dev, false); + } return neigh; #else |
