]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
neighbour: delete neigh_lookup_nodev as not used
authorLeon Romanovsky <leonro@nvidia.com>
Wed, 8 Mar 2023 09:23:13 +0000 (11:23 +0200)
committerRoxana Nicolescu <roxana.nicolescu@canonical.com>
Mon, 2 Oct 2023 15:19:14 +0000 (17:19 +0200)
BugLink: https://bugs.launchpad.net/bugs/2033931
commit 76b9bf965c98c9b53ef7420b3b11438dbd764f92 upstream.

neigh_lookup_nodev isn't used in the kernel after removal
of DECnet. So let's remove it.

Fixes: 1202cdd66531 ("Remove DECnet support from kernel")
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Nikolay Aleksandrov <razor@blackwall.org>
Link: https://lore.kernel.org/r/eb5656200d7964b2d177a36b77efa3c597d6d72d.1678267343.git.leonro@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
include/net/neighbour.h
net/core/neighbour.c

index 94a1599824d8f9f90f77ae90cfe39fd474dc3a69..794e45981891a60b4aefd6b6551f2a46e4dfc599 100644 (file)
@@ -336,8 +336,6 @@ void neigh_table_init(int index, struct neigh_table *tbl);
 int neigh_table_clear(int index, struct neigh_table *tbl);
 struct neighbour *neigh_lookup(struct neigh_table *tbl, const void *pkey,
                               struct net_device *dev);
-struct neighbour *neigh_lookup_nodev(struct neigh_table *tbl, struct net *net,
-                                    const void *pkey);
 struct neighbour *__neigh_create(struct neigh_table *tbl, const void *pkey,
                                 struct net_device *dev, bool want_ref);
 static inline struct neighbour *neigh_create(struct neigh_table *tbl,
index 4edd2176e238516260fc1898b703359ed11ecd15..1691049960b480cdb4dc6496c786c512e0c283ae 100644 (file)
@@ -627,37 +627,6 @@ struct neighbour *neigh_lookup(struct neigh_table *tbl, const void *pkey,
 }
 EXPORT_SYMBOL(neigh_lookup);
 
-struct neighbour *neigh_lookup_nodev(struct neigh_table *tbl, struct net *net,
-                                    const void *pkey)
-{
-       struct neighbour *n;
-       unsigned int key_len = tbl->key_len;
-       u32 hash_val;
-       struct neigh_hash_table *nht;
-
-       NEIGH_CACHE_STAT_INC(tbl, lookups);
-
-       rcu_read_lock_bh();
-       nht = rcu_dereference_bh(tbl->nht);
-       hash_val = tbl->hash(pkey, NULL, 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)) {
-               if (!memcmp(n->primary_key, pkey, key_len) &&
-                   net_eq(dev_net(n->dev), net)) {
-                       if (!refcount_inc_not_zero(&n->refcnt))
-                               n = NULL;
-                       NEIGH_CACHE_STAT_INC(tbl, hits);
-                       break;
-               }
-       }
-
-       rcu_read_unlock_bh();
-       return n;
-}
-EXPORT_SYMBOL(neigh_lookup_nodev);
-
 static struct neighbour *
 ___neigh_create(struct neigh_table *tbl, const void *pkey,
                struct net_device *dev, u32 flags,