All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] neighbour: delete neigh_lookup_nodev as not used
@ 2023-03-08  9:23 Leon Romanovsky
  2023-03-08  9:33 ` Eric Dumazet
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Leon Romanovsky @ 2023-03-08  9:23 UTC (permalink / raw)
  To: David S . Miller, Jakub Kicinski
  Cc: Leon Romanovsky, David Ahern, Eric Dumazet, netdev,
	Nikolay Aleksandrov, Paolo Abeni, Stephen Hemminger

From: Leon Romanovsky <leonro@nvidia.com>

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>
---
 include/net/neighbour.h |  2 --
 net/core/neighbour.c    | 31 -------------------------------
 2 files changed, 33 deletions(-)

diff --git a/include/net/neighbour.h b/include/net/neighbour.h
index 2f2a6023fb0e..234799ca527e 100644
--- a/include/net/neighbour.h
+++ b/include/net/neighbour.h
@@ -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,
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index 6798f6d2423b..0116b0ff91a7 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -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,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] neighbour: delete neigh_lookup_nodev as not used
  2023-03-08  9:23 [PATCH net-next] neighbour: delete neigh_lookup_nodev as not used Leon Romanovsky
@ 2023-03-08  9:33 ` Eric Dumazet
  2023-03-08 10:25 ` Nikolay Aleksandrov
  2023-03-10  7:30 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Eric Dumazet @ 2023-03-08  9:33 UTC (permalink / raw)
  To: Leon Romanovsky
  Cc: David S . Miller, Jakub Kicinski, Leon Romanovsky, David Ahern,
	netdev, Nikolay Aleksandrov, Paolo Abeni, Stephen Hemminger

On Wed, Mar 8, 2023 at 10:23 AM Leon Romanovsky <leon@kernel.org> wrote:
>
> From: Leon Romanovsky <leonro@nvidia.com>
>
> 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>

Thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] neighbour: delete neigh_lookup_nodev as not used
  2023-03-08  9:23 [PATCH net-next] neighbour: delete neigh_lookup_nodev as not used Leon Romanovsky
  2023-03-08  9:33 ` Eric Dumazet
@ 2023-03-08 10:25 ` Nikolay Aleksandrov
  2023-03-10  7:30 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Nikolay Aleksandrov @ 2023-03-08 10:25 UTC (permalink / raw)
  To: Leon Romanovsky, David S . Miller, Jakub Kicinski
  Cc: Leon Romanovsky, David Ahern, Eric Dumazet, netdev, Paolo Abeni,
	Stephen Hemminger

On 08/03/2023 11:23, Leon Romanovsky wrote:
> From: Leon Romanovsky <leonro@nvidia.com>
> 
> 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>
> ---
>  include/net/neighbour.h |  2 --
>  net/core/neighbour.c    | 31 -------------------------------
>  2 files changed, 33 deletions(-)
> 

Reviewed-by: Nikolay Aleksandrov <razor@blackwall.org>



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] neighbour: delete neigh_lookup_nodev as not used
  2023-03-08  9:23 [PATCH net-next] neighbour: delete neigh_lookup_nodev as not used Leon Romanovsky
  2023-03-08  9:33 ` Eric Dumazet
  2023-03-08 10:25 ` Nikolay Aleksandrov
@ 2023-03-10  7:30 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-03-10  7:30 UTC (permalink / raw)
  To: Leon Romanovsky
  Cc: davem, kuba, leonro, dsahern, edumazet, netdev, razor, pabeni, stephen

Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Wed,  8 Mar 2023 11:23:13 +0200 you wrote:
> From: Leon Romanovsky <leonro@nvidia.com>
> 
> 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>
> 
> [...]

Here is the summary with links:
  - [net-next] neighbour: delete neigh_lookup_nodev as not used
    https://git.kernel.org/netdev/net-next/c/76b9bf965c98

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-03-10  7:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-08  9:23 [PATCH net-next] neighbour: delete neigh_lookup_nodev as not used Leon Romanovsky
2023-03-08  9:33 ` Eric Dumazet
2023-03-08 10:25 ` Nikolay Aleksandrov
2023-03-10  7:30 ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.