From: Kuniyuki Iwashima <kuniyu@google.com>
To: Andrew Lunn <andrew+netdev@lunn.ch>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
David Ahern <dsahern@kernel.org>,
Ido Schimmel <idosch@nvidia.com>
Cc: Simon Horman <horms@kernel.org>,
Kuniyuki Iwashima <kuniyu@google.com>,
Kuniyuki Iwashima <kuni1840@gmail.com>,
netdev@vger.kernel.org
Subject: [PATCH v1 net-next 01/11] neighbour: Remove __neigh_for_each_release().
Date: Thu, 6 Aug 2026 01:11:23 +0000 [thread overview]
Message-ID: <20260806011152.1170012-2-kuniyu@google.com> (raw)
In-Reply-To: <20260806011152.1170012-1-kuniyu@google.com>
Since commit 6deb53595092 ("net: remove unused ATM protocols
and legacy ATM device drivers"), there is no in-kernel user of
__neigh_for_each_release().
Let's remove it.
Signed-off-by: Kuniyuki Iwashima <kuniyu@google.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 8860cc2175fc..7847c29496ae 100644
--- a/include/net/neighbour.h
+++ b/include/net/neighbour.h
@@ -405,8 +405,6 @@ static inline struct net *pneigh_net(const struct pneigh_entry *pneigh)
void neigh_app_ns(struct neighbour *n);
void neigh_for_each(struct neigh_table *tbl,
void (*cb)(struct neighbour *, void *), void *cookie);
-void __neigh_for_each_release(struct neigh_table *tbl,
- int (*cb)(struct neighbour *));
int neigh_xmit(int fam, struct net_device *, const void *, struct sk_buff *);
struct neigh_seq_state {
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index 1349c0eedb64..69a5f9dfa851 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -3161,37 +3161,6 @@ void neigh_for_each(struct neigh_table *tbl, void (*cb)(struct neighbour *, void
}
EXPORT_SYMBOL(neigh_for_each);
-/* The tbl->lock must be held as a writer and BH disabled. */
-void __neigh_for_each_release(struct neigh_table *tbl,
- int (*cb)(struct neighbour *))
-{
- struct neigh_hash_table *nht;
- int chain;
-
- nht = rcu_dereference_protected(tbl->nht,
- lockdep_is_held(&tbl->lock));
- for (chain = 0; chain < (1 << nht->hash_shift); chain++) {
- struct hlist_node *tmp;
- struct neighbour *n;
-
- neigh_for_each_in_bucket_safe(n, tmp, &nht->hash_heads[chain]) {
- int release;
-
- write_lock(&n->lock);
- release = cb(n);
- if (release) {
- hlist_del_rcu(&n->hash);
- hlist_del_rcu(&n->dev_list);
- neigh_mark_dead(n);
- }
- write_unlock(&n->lock);
- if (release)
- neigh_cleanup_and_release(n);
- }
- }
-}
-EXPORT_SYMBOL(__neigh_for_each_release);
-
int neigh_xmit(int index, struct net_device *dev,
const void *addr, struct sk_buff *skb)
{
--
2.55.0.679.g6767b8d81c-goog
next prev parent reply other threads:[~2026-08-06 1:11 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-06 1:11 [PATCH v1 net-next 00/11] neighbour: Namespacify arp_tbl and nd_tbl Kuniyuki Iwashima
2026-08-06 1:11 ` Kuniyuki Iwashima [this message]
2026-08-06 1:11 ` [PATCH v1 net-next 02/11] neighbour: Remove lock dance for neigh_update_{gc,managed}_list() Kuniyuki Iwashima
2026-08-06 1:11 ` [PATCH v1 net-next 03/11] neighbour: Remove unnecessary EXPORT_SYMBOL() Kuniyuki Iwashima
2026-08-06 1:11 ` [PATCH v1 net-next 04/11] neighbour: Remove __rcu from neigh_tables[] Kuniyuki Iwashima
2026-08-06 1:11 ` [PATCH v1 net-next 05/11] neighbour: Store arp_tbl and nd_tbl in net->neigh_tables[] Kuniyuki Iwashima
2026-08-06 1:11 ` [PATCH v1 net-next 06/11] neighbour: Remove neigh_tables[] Kuniyuki Iwashima
2026-08-06 1:11 ` [PATCH v1 net-next 07/11] ipv4: Replace &arp_tbl with arp_table(net) Kuniyuki Iwashima
2026-08-06 1:11 ` [PATCH v1 net-next 08/11] ipv6: Replace &nd_tbl with nd_table(net) Kuniyuki Iwashima
2026-08-06 1:11 ` [PATCH v1 net-next 09/11] neighbour: Clean up neigh_table_init() and neigh_table_clear() Kuniyuki Iwashima
2026-08-06 1:11 ` [PATCH v1 net-next 10/11] neighbour: Namespacify neigh_tables Kuniyuki Iwashima
2026-08-06 1:11 ` [PATCH v1 net-next 11/11] neighbour: Remove unnecessary net_eq() Kuniyuki Iwashima
2026-08-06 3:38 ` [PATCH v1 net-next 00/11] neighbour: Namespacify arp_tbl and nd_tbl David Ahern
2026-08-06 13:45 ` Jakub Kicinski
2026-08-06 17:50 ` Kuniyuki Iwashima
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260806011152.1170012-2-kuniyu@google.com \
--to=kuniyu@google.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=idosch@nvidia.com \
--cc=kuba@kernel.org \
--cc=kuni1840@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox