From: Ido Schimmel <idosch@nvidia.com>
To: Kuniyuki Iwashima <kuniyu@google.com>
Cc: 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>, Simon Horman <horms@kernel.org>,
Kuniyuki Iwashima <kuni1840@gmail.com>,
netdev@vger.kernel.org
Subject: Re: [PATCH v5 net-next 00/15] neighbour: Namespacify arp_tbl and nd_tbl.
Date: Wed, 2 Sep 2026 17:30:23 +0300 [thread overview]
Message-ID: <20260902143023.GA3966681@shredder> (raw)
In-Reply-To: <20260901183327.3332855-1-kuniyu@google.com>
On Tue, Sep 01, 2026 at 06:32:49PM +0000, Kuniyuki Iwashima wrote:
> The neighbour subsystem is almost ready to drop RTNL.
>
> However, the control paths are serialised by the global
> per-table lock.
>
> This series converts arp_tbl and nd_tbl to per-netns table.
>
> With the series, /proc/sys/net/ipv{4,6}/neigh/default/ can
> be configured per netns, which was only configurable in
> init_net.
LGTM overall. Two notes:
1. The two periodic works (GC and the one for "managed" entries) are now
per-netns, including their intervals. An unpriv user can set an interval
of 0 and hog the CPU. Previously you needed CAP_NET_ADMIN in the init
netns.
neigh_managed_work() already has a floor for the re-queue delay since
commit ed6cd6a17896 ("net, neigh: Set lower cap for neigh_managed_work
rearming"). We need something similar for neigh_periodic_work().
Something like:
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index 27602bcbeb69..17817e30944b 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -1038,7 +1038,8 @@ static void neigh_periodic_work(struct work_struct *work)
* BASE_REACHABLE_TIME.
*/
queue_delayed_work(system_power_efficient_wq, &tbl->gc_work,
- NEIGH_VAR(&tbl->parms, BASE_REACHABLE_TIME) >> 1);
+ max(NEIGH_VAR(&tbl->parms, BASE_REACHABLE_TIME) >> 1,
+ HZ));
spin_unlock_bh(&tbl->lock);
}
2. Related to the first point, we are now going to schedule periodic
work per-netns for "managed" entries which are quite exotic. Better to
schedule it only when we have such entries instead of unconditionally
from neigh_table_init().
I think both can be done in a follow-up given you are already at 15
patches. The first is more critical, obviously.
Thanks!
next prev parent reply other threads:[~2026-09-02 14:30 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-01 18:32 [PATCH v5 net-next 00/15] neighbour: Namespacify arp_tbl and nd_tbl Kuniyuki Iwashima
2026-09-01 18:32 ` [PATCH v5 net-next 01/15] selftest: net: Deflake Periodic GC test in test_neigh.sh Kuniyuki Iwashima
2026-09-01 18:32 ` [PATCH v5 net-next 02/15] neighbour: Remove __neigh_for_each_release() Kuniyuki Iwashima
2026-09-01 18:32 ` [PATCH v5 net-next 03/15] neighbour: Remove lock dance for neigh_update_{gc,managed}_list() Kuniyuki Iwashima
2026-09-01 18:32 ` [PATCH v5 net-next 04/15] neighbour: Remove unnecessary EXPORT_SYMBOL() Kuniyuki Iwashima
2026-09-01 18:32 ` [PATCH v5 net-next 05/15] neighbour: Remove __rcu from neigh_tables[] Kuniyuki Iwashima
2026-09-01 18:32 ` [PATCH v5 net-next 06/15] neighbour: Store arp_tbl and nd_tbl in net->neigh_tables[] Kuniyuki Iwashima
2026-09-01 18:32 ` [PATCH v5 net-next 07/15] neighbour: Remove neigh_tables[] Kuniyuki Iwashima
2026-09-01 18:32 ` [PATCH v5 net-next 08/15] ipv4: Replace &arp_tbl with arp_table(net) Kuniyuki Iwashima
2026-09-01 18:32 ` [PATCH v5 net-next 09/15] ipv6: Replace &nd_tbl with nd_table(net) Kuniyuki Iwashima
2026-09-01 18:32 ` [PATCH v5 net-next 10/15] neighbour: Clean up neigh_table_init() and neigh_table_clear() Kuniyuki Iwashima
2026-09-01 18:33 ` [PATCH v5 net-next 11/15] neighbour: Convert neigh_table.entries to refcount_t Kuniyuki Iwashima
2026-09-01 18:33 ` [PATCH v5 net-next 12/15] neighbour: Namespacify neigh_tables Kuniyuki Iwashima
2026-09-02 13:29 ` Ido Schimmel
2026-09-02 16:53 ` Kuniyuki Iwashima
2026-09-01 18:33 ` [PATCH v5 net-next 13/15] neighbour: Don't store net in struct pneigh_entry Kuniyuki Iwashima
2026-09-01 18:33 ` [PATCH v5 net-next 14/15] neighbour: Remove unnecessary net_eq() Kuniyuki Iwashima
2026-09-01 18:33 ` [PATCH v5 net-next 15/15] selftest: net: Specify netns for ip ntable in test_neigh.sh Kuniyuki Iwashima
2026-09-02 14:30 ` Ido Schimmel [this message]
2026-09-02 16:56 ` [PATCH v5 net-next 00/15] neighbour: Namespacify arp_tbl and nd_tbl 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=20260902143023.GA3966681@shredder \
--to=idosch@nvidia.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=kuni1840@gmail.com \
--cc=kuniyu@google.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;
as well as URLs for NNTP newsgroup(s).