Re: [PATCH net-next v5 0/4] net: make moving a device to another netns cheaper
From: Qiliang Yuan
Date: Mon Nov 23 2026 - 02:02:21 EST
On Sat, Nov 21, 2026 at 06:21:18PM -0500, Qiliang Yuan wrote:
> Moving a device to another netns waits in rcu_barrier() with RTNL held.
[...]
Please drop this series, I'm not going to post a v6.
The barrier also waits for the RCU callbacks that release routes cached
through the device, and some users never check their route again before
sending. With v5, a UDP datagram corked on a route through the device
goes out through it after the move. Retiring the cached routes when the
device goes down doesn't close this either: a lookup that picked the
nexthop before NETDEV_DOWN can cache the route after the flush, and
that route is again only released by the callbacks. With the lookup
delayed across NETDEV_DOWN and the callbacks delayed, the corked
datagram went out through the moved device in 2/10 trials on a plain
IPv4 route and 9/10 through a nexthop object, and in none on net-next.
Closing that window would take a check after every route cache
insertion, which isn't worth it for this.
The init_net blackhole that came up in v5 3/4 is an existing bug and I
sent a fix for it to net [1].
Thanks to Ralf for the reviews.
[1] https://lore.kernel.org/r/20261123-bug-net-ipv6-dst-check-released-v1-1-769d320a2470@xxxxxxxxx
Thanks,
Qiliang