Article View: linux.kernel.netdev
Article #23156Re: [PATCH net] ipv6: advance the serial after rebalancing in fib6_ifup and fib6_ifdown
From: David Ahern
Date: Thu, 26 Nov 2026 15:40
Date: Thu, 26 Nov 2026 15:40
38 lines
9801 bytes
9801 bytes
On 11/26/26 1:13 AM, Ralf Lici wrote:
> fib6_ifup and fib6_ifdown update the node serial before calling
> rt6_multipath_rebalance. A lookup that runs between the two can select a
> nexthop using the old ECMP upper bounds and read the new serial as its
> cookie. The cached dst then passes dst_check although it was selected
> from the old state, until the next relevant change.
>
> Update the serial after rt6_multipath_rebalance, so that it is published
> only after the routing state it describes. fib6_new_sernum allocates the
> serial with a fully ordered atomic_try_cmpxchg, which orders the
> rebalance before the serial update. The invalidation scope is unchanged:
> fib6_ifup still updates the node and its ancestors, fib6_ifdown only the
> node.
>
> Validating dsts against the generation sampled before the lookup, as
> proposed in "ipv6: validate cached dsts against the netns route
> generation", relies on this order as well: a lookup that reads the new
> generation must also observe the routing change it describes.
>
> Reported by Sashiko while reviewing an earlier version of this change.
>
> Fixes: d7dedee184e7 ("ipv6: Calculate hash thresholds for IPv6 nexthops")
> Fixes: 4bc852006b62 ("ipv6: update route serial number on NETDEV_CHANGE")
> Link: https://lore.kernel.org/netdev/cover.1795642432.git.dahern@nvidia.com/
> Signed-off-by: Ralf Lici <ralf@mandelbit.com>
> Reviewed-by: Xia Yan <yanxia@cmss.chinamobile.com>
> ---
> Split out of v5 of "ipv6: tie dst validation to the lookup that
> returned the dst", which is withdrawn in favour of the series in the
> Link above:
> https://lore.kernel.org/netdev/cover.1795537128.git.ralf@mandelbit.com/
>
> net/ipv6/route.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
Reviewed-by: David Ahern <dsahern@kernel.org>
Technical Details
Message-ID:
<2c21814f-c378-44c8-a01b-1e1c0a7c037c@kernel.org>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-372205-linux-kernel-netdev=dewy.ruReferences:
<20261126081353.55240-1-ralf@mandelbit.com>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-372205-linux-kernel-netdev=dewy.ru From: dsahern@kernel.org (David Ahern) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net] ipv6: advance the serial after rebalancing in fib6_ifup and fib6_ifdown Date: Thu, 26 Nov 2026 08:40:55 -0700 Organization: Usenet Network Message-ID: <2c21814f-c378-44c8-a01b-1e1c0a7c037c@kernel.org> References: <20261126081353.55240-1-ralf@mandelbit.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Injection-Info: usenet.network; logging-data="499392"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:H4XykD8eeuSojvR9hDDdy0hPXV0= sha256:y/gBoR5k+RGeXntMgo4ZiAVWtzEGQPXpZFkkc+liPAs= sha1:Z/Sgo0WpFNhiqAAqA/XmJFQbbbA= sha256:eHrLwbe8veUSDJbLsoKJ8cpen7ZbHI+9+az6YkYexOg= Content-Language: en-US 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 98D89125EE4; Thu, 26 Nov 2026 18:41:15 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.401 X-Spam-Status: No, score=-3.401 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org 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 LRpxkQApauMG; Thu, 26 Nov 2026 18:41:11 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-372205-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 76FAB125EE2; Thu, 26 Nov 2026 18:41:01 +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 063482CAEE; Thu, 26 Nov 2026 15:40:59 +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=1795707658; b=xJk1LoT5/LsZUz8jIzyYBgNTFh67PCVaCYiz+YILpd0aaVtNeSazV3qyucHqpjf/k4Eq 5+6evMCpsbANENuD73bFq5J2NzGJxSN7UQLvieYjjRVSWiT5c8eJvfMRkJu74nshIF8vh dsgCpLBLUkKPKo+Pqj0aaem3j3/J0GrfoT0ElX2QitruUoZeb+GKIxeICebKXvumMyL2g vMGbPoHiDQt7ojsPZcJVLyrkJ4/J3P8nBuLtPN2ibtEZI7VajYrPzPXEZeon/2NniLwBB qG7B4HpqdzWJrhm+RacYVicq3XzHrCOGgF70cMd8Omurg+gO83XQCNcuyW0y+h3z8mg== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795707658; h=X-Original-To:Received:Received:DKIM-Signature:Message-ID:Date: X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe: List-Unsubscribe:List-Owner:Precedence:MIME-Version:User-Agent: Subject:Content-Language:To:Cc:References:From:In-Reply-To: Content-Type:Content-Transfer-Encoding; bh=ogYCtgKgHVD13I4qsn1bL0KfpJN+Qrt66VctFGFBTn0=; b=r56uIxbXV4LBOFXIZXKXmgBdMH24XS/lqxG01NxudKa4H7HmuRa5YQucvlGrXVKplo+w hoXY8T9T0f4CSaPc/xIwM4svNEpBkH3fSYv2uvTtDURU91qjAY13YBqRzPLF4aJjV5TVG sNMDSWKKVKMhmAIilxgSkMTrjewW3E4wYnpmMOGPrh1MGGWYr6nwNDikbyzGk1kM6fAVO Z+4VRoN72V6uaf0jOMPu+yE2ApEPZmHwfIBUSfbRraCAgueR81ZBgK1COPabVpcmJmVq7 4Nr9NqBPXqUCANxy71ljGpEju/aLN0z/mRd2oIwiqx8O6ANgUczwutzPQRNuTOcc5Yw== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=DgRqvd4D; 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 58BF1606A327; Thu, 26 Nov 2026 15:40:58 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=DgRqvd4D X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795707657; b=Fo23fhUT0b5kuldUXwLN5+vtKP26N88yoyZ7hyoPl7TxkXoQVlI8RUM7ghxShyWkRpk5 PonAwAMtrbWUl5CMPLb7/1lAPwrzyZjzs2WYFaYTc2M6TIQTbIbQxpVJ5A3ucwF09WjCV KHm/n2BtOhAwvUNOJ/lDwcJGn9kOvKeRF1wdNEnzVvDBsIU6llAt0mSrqHn8TQHyVkuN3 i4yeHtdQCbmnp3RIyhhYFglsfLv4irJdikr62P8rCEXpKphD9X3/PcnoKypf89Wu9ZtgJ AJh6EoPX+ZwLDI3cAW1gbj0DpUBJw+i+1kuKhesXAhiRsmPeoQScgV+dTClzAGMeLmQ== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795707657; h=Received:DKIM-Signature:Message-ID:Date:MIME-Version:User-Agent: Subject:Content-Language:To:Cc:References:From:In-Reply-To: Content-Type:Content-Transfer-Encoding; bh=ogYCtgKgHVD13I4qsn1bL0KfpJN+Qrt66VctFGFBTn0=; b=KdsYUQthIZzST6a6tZ2qV4k00f7u1WaxC+QBNJ4hpnTnOpyL2PUOnWku0nkacVEENxO1 1jA0hN69nmwwD9QXPx2RKb2bqgR600Lv1kf40AsNXYUf39b8AGG/I1MzeNjUCKZRXDDGX RUal+Ju9zdgn9Ah1BzCuSxKx7ekQ/A2Vuq/HYq4D5g6WvkESONQ/iI/5MuNPIfntCaivV phpjI5lNrunTKBUds3cP2QPTwm9kBRVcexnWwkNgRIDFrWfhZejYQbFGeT7Vbb5AL6QUa YDC2bYcZ/IQHuuUPBIkh6KGhakpZIPiAkTv2mr48MbXZmrEmgUotbqVlPDXXthGu7bg== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=DgRqvd4D; arc=none smtp.remote-ip=100.103.45.18 X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 786A9606A31C; Thu, 26 Nov 2026 15:40:57 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id E1C961F000C6; Thu, 26 Nov 2026 15:40:55 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795707656; bh=ogYCtgKgHVD13I4qsn1bL0KfpJN+Qrt66VctFGFBTn0=; h=Date:Subject:To:Cc:References:From:In-Reply-To; b=DgRqvd4DuyL7bqhpyf4IQIxmSzfh9P82XP3/b18DEX1KOFsZUg+8nba5urhLgyIpK FOskC43QKlz6X7H1STKWpQbYSluhWUB7ei/UGl60hlR5jCqyAiz7YDr5wXx2gKnpWA YFBOWaHGkB02BWJ4VlGwGh40TD9anqx0KVFv8NvfkNC/HOpAL53vRJqG7PK1qKcDnp qBDkp+sjbV2b4eK+ONDJSOWel8pYfvLOIn37U10yLqIUa5f10StJySR46cVrrxKhYt 6h4f/9Oj1DoIPD0TxD/KkNtXmT+mM1NR8xNzT2KnRvoCg3LRAh7JF34x0i2P75XJni yk7+i46FeCS1w== 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 X-User-Agent: Mozilla Thunderbird X-Cc: Ido Schimmel <idosch@nvidia.com>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@kernel.org>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Willem de Bruijn <willemb@google.com>, Simon Horman <horms@kernel.org>, Sagarika Sharma <sharmasagarika@google.com>, Kuniyuki Iwashima <kuniyu@google.com>, Xia Yan <yanxia@cmss.chinamobile.com>, linux-kernel@vger.kernel.org X-In-Reply-To: <20261126081353.55240-1-ralf@mandelbit.com>