🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #20769

Re: [PATCH net-next v5 0/4] net: make moving a device to another netns cheaper

#20769
From: Qiliang Yuan
Date: Mon, 23 Nov 2026 07:02
29 lines
9471 bytes
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@linux.dev

Thanks,
Qiliang
Technical Details
Message-ID: <20261123070201.4117929-1-qiliang.yuan@linux.dev>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-369090-linux-kernel-netdev=dewy.ru
References: <20261121-bug-net-netns-move-rcu-barrier-v5-0-100a3b5d9090@linux.dev>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-369090-linux-kernel-netdev=dewy.ru
From: qiliang.yuan@linux.dev (Qiliang Yuan)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next v5 0/4] net: make moving a device to another netns cheaper
Date: Mon, 23 Nov 2026 02:02:01 -0500
Organization: Usenet Network
Message-ID: <20261123070201.4117929-1-qiliang.yuan@linux.dev>
References: <20261121-bug-net-netns-move-rcu-barrier-v5-0-100a3b5d9090@linux.dev>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="3813182"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:kf+c7nmY39LMG18AzmSw4g5VB7g= sha256:pIefMJjZAmsShMRQdClHftIcry1U4c+yG+H9I5We41Y=
	sha1:K2+r67muI+WeVNHRk1WEKCF6yZo= sha256:rx/jqmIVxe5aEmkEYZ+pSdlceWfi5/pgMAWGYmiEqA8=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 37055125D90; Mon, 23 Nov 2026 10:02:41 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.05
X-Spam-Status: No, score=-3.05 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (1024-bit key)
	header.d=linux.dev
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id ArAdhNbxirHW;
	Mon, 23 Nov 2026 10:02:37 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-369090-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=linux.dev
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id 450F9125D8E; Mon, 23 Nov 2026 10:02:24 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sea.lore.kernel.org (Postfix) with ESMTP id ED7562EC96; Mon, 23 Nov 2026 07:02:15 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1795417334;
	b=abALsTS2oe/OGYJdbqUv/4C+Np2amJMevvoXqmBOeEhBgAtRM8rpHGaDDSGEx2KPu8Je
	 hY6zcEYqAO98b2FdtbkExZtP2PR+i0kXtusebgHSqJTG0qm1fqalKEZsw8CCgeOqAUaes
	 QBvZsjA7Bny3BhTLbJqGVjW4SpW6er9reB+WROxkJHJpsbulkjNSPMrKGRTGsb6ZPZTkP
	 sY0FRuAhhc/2lmBQ0Y1USOCaA6D+yI6nIAcAGgewQXO6b01jGUJV5oFNSo/v8Y7rV2B2Y
	 oa8exCme0BlCHrWGALbv35vnqh2xwU8WivrSM5XniuUxVd++xtFwQxlSj40/r2Bb7uQ==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795417334;
	h=X-Original-To:Received:DMARC-Filter:X-Envelope-To:DKIM-Signature:
	 X-Envelope-To:Received:X-Mizu-Trace-ID:X-Migadu-Flow:From:To:Cc:
	 Subject:Date:Message-ID:X-Mailer:In-Reply-To:References:
	 X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
	 List-Unsubscribe:List-Owner:Precedence:MIME-Version:
	 Content-Transfer-Encoding;
	bh=y7v+P8bJqEof0yPy+kUZoCNH441jx4UihzMQ7Aabsd8=;
	b=BH3lrSvrkebtUgrErmIWUaDxxgdWj3n5uih5WWv15p1DovLbB+CJpSi7nZtUyJCGDeRh
	 eVRyCK+zS8fqRtq/xKf49pZ8QthC5nI6m58E/FFCHbzzjRt/pymvQk1PMF6CMXCaXQ432
	 cLUAMmYBXpw4vg2eOarF92o4kM0Pirt2S8YGUEcRgSMwgfn5zta1wtcabbTUKG9Mm8Pci
	 z9Ib0gdwg1jhmMMXl3QAhsBA+Gm+Z3ySKsMzR2GzPZyYVT4lfzp+PCG7of9/mpQ+z4rsU
	 6WHTwRecdnDwYZ/IMxwq3geLoKkU0mQf9Tfywnj1NKvka3BKD00D63bP3lyPIRSuYfw==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=iAOiKLio;
	dmarc=pass header.from=linux.dev;
	spf=pass smtp.mailfrom=linux.dev;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 6FC47606A69A;
	Mon, 23 Nov 2026 07:02:14 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=iAOiKLio
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=95.215.58.169
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1795417333;
	b=yTihTvcvNt/NGDNAdrkHZo6OxpDp2o9h/TSwnq42PAJGDUyw4FkZIlRyGqdU4kLf7DBD
	 q3kOVBAyXquVpyrCzbDDR5Z7lbTMPF64bPTFMDIeIRdNqlzsrKEJT55JMvMsU8emI0z3p
	 z6WDJevCEJeFJGpn1mVLT7eYEkjzR+R8ALQeBJ1SE84oOIv5J+ri35WIV7qQHszkw5guG
	 nc02wpcsrJmuE5UQSFAukV0qBs0EcMUmT7V0F8jEpcJGC0RGhpFdds1ki8jdwWmfWsdPM
	 Fv8ysP7pf8iHRuJLpwscp7Aafj+xGPm9oOA2uN9wFzeSvFCr+cqdPc3RtA/DEyuhlkA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795417333;
	h=DMARC-Filter:X-Envelope-To:DKIM-Signature:X-Envelope-To:Received:
	 X-Mizu-Trace-ID:X-Migadu-Flow:From:To:Cc:Subject:Date:Message-ID:
	 X-Mailer:In-Reply-To:References:MIME-Version:
	 Content-Transfer-Encoding;
	bh=y7v+P8bJqEof0yPy+kUZoCNH441jx4UihzMQ7Aabsd8=;
	b=XDXL4FlHAo5YnEzpEC+0f99inXj4Yz1lE8UTQpkVrJSKNJgAU2qex3UBBD9G05IriJzL
	 BEzSX3buCD3XU00PUAWzvQttROo3+38V6SFS+bFPYRbzVpH4uYfc9Dsq0cki1c3kUpJbJ
	 1jOLUnC52HA3THliEBzSkAuVIXiCIUkH6wgzL0sfe+9NjUSCnrl3N6o1xo1nvBAeQVCZ4
	 flw98pSzF8hM5SUSzi1Wv42wRCa05l8Kd/pfyourB4lNGBN1WICXJ8g85J9Wa2enTGtjD
	 ucCbMVVHO3bfU9c1lDr5+5Uf8pbnm9Szn9G5eTVPTsAxfzJbSivFvuXnsrrRXedPi+A==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=linux.dev;
	spf=pass smtp.mailfrom=linux.dev;
	dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=iAOiKLio;
	arc=none smtp.remote-ip=95.215.58.169
X-Received: from mta1.migadu.com (out-169.mta1.migadu.com [95.215.58.169])
	(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0447C606A683
	for <netdev@vger.kernel.org>; Mon, 23 Nov 2026 07:02:12 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 0447C606A683
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev
X-Envelope-To: netdev@vger.kernel.org
X-DKIM-Signature: a=rsa-sha256; bh=y7v+P8bJqEof0yPy+kUZoCNH441jx4UihzMQ7Aabsd8=;
 c=simple/simple; d=linux.dev;
 h=from:to:subject:date:message-id:mime-version:content-type; s=key1;
 t=1795417330; v=1; x=1796022130;
 b=iAOiKLioPKAj1vFLeKvMRq1XnMFLpAkNrLGOmAzzPk9a4s1uv61Oezn+Cx6rPz9njZn9OuBj
 /C9QXg4Y1neQ6XoUUfB1yrUqrggSCu8Jbo9skvh5MZeZIlQBbRMjOH4JuTYK9vXVzNOV+8BE9t+
 bDYMLA1DV7mIM4IkZAyZzDgk=
X-Envelope-To: netdev@vger.kernel.org
X-Received: by smtp.migadu.com with ESMTPS id 9deeaf9e38cf6456;
	Mon, 23 Nov 2026 07:02:10 +0000
X-Mizu-Trace-ID: 9deeaf9e38cf6456
X-Migadu-Flow: FLOW_OUT
X-Cc: Qiliang Yuan <qiliang.yuan@linux.dev>,
	Kuniyuki Iwashima <kuniyu@google.com>,
	Ralf Lici <ralf@mandelbit.com>,
	netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
X-Mailer: git-send-email 2.43.0
X-In-Reply-To: <20261121-bug-net-netns-move-rcu-barrier-v5-0-100a3b5d9090@linux.dev>
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list